program compiling in Debug mode but not in Release mode

Hi all,

My program compiles in Debug mode but will not compile in Release mode. I do not have a great understanding of project properties/settings etc but from searching I think it is something with these that is causing the problem.

I have two projects in my solution, one of which is a static library. I am using visual studio 2008. I recieve 89 LNK2001 errors when compiling in release mode.


Player.obj : error LNK2001: unresolved external symbol "public: void __thiscall AABB::SetMax(class Vector2D &)" (?SetMax@AABB@@QAEXAAVVector2D@@@Z)
Player.obj : error LNK2001: unresolved external symbol "public: __thiscall AABB::~AABB(void)" (??1AABB@@QAE@XZ)
Player.obj : error LNK2001: unresolved external symbol "public: __thiscall AABB::AABB(void)" (??0AABB@@QAE@XZ)

Thing I have checked so far:

The settings for both debug and release mode appear to be mostly the same. There is nothing different in these that I can figure out would affect the build. However I do not have a vast knowledge of this so I am open to suggestions.

I dont know if this should be the case but under Linker->Input->Additional Dependancies both setting for debug and release do not have any specified.

I have been at this for hours and Im very puzzled, my goal is to create a 'stand alone' version of my program to be used on machines without the visual studio framework.

Any help or suggestions are greatly appreciated

Are the unresolved symbols about code of the exe project, or about code of the lib while linking the exe? Or maybe the lib project is configured to be built as an application in release mode so it cannot find some code? Are you linking the exe with the last version of the lib?

If you set you lib projetc as a dependency of the exe project in the project dependency dialog, the exe should automatically link the compiled lib file
The unresolved errors come when the non library project compiles. I don't really understand everything you've said,can you explain what I need to check to test some of your suggestions?
Player.obj : error LNK2001: unresolved external symbol "public: void __thiscall AABB::SetMax(class Vector2D &)" (?SetMax@AABB@@QAEXAAVVector2D@@@Z)

The statements all follow the same format:

NonLibrary.obj error LNK2001: unresolved external symbol "call to library function"

I've checked to make sure the library is compiling as a static library and not an exe.

go to project->properties->configuartion properties->linker->input->additional depencies.
edit that and put all librarys in there that you are using.
in my case it is filled with these :
And make sure you're configuring for Debug and Release, not just Debug.
Topic archived. No new replies allowed.