Linking Errors

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
NateTG
Posts: 37
Joined: Mon Oct 14, 2002 2:38 am
Location: Here

Linking Errors

Post by NateTG »

Hey all, I have been trying to compile Blender on WinXP using msvc6. I have done it before, but this time I'm getting linking errors.

Code: Select all

Linking...
libcpmt.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in PHY_Physics.lib(SM_Scene.obj)
libcpmt.lib(xlock.obj) : warning LNK4006: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in PHY_Physics.lib(SM_Scene.obj); second definition ignored
   Creating library ..\..\bin\blender.lib and object ..\..\bin\blender.exp
LINK : warning LNK4049: locally defined symbol ""public: bool __thiscall FTFont::CharMap(enum FT_Encoding_)" (?CharMap@FTFont@@QAE_NW4FT_Encoding_@@@Z)" imported
LINK : warning LNK4049: locally defined symbol ""public: __thiscall FTGLPixmapFont::FTGLPixmapFont(char const *)" (??0FTGLPixmapFont@@QAE@PBD@Z)" imported
LINK : warning LNK4049: locally defined symbol ""public: __thiscall FTGLPixmapFont::FTGLPixmapFont(unsigned char const *,unsigned int)" (??0FTGLPixmapFont@@QAE@PBEI@Z)" imported
LINK : warning LNK4049: locally defined symbol ""public: virtual __thiscall FTGLPixmapFont::~FTGLPixmapFont(void)" (??1FTGLPixmapFont@@UAE@XZ)" imported
LINK : warning LNK4049: locally defined symbol ""public: float __thiscall FTFont::Ascender(void)const " (?Ascender@FTFont@@QBEMXZ)" imported
LINK : warning LNK4049: locally defined symbol ""public: float __thiscall FTFont::Descender(void)const " (?Descender@FTFont@@QBEMXZ)" imported
LINK : warning LNK4049: locally defined symbol ""public: float __thiscall FTFont::Advance(unsigned short const *)" (?Advance@FTFont@@QAEMPBG@Z)" imported
LINK : warning LNK4049: locally defined symbol ""public: void __thiscall FTFont::BBox(unsigned short const *,float &,float &,float &,float &,float &,float &)" (?BBox@FTFont@@QAEXPBGAAM11111@Z)" imported
LINK : warning LNK4049: locally defined symbol "__iob" imported
PHY_Physics.lib(SM_Object.obj) : error LNK2001: unresolved external symbol "public: void __thiscall SM_MotionState::integrateForward(double,class SM_MotionState const &)" (?integrateForward@SM_MotionState@@QAEXNABV1@@Z)
..\..\bin\blender.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Any help would be appreciated. I have tried everything I can think of.
Thanks
\n

alien-xmp
Posts: 0
Joined: Sun Apr 06, 2003 2:22 pm
Location: Wellington, New Zealand
Contact:

Post by alien-xmp »

The MSVC project files haven't been updated... add source/gameengine/Physics/Sumo/Fuzzics/src/SM_MotionState.cpp to a suitable project.

NateTG
Posts: 37
Joined: Mon Oct 14, 2002 2:38 am
Location: Here

Post by NateTG »

thanks man, that solved that last error, but there is still the error at the beginning:

Code: Select all

libcpmt.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in PHY_Physics.lib(SM_Scene.obj)
libcpmt.lib(xlock.obj) : warning LNK4006: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in PHY_Physics.lib(SM_Scene.obj); second definition ignored
.
.
..\..\bin\blender.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe
just those and im happy ;)
\n

bjornmose
Posts: 0
Joined: Tue Nov 25, 2003 5:27 pm
Location: Denzenberg, could walk to Hölderling-Tower
Contact:

Post by bjornmose »

III funny things i've found

1. the release of PHY_SUMO project creates phy_physics.lib, so this should be phy_sumo.lib

2. threading models are mixed (scons uses /MT) so i'd propose to set all to multi-threading.

3. the project SM_FUZZICS looks like it became obsolete ( scons does not anything like that ) .. hrms i kicked it out off the dependancies and it sill compiles .

hope that helps ..

NateTG
Posts: 37
Joined: Mon Oct 14, 2002 2:38 am
Location: Here

Post by NateTG »

bjornmose: I took a look at the things you pointed out, and you're right about those. I changed the SM_SUMO project to create PHY_sumo.lib, and you're right that SM_Fuzzics appears to be obsolete. But I still can't get it to compile. Maybe I'm not fully understanding your second point though.

again, here is the error I am talking about.

Code: Select all

libcpmt.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in PHY_Sumo.lib(SM_Scene.obj)
thanks again
\n

bjornmose
Posts: 0
Joined: Tue Nov 25, 2003 5:27 pm
Location: Denzenberg, could walk to Hölderling-Tower
Contact:

Post by bjornmose »

NateTG wrote: Maybe I'm not fully understanding your second point though.

\n
for the projects PHY_SOMO and BLENDER set
"Use run-time library" to multithreaded . (tab c/c++ , code generation)
You have to *rebuild all* because of the precompiled headers MSVC6 is using.
/BM

NateTG
Posts: 37
Joined: Mon Oct 14, 2002 2:38 am
Location: Here

Post by NateTG »

got it to compile! :D thanks for the tips man. Basically,

1) Remove PHY_Sumo from the blender dependencies
2) Change PHY_Physics to MT

cheers
\n

bjornmose
Posts: 0
Joined: Tue Nov 25, 2003 5:27 pm
Location: Denzenberg, could walk to Hölderling-Tower
Contact:

Post by bjornmose »

NateTG wrote:got it to compile! :D thanks for the tips man. Basically,

1) Remove PHY_Sumo from the blender dependencies
2) Change PHY_Physics to MT

cheers
\n
EEEEK! this works too ?
i suggested /* syncing with scons */

1) removing SM_FUZZICS
2) Change PHY_SUMO to MT /* after giving it the proper target name :) */

o_O msvc6 project files need to be looked after ..
anyway .. my solution is on CVS
and .. if you want to build latest CVS only /* not really want to edit code */
SCONS is your friend /* builds 99% of the times, the remaining 1% are *real* bugs */
/BM

NateTG
Posts: 37
Joined: Mon Oct 14, 2002 2:38 am
Location: Here

Post by NateTG »

Whoops, my mistake. I screwed up the names. :oops:
Sorry about that, you are right.

1) Remove SM_Fuzzics from blender dependencies
2) Change SM_Sumo to MT

sorry about that :oops:

Post Reply