Linking Error

For developers writing C++, Fortran, Java, code who have questions or comments to make.

Moderators: silvia, selimgunay, Moderators

Post Reply
ingsessa
Posts: 2
Joined: Mon Jun 11, 2007 1:51 pm
Location: Berkeley

Linking Error

Post by ingsessa »

I'm afraid I encountered a linker problem by compiling OpenSees. I posted a message in another topic and my email notified me an answer but there is no one, so I try again.

I'm compiling OpenSees 1.7.3 with VC 2005 Express and Windows XP 2002 Home with SP2. I added VC2005noerr.cpp to the project and rebuilt all but I encountered the following error again:

Code: Select all

Linking...
LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/FORCE' specification
renderer.lib(OpenGlDevice.obj) : error LNK2019: unresolved external symbol __imp__DefWindowProcA@16 referenced in function "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)
renderer.lib(OpenGlDevice.obj) : error LNK2019: unresolved external symbol __imp__EndPai nt@8 referenced in function "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)
renderer.lib(OpenGlDevice.obj) : error LNK2019: unresolved external symbol __imp__BeginPai nt@8 referenced in function "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)
renderer.lib(OpenGlDevice.obj) : error LNK2019: unresolved external symbol __imp__MessageBoxA@16 referenced in function "int __cdecl oglSetPixelFormat(struct HDC__ *,unsigned char,unsigned long)" (?oglSetPixelFormat@@YAHPAUHDC__@@EK@Z)
renderer.lib(OpenGlDevice.obj) : error LNK2019: unresolved external symbol __imp__GetDC@4 referenced in function "struct HWND__ * __cdecl oglCreateWindow(char *,int,int,int,int,struct HGLRC__ * *,struct HDC__ * *)" (?oglCreateWindow@@YAPAUHWND__@@PADHHHHPAPAUHGLRC__@@PAPAUHDC__@@@Z)
renderer.lib(OpenGlDevice.obj) : error LNK2019: unresolved external symbol __imp__UpdateWindow@4 referenced in function "struct HWND__ * __cdecl oglCreateWindow(char *,int,int,int,int,struct HGLRC__ * *,struct HDC__ * *)" (?oglCreateWindow@@YAPAUHWND__@@PADHHHHPAPAUHGLRC__@@PAPAUHDC__@@@Z)
renderer.lib(OpenGlDevice.obj) : error LNK2019: unresolved external symbol __imp__ShowWindow@8 referenced in function "struct HWND__ * __cdecl oglCreateWindow(char *,int,int,int,int,struct HGLRC__ * *,struct HDC__ * *)" (?oglCreateWindow@@YAPAUHWND__@@PADHHHHPAPAUHGLRC__@@PAPAUHDC__@@@Z)
renderer.lib(OpenGlDevice.obj) : error LNK2019: unresolved external symbol __imp__CreateWindowExA@48 referenced in function "struct HWND__ * __cdecl oglCreateWindow(char *,int,int,int,int,struct HGLRC__ * *,struct HDC__ * *)" (?oglCreateWindow@@YAPAUHWND__@@PADHHHHPAPAUHGLRC__@@PAPAUHDC__@@@Z)
renderer.lib(OpenGlDevice.obj) : error LNK2019: unresolved external symbol __imp__RegisterClassA@4 referenced in function "struct HWND__ * __cdecl oglCreateWindow(char *,int,int,int,int,struct HGLRC__ * *,struct HDC__ * *)" (?oglCreateWindow@@YAPAUHWND__@@PADHHHHPAPAUHGLRC__@@PAPAUHDC__@@@Z)
renderer.lib(OpenGlDevice.obj) : error LNK2019: unresolved external symbol __imp__LoadCursorA@8 referenced in function "struct HWND__ * __cdecl oglCreateWindow(char *,int,int,int,int,struct HGLRC__ * *,struct HDC__ * *)" (?oglCreateWindow@@YAPAUHWND__@@PADHHHHPAPAUHGLRC__@@PAPAUHDC__@@@Z)
renderer.lib(OpenGlDevice.obj) : error LNK2019: unresolved external symbol __imp__LoadIconA@8 referenced in function "struct HWND__ * __cdecl oglCreateWindow(char *,int,int,int,int,struct HGLRC__ * *,struct HDC__ * *)" (?oglCreateWindow@@YAPAUHWND__@@PADHHHHPAPAUHGLRC__@@PAPAUHDC__@@@Z)
renderer.lib(OpenGlDevice.obj) : error LNK2019: unresolved external symbol __imp__UnregisterClassA@8 referenced in function "int __cdecl oglDestroyWindow(char *,struct HWND__ *,struct HGLRC__ *,struct HDC__ *)" (?oglDestroyWindow@@YAHPADPAUHWND__@@PAUHGLRC__@@PAUHDC__@@@Z)
renderer.lib(OpenGlDevice.obj) : error LNK2019: unresolved external symbol __imp__DestroyWindow@4 referenced in function "int __cdecl oglDestroyWindow(char *,struct HWND__ *,struct HGLRC__ *,struct HDC__ *)" (?oglDestroyWindow@@YAHPADPAUHWND__@@PAUHGLRC__@@PAUHDC__@@@Z)
renderer.lib(OpenGlDevice.obj) : error LNK2019: unresolved external symbol __imp__ReleaseDC@8 referenced in function "int __cdecl oglDestroyWindow(char *,struct HWND__ *,struct HGLRC__ *,struct HDC__ *)" (?oglDestroyWindow@@YAHPADPAUHWND__@@PAUHGLRC__@@PAUHDC__@@@Z)
.\..\..\bin/openSees.exe : fatal error LNK1120: 14 unresolved externals
Build log was saved at "file://c:\Program Files\OS\OpenSees_Rel\Win32\obj\openSees\debug\BuildLog.htm"
openSees - 15 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 22 up-to-date, 0 skipped ==========
it seems that I'm missing some libraries.
Does anybody know what's wrong?
Thanks in advance.
opensees33
Posts: 6
Joined: Tue Oct 23, 2007 1:30 am

Post by opensees33 »

Hi Friend
I have some error by compiling OpenSees it show linking error every time .in order to find the solution of this problem i have send a mail thriugh the forum but still this problem not solved.
I love opensees
dryden
Posts: 1
Joined: Thu Jan 18, 2007 10:34 am
Location: Applied Research Associates, Inc.

Post by dryden »

You can try the following:

1. Add \OpenSees\Win32\VC2005errno.cpp to your project.

2. Under OpenSees -> Linker -> Input -> Additional Dependencies

Add User32.lib and Gdi32.lib
rjaeger
Posts: 102
Joined: Thu Aug 31, 2006 9:57 pm
Location: UC Davis

Post by rjaeger »

Hello,

From what you posted, it looks like one of the projects has failed to compile. You should go through the output to see which of the 23 projects failed to compile (if it's not just the opensees project) and let us know. There will probably be more error messages within that section as well.

I have had a similar problem as well and I fixed it by getting the Microsoft platform SDK since it includes all of the necessary OpenGL libraries. Please see this website: http://msdn2.microsoft.com/en-us/express/aa700755.aspx

-Robbie
Post Reply