Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Unresolved External Symbol Error [Solved]  (Read 2943 times)

0 Members and 1 Guest are viewing this topic.

Red-XIII

  • Newbie
  • *
  • Posts: 16
    • View Profile
    • Advanced Protocol
    • Email
Unresolved External Symbol Error [Solved]
« on: April 10, 2015, 02:52:16 am »
I'm not sure what I did wrong here, can anyone help me, along with that, if you have any tips I would appreciate any, also If you need me to post the Engine class, just let me know.

Apollo.h
(click to show/hide)

Apollo.cpp
(click to show/hide)

Main.cpp
(click to show/hide)

Error
1>------ Build started: Project: Apollo, Configuration: Release Win32 ------
1>Apollo.obj : error LNK2001: unresolved external symbol "public: static class sf::RenderStates const sf::RenderStates::Default" (?Default@RenderStates@sf@@2V12@B)
1>Apollo.obj : error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Red" (?Red@Color@sf@@2V12@B)
1>C:\Users\XXXXX XXXXXX\documents\visual studio 2013\Projects\Advanced Protocol Software\Release\Apollo.exe : fatal error LNK1120: 2 unresolved externals
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
« Last Edit: April 10, 2015, 11:27:43 pm by Red-XIII »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11016
    • View Profile
    • development blog
    • Email
AW: Unresolved External Symbol Error
« Reply #1 on: April 10, 2015, 08:16:22 am »
If you link static, did you define SFML_STATIC?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Red-XIII

  • Newbie
  • *
  • Posts: 16
    • View Profile
    • Advanced Protocol
    • Email
Re: Unresolved External Symbol Error
« Reply #2 on: April 10, 2015, 09:30:23 am »
Actually it's Dynamic. I got it working before, but I did something wrong i'm unsure of. I haven't done C++ in quite a long time, even then I didn't learn much because it was too overwhelming for me. So I worked up to it by doing C# and Java.
« Last Edit: April 10, 2015, 09:57:02 am by Red-XIII »

Red-XIII

  • Newbie
  • *
  • Posts: 16
    • View Profile
    • Advanced Protocol
    • Email
Re: AW: Unresolved External Symbol Error
« Reply #3 on: April 10, 2015, 11:25:46 pm »
If you link static, did you define SFML_STATIC?

God I feel dumb lol, I figured out why you guys use that macro. You use it to do "__declspec(dllexport)" if "SFML_STATIC" is not defined. I had recently tried doing the static libraries, but that macro had caused those errors.

 

anything