🔒 Locked
Evil Linker
Advertisement
Original Post
I am working in .NET 2003. My solution consists of 4 Win32 static library projects and one Win32 executable. When I build one of the libraries, there are no errors. However, when I build my main executable, I get a linker error that a function referanced by that library has not been defined. How is this possible? The full project can be referanced at www.ezequal.com/OrigamiMan64/DOS3D.zip if it helps.
Seems that if I insert the library files into the executable project within the IDE, most of the unresolved externals resolve themselves. That may indicate that you aren''t properly linking the libraries you''re creating to the executable project.
Later,
ZE.
//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links
Later,
ZE.
//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links
yah, I noticed without the referances in the DOS3D project, there were a lot more linker errors. However, I added referances to all 4 other projects, and I still get 2 linker errors.
Yeah, I got those two as well. But it seems as if they might be legitimate; I couldn''t find a definition for LoadBitmap(char const *, Color). The other one seems to have been caused by a macro replacement of "DrawTextA" for "DrawText" (caused by WinGDI, I suspect). Consider renaming the DrawText function.
Later,
ZE.
Later,
ZE.
LoadBitmap is defined in Bitmap.cpp, in project Draw
haha, they were both window''s fault! I #undef''d their function names in my implementation files, and now everything links fine :D Thanks a bunch.
no, the problem was really that windows used the preprocessor to define their functions, and even if I did use a namespace the stupid text replace would have nullified it. I have as much right to those function names as windows does :-P
Interestingly, some of my students ran into the exact same problem in class today... goddamn #defines
It absolutely is not your fault, but its a common mistake....
And yeah, even if you did use a namespace youd still be screwed.... the legacy of #defines destroying perfectly good code continues
[edited by - psamty10 on April 20, 2004 12:12:56 AM]
And yeah, even if you did use a namespace youd still be screwed.... the legacy of #defines destroying perfectly good code continues
[edited by - psamty10 on April 20, 2004 12:12:56 AM]
Arrgh, Dev-C++ is horrible for DirectX and OpenGL because of it''s hellish linking problems. It''s horrible! 
- CD

// Brought to you by Code_Dark | [( Politics Forum Beta-Test )]
- CD

// Brought to you by Code_Dark | [( Politics Forum Beta-Test )]
quote:
Original post by Code_Dark
Arrgh, Dev-C++ is horrible for DirectX and OpenGL because of it's hellish linking problems. It's horrible!
- CD
// Brought to you by Code_Dark | [( Politics Forum Beta-Test )]![]()
That's odd. I have no problem using OpenGL with GCC. What kind of errors do you get?
[edited by - MikeMJH on April 21, 2004 1:24:01 AM]
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement