PDA

View Full Version : Linker Errors under Visual Studio



Jens R
10-27-2007, 02:54 PM
Hello,

I have some compile-problems in Visual Studio. I make use
of the PowerVR SDK. When I use a sample project and paste
my own code in it, it compiles without any problems. When I create
my own project I get several LINKER errors:



PlyViewer.obj : error LNK2019: unresolved external symbol "public: bool __cdecl PVRShell::PVRShellSet(enum prefNameBoolEnum,bool)" (?PVRShellSet@PVRShell@@QAA_NW4prefNameBoolEnum@@_ N@Z) referenced in function "public: virtual bool __cdecl PlyViewer::InitApplication(void)" (?InitApplication@PlyViewer@@UAA_NXZ)
PlyViewer.obj : error LNK2019: unresolved external symbol glRotatef referenced in function "public: virtual bool __cdecl PlyViewer::InitView(void)" (?InitView@PlyViewer@@UAA_NXZ)
PlyViewer.obj : error LNK2019: unresolved external symbol glTranslatef referenced in function "public: virtual bool __cdecl PlyViewer::InitView(void)" (?InitView@PlyViewer@@UAA_NXZ)
PlyViewer.obj : error LNK2019: unresolved external symbol glOrthof referenced in function "public: virtual bool __cdecl PlyViewer::InitView(void)" (?InitView@PlyViewer@@UAA_NXZ)
PlyViewer.obj : error LNK2019: unresolved external symbol glLightModelf referenced in function "public: virtual bool __cdecl PlyViewer::InitView(void)" (?InitView@PlyViewer@@UAA_NXZ)
PlyViewer.obj : error LNK2019: unresolved external symbol glLightfv referenced in function "public: virtual bool __cdecl PlyViewer::InitView(void)" (?InitView@PlyViewer@@UAA_NXZ)
PlyViewer.obj : error LNK2019: unresolved external symbol glClearColor referenced in function "public: virtual bool __cdecl PlyViewer::InitView(void)" (?InitView@PlyViewer@@UAA_NXZ)
PlyViewer.obj : error LNK2019: unresolved external symbol glNormal3f referenced in function "public: virtual bool __cdecl PlyViewer::RenderScene(void)" (?RenderScene@PlyViewer@@UAA_NXZ)
PlyViewer.obj : error LNK2019: unresolved external symbol glScalef referenced in function "public: virtual bool __cdecl PlyViewer::RenderScene(void)" (?RenderScene@PlyViewer@@UAA_NXZ)
PlyViewer.obj : error LNK2019: unresolved external symbol "public: bool __cdecl PVRShell::PVRShellIsKeyPressed(enum PVRShellKeyName)" (?PVRShellIsKeyPressed@PVRShell@@QAA_NW4PVRShellKe yName@@@Z) referenced in function "public: bool __cdecl PlyViewer::KeyBoard(void)" (?KeyBoard@PlyViewer@@QAA_NXZ)
PlyViewer.obj : error LNK2019: unresolved external symbol "public: __cdecl PVRShell::PVRShell(void)" (??0PVRShell@@QAA@XZ) referenced in function "public: __cdecl PlyViewer::PlyViewer(void)" (??0PlyViewer@@QAA@XZ)
PlyViewer.obj : error LNK2019: unresolved external symbol "public: virtual __cdecl PVRShell::~PVRShell(void)" (??1PVRShell@@UAA@XZ) referenced in function "public: virtual __cdecl PlyViewer::~PlyViewer(void)" (??1PlyViewer@@UAA@XZ)
corelibc.lib(pegwmain.obj) : error LNK2019: unresolved external symbol WinMain referenced in function WinMainCRTStartup


I include the identical lib and h-files. If I don't include them, I reveive even more error messages.

Can somebody please help me?

Kind Regards,
Jens

plasmonster
10-27-2007, 09:57 PM
Looks to me like you're still missing a library somewhere.

For VC8, look through the project dialog Properties->Configuration Properties->Linker->Input->Addition Dependencies list and make sure you've got everything.

Jens R
10-28-2007, 12:59 AM
I think I linked the same library files:

Command line options (MY OWN PROJEKT):


/OUT:"Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\Debug/PlyViewer.exe" /INCREMENTAL /NOLOGO /LIBPATH:"../Lib" /MANIFEST:NO /NODEFAULTLIB:"oldnames.lib" /DEBUG /PDB:"Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\Debug/PlyViewer.pdb" /SUBSYSTEM:WINDOWSCE /ERRORREPORT:PROMPT oglestools.lib libgles_cl.lib coredll.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib


Command line options (WORKING PROJEKT):

/OUT:"CommonLite-PocketPC-ARMV4I-Debug/OGLESIntroducingPVRShell.exe" /INCREMENTAL /NOLOGO /LIBPATH:"..\..\..\..\..\Tools\OGLES\Build\WindowsVC2005\Com monLite-PocketPC-ARMV4I-Debug" /LIBPATH:"..\..\..\..\..\Builds\OGLES\PocketPCARMV4\lib" /MANIFEST:NO /NODEFAULTLIB:"oldnames.lib" /DEBUG /PDB:"CommonLite-PocketPC-ARMV4I-Debug/OGLESIntroducingPVRShell.pdb" /ERRORREPORT:PROMPT oglestools.lib libgles_cl.lib coredll.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib

plasmonster
10-28-2007, 03:07 AM
Yeah that's a real dome scratcher, Jens.

I'm not up to speed on the ES side of things so I'll gracefully bow out now and defer to the good folks at Khronos:
http://www.khronos.org/message_boards/index.php?c=3&sid=3424a98f4d44ee783f0ea05d3c09b62d

The PowerVR stuff looks really cool and I plan to get acquainted with ES first chance I get (I noticed you need to register over there to gain access to their SDKs and demos).

I did have a chance to peek at some of the other demos here:
http://www.khronos.org/developers/resources/opengles/

The demo I looked at seemed to offer a choice of run-time or static linking by way of the preprocessor symbol DISABLE_IMPORTGL, which apparently loads one of the libGLES_*.dll flavors at start up. Don't know if that means anything to you but I thought I'd toss it in for the heck of it.

Sorry I couldn't be of more use.

Good luck!

Jens R
10-28-2007, 06:06 AM
The demo I looked at seemed to offer a choice of run-time or static linking by way of the preprocessor symbol DISABLE_IMPORTGL, which apparently loads one of the libGLES_*.dll flavors at start up. Don't know if that means anything to you but I thought I'd toss it in for the heck of it.


That could be the solution. Can you tell me where I can adjust that the linker links on run-time?

Kind Regards
Jens