link error in VS2003, PLEASE help.

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
bthayward
Posts: 0
Joined: Sat Mar 26, 2005 5:12 am

link error in VS2003, PLEASE help.

Post by bthayward »

I am no newb to programming or to visual studio, but after spending literally 3 days trying to get blender to compile, im about to give up. Someone please help me.

When I compile I get these linker errors.
------ Rebuild All started: Project: blender, Configuration: Blender Debug Win32 ------

Deleting intermediate files and output files for project 'blender', configuration 'Blender Debug|Win32'.
Compiling...
creator.c
Compiling resources...
Linking...
Creating library ..\..\bin\debug\blender.lib and object ..\..\bin\debug\blender.exp
libjpeg.lib(jerror.o) : warning LNK4217: locally defined symbol __iob imported in function _output_message
libpng_st.lib(pngerror.o) : warning LNK4049: locally defined symbol __iob imported
libpng_st.lib(pngwutil.o) : warning LNK4049: locally defined symbol __iob imported
libpng_st.lib(pngrutil.o) : warning LNK4049: locally defined symbol __iob imported
KX_blenderhook.lib(KX_BlenderRenderTools.obj) : error LNK2019: unresolved external symbol "public: static bool __cdecl KX_RayCast::RayTest(class KX_IPhysicsController *,class PHY_IPhysicsEnvironment *,class MT_Point3 const &,class MT_Point3 const &,class MT_Point3 &,class MT_Vector3 &,class KX_RayCast const &)" (?RayTest@KX_RayCast@@SA_NPAVKX_IPhysicsController@@PAVPHY_IPhysicsEnvironment@@ABVMT_Point3@@2AAV4@AAVMT_Vector3@@ABV1@@Z) referenced in function "public: virtual void __thiscall KX_BlenderRenderTools::applyTransform(class RAS_IRasterizer *,double *,int)" (?applyTransform@KX_BlenderRenderTools@@UAEXPAVRAS_IRasterizer@@PANH@Z)
KX_ketsji.lib(KX_RaySensor.obj) : error LNK2001: unresolved external symbol "public: static bool __cdecl KX_RayCast::RayTest(class KX_IPhysicsController *,class PHY_IPhysicsEnvironment *,class MT_Point3 const &,class MT_Point3 const &,class MT_Point3 &,class MT_Vector3 &,class KX_RayCast const &)" (?RayTest@KX_RayCast@@SA_NPAVKX_IPhysicsController@@PAVPHY_IPhysicsEnvironment@@ABVMT_Point3@@2AAV4@AAVMT_Vector3@@ABV1@@Z)
KX_ketsji.lib(KX_MouseFocusSensor.obj) : error LNK2001: unresolved external symbol "public: static bool __cdecl KX_RayCast::RayTest(class KX_IPhysicsController *,class PHY_IPhysicsEnvironment *,class MT_Point3 const &,class MT_Point3 const &,class MT_Point3 &,class MT_Vector3 &,class KX_RayCast const &)" (?RayTest@KX_RayCast@@SA_NPAVKX_IPhysicsController@@PAVPHY_IPhysicsEnvironment@@ABVMT_Point3@@2AAV4@AAVMT_Vector3@@ABV1@@Z)
..\..\bin\debug\blender.exe : fatal error LNK1120: 1 unresolved externals

Build log was saved at "file://c:\Blenderdev\build\msvc_7\source\blender\debug\BuildLog.htm"
blender - 4 error(s), 4 warning(s)


---------------------- Done ----------------------

Rebuild All: 33 succeeded, 1 failed, 0 skipped
[/quote]

mchs3d
Posts: 0
Joined: Thu Feb 03, 2005 6:05 am
Location: Loveland, CO

Post by mchs3d »

This is so much to explain. Basically, you need to go to blender/source/ and search out the missing files. The functions that it can't find are in files that the Projectfiles failed to originally include. I can't write it all here or now, but if you need help I will post something on my website. :D

bthayward
Posts: 0
Joined: Sat Mar 26, 2005 5:12 am

reply

Post by bthayward »

If you could help me further I would really appresiate it.

I think the error msg is saying that the project files KX_ketsji and KX_blenderhook cant find the file KX_RayCast.

Unfortunately I have added KX_RayCast's directory to the include dir list for both classes, and I am still getting the same errors.

stiv
Posts: 0
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Post by stiv »

fatal error LNK1120: 1 unresolved externals
You are getting link errors about unresolved symbols. Adding directories to the includes list will not fix this.

mchs3d
Posts: 0
Joined: Thu Feb 03, 2005 6:05 am
Location: Loveland, CO

Post by mchs3d »

ok, give a me a day or two and have a detailed explanation :wink:

mchs3d
Posts: 0
Joined: Thu Feb 03, 2005 6:05 am
Location: Loveland, CO

Post by mchs3d »

ok, nevermind the day or two, here's your explanation :lol:

ascotan
Posts: 0
Joined: Thu May 29, 2003 10:32 pm
Location: Maryland, U.S.

Post by ascotan »

The linking errors are due to files not added to the project. This issue has been resolved.

Post Reply