Link Errors in Debug Mode

Boogy

18-03-2010 09:35:22

When I compile OgreNewt in release mode it compiles fine but when I compile it in Debug Mode it gives me these errors:

1>Linking...
1> Creating library .\lib\OgreNewt_d.lib and object .\lib\OgreNewt_d.exp
1>LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library
1>OgreNewt_Joint.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall CustomUserBlank::CustomUserBlank(unsigned int,struct NewtonBody const *,struct NewtonBody const *)" (__imp_??0CustomUserBlank@@QAE@IPBUNewtonBody@@0@Z) referenced in function "public: __thiscall OgreNewt::CustomJoint::CustomJoint(unsigned int,class OgreNewt::Body const *,class OgreNewt::Body const *)" (??0CustomJoint@OgreNewt@@QAE@IPBVBody@1@0@Z)
1>OgreNewt_Joint.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall CustomUserBlank::GetInfo(struct NewtonJointRecord *)const " (?GetInfo@CustomUserBlank@@MBEXPAUNewtonJointRecord@@@Z)
1>OgreNewt_Joint.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall CustomUserBlank::SubmitConstraints(float,int)" (?SubmitConstraints@CustomUserBlank@@MAEXMH@Z)
1>OgreNewt_Joint.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall CustomUserBlank::~CustomUserBlank(void)" (__imp_??1CustomUserBlank@@UAE@XZ) referenced in function "public: virtual void * __thiscall CustomUserBlank::`scalar deleting destructor'(unsigned int)" (??_GCustomUserBlank@@UAEPAXI@Z)
1>./lib/OgreNewt_d.dll : fatal error LNK1120: 4 unresolved externals


I have used these link directory's :

C:\OgreSDK\lib;
C:\boost\libs;
C:\NewtonWin\sdk\x32;
C:\NewtonWin\sdk\x32\dll_vs9


Can anybody help me with this problem? :)

majc

18-03-2010 09:50:43

Did you add somethingJoints_d.lib in Linking->input? (I don't remeber very well the name :P)

Boogy

18-03-2010 09:57:14

yes I have JointLibrary_d.lib included.
I find it weird that it compiles in release mode but not in debug mode :?

majc

18-03-2010 10:00:59

And all the libraries you included are in debug mode? NOrmaly that kind of error happens when you make a mix with debug and release versions in your included libraries.

Boogy

18-03-2010 10:02:48

And all the libraries you included are in debug mode? NOrmaly that kind of error happens when you make a mix with debug and release versions in your included libraries.

let me check :wink:

majc

18-03-2010 10:04:47

See also if all your libraries were compiled in debug win32 or in x64 if you mix 32 with 64 that can be happen also. I know because happened to me lol.

Boogy

18-03-2010 10:08:34

newton.lib

Maybe this one is bad :P
Its located in: C:\NewtonWin\sdk\x32\dll_vs9.
Its the same directory as in release mode.

majc

18-03-2010 10:32:23

i don't think that is the problem, did it compiled?

Boogy

18-03-2010 10:34:47

nop :(

majc

18-03-2010 10:37:47

I'm at work i don't have here the project ro show you my configuration, but if i remeber when i arrive home i can paste it here.

majc

18-03-2010 10:52:36

Did you see the libs of ogre dependecies? Everyone was compiled in debug mode?

kallaspriit

21-03-2010 10:50:20

You have to compile the JointLibrary in debug mode, it seems Julio has not updated that dll :wink: