Author Topic: linker error  (Read 7712 times)

Scott

  • Guest
linker error
« on: April 25, 2005, 03:51:16 pm »
Hello everyone,

I am using codeblocks with the Visual C++ toolkit , but when I try to compile a program I get  linker errors:

Project   : Win 32 Application
Compiler  : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin\
--------------------------------------------------------------------------------
link.exe /nologo   /LIBPATH:"C:\\Program Files\\Microsoft Visual C++ Toolkit 2003\\lib" /LIBPATH:"C:\\Program Files\\Microsoft SDK\\Lib"  /out:"win32gui.exe"   /LIBPATH:"C:\\Program Files\\Microsoft Visual C++ Toolkit 2003\\lib" /LIBPATH:"C:\\Program Files\\Microsoft SDK\\Lib"  ".objs\\main.obj"    gdi32.lib comdlg32.lib wsock32.lib winspool.lib winmm.lib shell32.lib comctl32.lib advapi32.lib opengl32.lib glu32.lib ole32.lib oleaut32.lib uuid.lib gdi32.lib comdlg32.lib wsock32.lib winspool.lib winmm.lib shell32.lib comctl32.lib advapi32.lib opengl32.lib glu32.lib ole32.lib oleaut32.lib uuid.lib /subsystem:windows
main.obj : error LNK2019: unresolved external symbol __imp__DispatchMessageA@4 referenced in function _WinMain@16
main.obj : error LNK2019: unresolved external symbol __imp__TranslateMessage@4 referenced in function _WinMain@16
main.obj : error LNK2019: unresolved external symbol __imp__GetMessageA@16 referenced in function _WinMain@16
main.obj : error LNK2019: unresolved external symbol __imp__ShowWindow@8 referenced in function _WinMain@16
main.obj : error LNK2019: unresolved external symbol __imp__CreateWindowExA@48 referenced in function _WinMain@16
main.obj : error LNK2019: unresolved external symbol __imp__RegisterClassExA@4 referenced in function _WinMain@16
main.obj : error LNK2019: unresolved external symbol __imp__LoadCursorA@8 referenced in function _WinMain@16
main.obj : error LNK2019: unresolved external symbol __imp__LoadIconA@8 referenced in function _WinMain@16
main.obj : error LNK2019: unresolved external symbol __imp__DefWindowProcA@16 referenced in function "long __stdcall WindowProcedure(struct HWND__ *,unsigned int,unsigned int,long)" (?WindowProcedure@@YGJPAUHWND__@@IIJ@Z)
main.obj : error LNK2019: unresolved external symbol __imp__PostQuitMessage@4 referenced in function "long __stdcall WindowProcedure(struct HWND__ *,unsigned int,unsigned int,long)" (?WindowProcedure@@YGJPAUHWND__@@IIJ@Z)
win32gui.exe : fatal error LNK1120: 10 unresolved externals
Process terminated with status 1 (0 minutes, 0 seconds)
 
Does anybody know how I could fix this, please?

Scott

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
linker error
« Reply #1 on: April 25, 2005, 03:56:14 pm »
Add user32.lib in the link libraries...

Yiannis.
Be patient!
This bug will be fixed soon...

Scott

  • Guest
linker error
« Reply #2 on: April 25, 2005, 04:23:58 pm »
It worked !

Thank you.

Anonymous

  • Guest
linker error
« Reply #3 on: April 25, 2005, 06:21:21 pm »
Just a question, Scott. Does this happen everytime you create a new project (from template)?