Game Development Community

Trouble Compiling

by torque2a · in Torque Game Builder · 04/04/2007 (1:59 pm) · 2 replies

I'm having the following errors when trying to compile:

7>winExec.obj : error LNK2019: unresolved external symbol __imp__ShellExecuteExA@4 referenced in function "public: __thiscall ExecuteThread::ExecuteThread(char const *,char const *,char const *)" (??0ExecuteThread@@QAE@PBD00@Z)
7>winExec.obj : error LNK2019: unresolved external symbol __imp__ShellExecuteA@24 referenced in function "public: static void __cdecl Platform::openFolder(char const *)" (?openFolder@Platform@@SAXPBD@Z)
7>winUser.obj : error LNK2019: unresolved external symbol __imp__SHGetSpecialFolderPathA@16 referenced in function "public: static char const * __cdecl Platform::getUserDataDirectory(void)" (?getUserDataDirectory@Platform@@SAPBDXZ)
7>winWindow.obj : error LNK2019: unresolved external symbol __imp__DragFinish@4 referenced in function "long __stdcall WindowProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WindowProc@@YGJPAUHWND__@@IIJ@Z)
7>winWindow.obj : error LNK2019: unresolved external symbol __imp__DragQueryFileA@16 referenced in function "long __stdcall WindowProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WindowProc@@YGJPAUHWND__@@IIJ@Z)
7>winWindow.obj : error LNK2019: unresolved external symbol __imp__DragAcceptFiles@8 referenced in function "long __stdcall WindowProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WindowProc@@YGJPAUHWND__@@IIJ@Z)

I have the full SDK installed and referenced.

I've been trying for hours and getting nowhere. Any help would be greatly appreciated.

#1
04/04/2007 (2:53 pm)
All of those functions require linking against shell32.lib, which, now that I look at it, we aren't doing in Visual Studio 2005. What compiler are you using? I'm guessing VS2005 Express. If so, go to Project->TorqueGameBuilder properties... and then in the Configuration Properties->Linker->Input section, add shell32.lib to the Additional Dependencies.

You will probably need to do the same thing for the TGBGame project. Right click on it in the Solution Explorer and click on properties, then follow the above steps again.
#2
04/04/2007 (3:02 pm)
That fixed it. Thank you!!