Author Topic: how to visual c++ 2005 compiler  (Read 6123 times)

Offline lubos

  • Almost regular
  • **
  • Posts: 131
how to visual c++ 2005 compiler
« on: September 05, 2006, 07:45:00 pm »
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,

Offline rjmyst3

  • Multiple posting newcomer
  • *
  • Posts: 117
    • wxFormBuilder
Re: how to visual c++ 2005 compiler
« Reply #1 on: September 05, 2006, 08:48:48 pm »
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.

Offline lubos

  • Almost regular
  • **
  • Posts: 131
Re: how to visual c++ 2005 compiler
« Reply #2 on: September 05, 2006, 09:14:42 pm »
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

Offline rjmyst3

  • Multiple posting newcomer
  • *
  • Posts: 117
    • wxFormBuilder
Re: how to visual c++ 2005 compiler
« Reply #3 on: September 05, 2006, 09:42:47 pm »
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.

Offline lubos

  • Almost regular
  • **
  • Posts: 131
Re: how to visual c++ 2005 compiler
« Reply #4 on: September 06, 2006, 04:39:33 pm »
you are great! it compile and run fine, thank you a lot!  :lol: :lol: :lol: :lol:

Offline lubos

  • Almost regular
  • **
  • Posts: 131
Re: how to visual c++ 2005 compiler
« Reply #5 on: September 06, 2006, 05:03:21 pm »
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??

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: how to visual c++ 2005 compiler
« Reply #6 on: September 06, 2006, 05:36:59 pm »
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...

Offline lubos

  • Almost regular
  • **
  • Posts: 131
Re: how to visual c++ 2005 compiler
« Reply #7 on: September 06, 2006, 05:43:42 pm »
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
« Last Edit: September 06, 2006, 05:50:26 pm by lubos »