Jump to content
  • Advertisement
Sign in to follow this  
JonMaster

lnk2019 error while compiling dx sdk samples

This topic is 4891 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everybody, I tried to compile some of the Direct X SDK samples but I have got everytime the same errors: ------ Build started: Project: Vertices, Configuration: Debug Win32 ------ Compiling... Vertices.cpp Linking... Vertices.obj : error LNK2019: unresolved external symbol __imp__DefWindowProcA@16 referenced in function "long __stdcall MsgProc(struct HWND__ *,unsigned int,unsigned int,long)" (?MsgProc@@YGJPAUHWND__@@IIJ@Z) Vertices.obj : error LNK2019: unresolved external symbol __imp__PostQuitMessage@4 referenced in function "long __stdcall MsgProc(struct HWND__ *,unsigned int,unsigned int,long)" (?MsgProc@@YGJPAUHWND__@@IIJ@Z) Vertices.obj : error LNK2019: unresolved external symbol __imp__UnregisterClassA@8 referenced in function _WinMain@16 Vertices.obj : error LNK2019: unresolved external symbol __imp__DispatchMessageA@4 referenced in function _WinMain@16 Vertices.obj : error LNK2019: unresolved external symbol __imp__TranslateMessage@4 referenced in function _WinMain@16 Vertices.obj : error LNK2019: unresolved external symbol __imp__PeekMessageA@20 referenced in function _WinMain@16 Vertices.obj : error LNK2019: unresolved external symbol __imp__UpdateWindow@4 referenced in function _WinMain@16 Vertices.obj : error LNK2019: unresolved external symbol __imp__ShowWindow@8 referenced in function _WinMain@16 Vertices.obj : error LNK2019: unresolved external symbol __imp__CreateWindowExA@48 referenced in function _WinMain@16 Vertices.obj : error LNK2019: unresolved external symbol __imp__RegisterClassExA@4 referenced in function _WinMain@16 Debug/Vertices.exe : fatal error LNK1120: 10 unresolved externals Build log was saved at "file://c:\Documents and Settings\Jonas\My Documents\visual studio 2005\Projects\Vertices\Debug\BuildLog.htm" Vertices - 11 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== I'm using Visual C++ 2005 Express Edition Beta 2, the current Microsoft DirectX 9.0 SDK Update (June 2005) and Platform SDK. All paths are correctly set and I used the following libraries: "d3dxof.lib dxguid.lib d3dx9d.lib d3d9.lib winmm.lib" I have searched today for more than 3 hours for a solution of my problem but nothing could help me :-( JonMaster

Share this post


Link to post
Share on other sites
Advertisement
Quote:
it looks like you are not linking to user32.lib

If not that, it's probably worth double-checking the compiler is searching in the right place for the various Win32/PlatformSDK binaries. There are quite a few posts in these forums about getting the PSDK to work with VS2005 - are you sure yours is set-up appropriately?

hth
Jack

Share this post


Link to post
Share on other sites
Thx for your tip twkr now I was able to compile the second tutorial sample of the dx sdk but I got still the same failures if I try the compile an other tutorial.

------ Build started: Project: Matrices, Configuration: Debug Win32 ------
Compiling...
Matrices.cpp
Linking...
Matrices.obj : error LNK2019: unresolved external symbol __imp__DefWindowProcA@16 referenced in function "long __stdcall MsgProc(struct HWND__ *,unsigned int,unsigned int,long)" (?MsgProc@@YGJPAUHWND__@@IIJ@Z)
Matrices.obj : error LNK2019: unresolved external symbol __imp__PostQuitMessage@4 referenced in function "long __stdcall MsgProc(struct HWND__ *,unsigned int,unsigned int,long)" (?MsgProc@@YGJPAUHWND__@@IIJ@Z)
Matrices.obj : error LNK2019: unresolved external symbol __imp__UnregisterClassA@8 referenced in function _WinMain@16
Matrices.obj : error LNK2019: unresolved external symbol __imp__DispatchMessageA@4 referenced in function _WinMain@16
Matrices.obj : error LNK2019: unresolved external symbol __imp__TranslateMessage@4 referenced in function _WinMain@16
Matrices.obj : error LNK2019: unresolved external symbol __imp__PeekMessageA@20 referenced in function _WinMain@16
Matrices.obj : error LNK2019: unresolved external symbol __imp__UpdateWindow@4 referenced in function _WinMain@16
Matrices.obj : error LNK2019: unresolved external symbol __imp__ShowWindow@8 referenced in function _WinMain@16
Matrices.obj : error LNK2019: unresolved external symbol __imp__CreateWindowExA@48 referenced in function _WinMain@16
Matrices.obj : error LNK2019: unresolved external symbol __imp__RegisterClassExA@4 referenced in function _WinMain@16
Debug/Matrices.exe : fatal error LNK1120: 10 unresolved externals
Build log was saved at "file://c:\Documents and Settings\Jonas\My Documents\visual studio 2005\Projects\Matrices\Debug\BuildLog.htm"
Matrices - 11 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Share this post


Link to post
Share on other sites
Quote:
Original post by JonMaster
Thx for your tip twkr now I was able to compile the second tutorial sample of the dx sdk but I got still the same failures if I try the compile an other tutorial.

At least under VC2002, linker properties are project/solution specific - maybe you just need to change the next tutorial to also point at user32.lib?

hth
Jack

Share this post


Link to post
Share on other sites
Hi Jollyjeffers

I used the instruction under this link to get PSDK to work with VC++ Express
(I prefered the easier procedure ;-) )

http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=2995

JonMaster

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!