Game Development Community

Compile under VS2K Express

by Jody Dawkins · in · 04/01/2006 (10:43 am) · 5 replies

I'm having difficulty compiling opengl2d3d under VS2K Express.

OpenGL2D3D.obj : error LNK2019: unresolved external symbol "public: static unsigned long __cdecl sgD3DCompatibility::sgGetShader(long)" (?sgGetShader@sgD3DCompatibility@@SAKJ@Z) referenced in function "void __cdecl QuakeSetTexturingState(void)" (?QuakeSetTexturingState@@YAXXZ)
OpenGL2D3D.obj : error LNK2001: unresolved external symbol "public: static int * sgD3DCompatibility::sgCombineMode" (?sgCombineMode@sgD3DCompatibility@@2PAHA)
OpenGL2D3D.obj : error LNK2001: unresolved external symbol "public: static int * sgD3DCompatibility::sgScale" (?sgScale@sgD3DCompatibility@@2PAHA)
OpenGL2D3D.obj : error LNK2019: unresolved external symbol "public: static void __cdecl sgD3DCompatibility::sgInitShaders(void *)" (?sgInitShaders@sgD3DCompatibility@@SAXPAX@Z) referenced in function _wd3dCreateContext@4
OpenGL2D3D.obj : error LNK2019: unresolved external symbol "public: static void __cdecl sgD3DCompatibility::sgDeleteShaders(void *)" (?sgDeleteShaders@sgD3DCompatibility@@SAXPAX@Z) referenced in function _wd3dDeleteContext@4
../example/opengl2d3d_DEBUG.dll : fatal error LNK1120: 5 unresolved externals

Sorry for my ignorance. Can anyone shed some light on how I need to change the project configuration?

Thanks.

#1
04/01/2006 (11:09 am)
I'm assuming you are using Visual Studio 2005 Express, I know it says VS2K but I didn't know there was such a beast. Anyway, tdn.garagegames.com/wiki/Torque/vs2k5 will help immensely.

Did you link the sgD3DCompatibility to the project?

I had similiar errors while compiling but I can't remember if they were VS2k5 things I missed or because I missed a link after merging.
#2
04/01/2006 (12:50 pm)
Sorry, it is VS2K5.

I found my mistake. I linked all the files in the lightingPack directory into the opengl2d3d project where all I needed was sgD3DCompatibility.cc.

Thanks very much.

- Jody
#3
04/26/2006 (6:27 am)
Jody can you explain the steps you took to make this work for you?
#4
04/26/2006 (4:25 pm)
@Surge

Expand the opengl2d3d project.
On the Source Files item: Right click/Add/New filter - call it lightingPack
On the lightingPack item: Right click/Add/Existing Item - choose sgD3dCompatibility.cc/.h

That's it.

- Jody
#5
04/26/2006 (7:58 pm)
Thank you - Thats exactly what I needed.

-Surge