News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

how to visual c++ 2005 compiler

Started by lubos, September 05, 2006, 07:45:00 PM

Previous topic - Next topic

lubos

Hi!
please can someone tell me how to correctly set ms visual c++ 2005 ee compiler for latest directx sdk in code::blocks? i have no problems at VC++2005ee IDE but it can be nice to develop dx apps on codeblocks :) i have setted all compiler dirs and link libs but it still giving me link "unresolved external symbol" errors.

thanks,

rjmyst3

Could you post the error lines? You're not linking to what you need to link to, but without the symbol names, I'd just be guessing as to what library is wrong/missing.
[url="http://wxformbuilder.org"]http://wxformbuilder.org[/url]

lubos

ok so i install dx mesh tutorial(6) from dx sdk. open it with code::blocks, use default compiler, import settings.
when then i look at link libs it linking with winmm, d3d9, d3dx9, d3dxof, dxguid.
in compiler settings i have sellected vc++2005 and added incude dirs VCinclude, platformsdk, dxsdk,
libs dirs same

build log:
-------------- Build: Debug|Win32 in Meshes ---------------
Linking executable: Debug\Meshes.exe
Meshes.obj : error LNK2019: unresolved external symbol __imp__MessageBoxA@16 referenced in function "long __cdecl InitGeometry(void)" (?InitGeometry@@YAJXZ)
Meshes.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)
Meshes.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)
Meshes.obj : error LNK2019: unresolved external symbol __imp__UnregisterClassA@8 referenced in function _WinMain@16
Meshes.obj : error LNK2019: unresolved external symbol __imp__DispatchMessageA@4 referenced in function _WinMain@16
Meshes.obj : error LNK2019: unresolved external symbol __imp__TranslateMessage@4 referenced in function _WinMain@16
Meshes.obj : error LNK2019: unresolved external symbol __imp__PeekMessageA@20 referenced in function _WinMain@16
Meshes.obj : error LNK2019: unresolved external symbol __imp__UpdateWindow@4 referenced in function _WinMain@16
Meshes.obj : error LNK2019: unresolved external symbol __imp__ShowWindow@8 referenced in function _WinMain@16
Meshes.obj : error LNK2019: unresolved external symbol __imp__CreateWindowExA@48 referenced in function _WinMain@16
Meshes.obj : error LNK2019: unresolved external symbol __imp__RegisterClassExA@4 referenced in function _WinMain@16
Debug\Meshes.exe : fatal error LNK1120: 11 unresolved externals
Process terminated with status 1120 (0 minutes, 0 seconds)
12 errors, 0 warnings


something with windows stuff?
thanks a lot for help

rjmyst3

You are right, these are all windows api calls.
Looks like most of these are from User32, so add User32.lib to your linked libraries.
If you search for the documentation on these functions at http://msdn.microsoft.com/library/, the library that they are contained in is listed at the bottom.
[url="http://wxformbuilder.org"]http://wxformbuilder.org[/url]

lubos

you are great! it compile and run fine, thank you a lot!  :lol: :lol: :lol: :lol:

lubos

cant compile another app :(

-------------- Build: Debug|Win32 in 3DPongClone ---------------
Linking executable: Debug\3DPongClone.exe
winmain.obj : error LNK2019: unresolved external symbol __imp__GetStockObject@4 referenced in function _WinMain@16
Debug\3DPongClone.exe : fatal error LNK1120: 1 unresolved externals
Process terminated with status 1120 (0 minutes, 0 seconds)
2 errors, 0 warnings

what it still want from me??

mandrav

This will get you nowhere, asking each time you get an unresolved symbol.
Please, learn how to search the documentation of the APIs you 're using...

Anyway, add gdi32 in libs.
Be patient!
This bug will be fixed soon...

lubos

#7
ok i fixed it with gdi32.lib   :D
edit: ok you will not believe me, but i fixed it yourself with google and was writing this repply. anyway thank you!(even if you not believe me :lol:)
ehm http://www.codecomments.com/archive371-2005-4-463706.html