Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / Linking problems

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Linking problems
#4921
Posted by: KaReL 2004-08-01 18:00:40
I was just able to convert my wxWidgets program from Visual Studio 6 to DevCPP.

Compilation went fine, but then!


Then came the linking...
I entered a command like:
ld Compile/Memory.o Compile/MyApp.o Compile/PreviewPane.o Compile/FrameEvtHandler.o Compile/MyFrame.o Compile/stdwx.o Compile/TaalRes.o Compile/image_functions.o Compile/Translator.o Compile/ConfigurationWindow.o Compile/Configuration.o Compile/Plugin.o Compile/Download.o Compile/ThreadWindow.o Compile/GeneralFunctions.o Compile/About.o Compile/AutoUpdate.o Compile/GetLocalVersion.o Compile/SplashScreen.o CDCoverSearch_private.res -o "CDCoverSearch.exe" -L"C:/Dev-Cpp/lib" -L"C:/Program Files/Coding/wxWidgets/lib/gcc_lib" -mi386pe -llibunicows.a -llibkernel32.a -llibuser32.a -llibws2_32.a -llibole32.a -llibcomdlg32.a -llibadvapi32.a -llibshell32.a -llibgdi32.a -llibcomctl32.a -llibrpcrt4.a -lwxmsw25u_core.a -lwxbase25u.a -lwxbase25u_net.a -lwxzlib.a -lwxjpeg.a

And then the compiler came back to me with the remark:
ld: cannot find -llibunicows
So now my question is: "WTF?" (read as: what am I doing wrong?)
------------------------
Website: www.KaReLs0ft.be
Message2. Re: Linking problems
#4927
Posted by: upCASE 2004-08-02 15:00:00
Hi!
Read the stuff in setup.h starting at line 135.
Check out http://libunicows.sourceforge.net/
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message3. Re: Linking problems
#4928
Posted by: KaReL 2004-08-02 16:41:00
That is not really the problem ;) You know I am not that much of a newbie don't you?

The problem I am facing is that it doesn't recognize ANY of my libraries... Although the directory (library path -L...) are given in the command, and all the libraries has the correct name & case.

I even tried -l"C:\Dev-CPP\Lib\libunicows" and -llibunicows and -llibunicows.a and -l"C:\Dev-CPP\Lib\libunicows.a" and -l"C:/Dev-CPP/Lib/libunicows" and -l"C:/Dev-CPP/Lib/libunicows.a"...

It's now just a coincidence that this unicows library is first (it needs to be, following the MSDN-guidelines on this matter). The strange thing is just that it won't link properly...
------------------------
Website: www.KaReLs0ft.be
Message4. Re: Linking problems
#4929
Posted by: upCASE 2004-08-02 16:52:57
Hi!
Silly me :)
Man, I really should have noticed that the first time... Gosh, must have been pretty sleepy this morning :)

Specify the path to the libs you need to use with -L"...." and use -l for the libs (Guess you allready know that :)). You problem is a "naming" one.
GCC libs have the name format lib***.a. The linker expects only the name of the lib itself without the lib***.a stuff. So, for libunicows.a add -lunicows to the list. For libwxmsw.a use -lwxmsw etc.
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message5. Re: Linking problems
#4930
Posted by: KaReL 2004-08-02 16:54:21
Aaaah!!! That will probably be the solution :D
------------------------
Website: www.KaReLs0ft.be
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Fri 2024-3-29  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0