Binding wxW.dll

General questions regarding the usage of CodeLite
Casisto
CodeLite Curious
Posts: 9
Joined: Tue May 13, 2014 8:21 pm
Genuine User: Yes
IDE Question: C++
Contact:

Binding wxW.dll

Post by Casisto »

Hi there,

I have to Compile my Sourcecode for Windows. So, when i get the EXE-File and want to run, I get a Error, saying that thw "wxw294.dll" is missing.

Is it possible to Bind the required dll's in the EXE-File in CodeLite? If It's possible, how?

I`m using CodeLite 5.1; Installed CodeLite with the Installer at Windows 8.1 and i`m using the g++ Compiler.

Thank you
Casisto
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Binding wxW.dll

Post by eranif »

You need to build wxWidgets as static library

http://en.wikipedia.org/wiki/Static_library

Eran
Make sure you have read the HOW TO POST thread
Casisto
CodeLite Curious
Posts: 9
Joined: Tue May 13, 2014 8:21 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Binding wxW.dll

Post by Casisto »

Ok, I have done this. And now?

I want to say CodeLite: "take the dll and pack it in the exe..."

And, i must say, last weak i have used Geany and at work VC++, I'm still new with the CodeLite IDE.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Binding wxW.dll

Post by eranif »

Casisto wrote:I want to say CodeLite: "take the dll and pack it in the exe..."
If you did everything properly, you should now have a new file named libwx<somethimg>.a
the .a means its an archive - now you should rebuild your application and link it against this archive and it will be part of the executable

To tell codelite to link against the new library, you need to set it in the linker settings, from:

Right click on the project icon -> settings -> common settings -> linker -> libraries

PS. you should upgrade to codelite 5.4 (codelite 6.0 will be out in a week or two), codelite 5.1 is old
http://codelite.org and click the big green icon

Eran
Make sure you have read the HOW TO POST thread
Casisto
CodeLite Curious
Posts: 9
Joined: Tue May 13, 2014 8:21 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Binding wxW.dll

Post by Casisto »

Hi there,

I've try now to add the 2 dll my exe need in the exe.
As eranif said:
Right click on the project icon -> settings -> common settings -> linker -> libraries
I've try it with:
Library Path:
C:/Users/.../V0_0_3/resources
and
Libraries:
wxbase294ud_gcc_cl.dll;wxmsw294ud_core_gcc_cl.dll
Note: "..." is for anonymization; an the DLLs are in a Resource-Folder and added to "resources" in the Project-Folder.

The Compiler and Linker don't give e a error. But when I try to use the exe, I get still the Message I need the DLLs.
Can Somebody help me?

And another Question, I have a GUI with 3 PNG, is there a way to add them to the exe too?
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Binding wxW.dll

Post by eranif »

So you now have your program compiled properly, however, when you run it, you need to make the dll accessible ( it should be in the PATH environment variable or, just copy it next to the executable )

To learn how to embed png to an executable, you shou visit the wxWidgets forum

Eran
Make sure you have read the HOW TO POST thread
Casisto
CodeLite Curious
Posts: 9
Joined: Tue May 13, 2014 8:21 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Binding wxW.dll

Post by Casisto »

Yes Sure,

but is there no way I can make a "Standalone"-Exe, so that I don't must give the DLL's with it?
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Binding wxW.dll

Post by eranif »

You can. You need to build wxWidgets as static library and not as DLL

Eran
Make sure you have read the HOW TO POST thread
Casisto
CodeLite Curious
Posts: 9
Joined: Tue May 13, 2014 8:21 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Binding wxW.dll

Post by Casisto »

Is there a "How to do" for Windows?

I get only errors when I try to compile it like described in http://wiki.wxwidgets.org/WxWidgets_Bui ... igurations
he says he dont know the command "mingw32-make"... but I have mingw installed...

And I have try it with the "wxWidgets 2.9.4 Setup.exe" from Sourceforce, now I have a filled wxWidgets-2.9.4 folder, but I dont know if I have something needful...

(Note: I`m not really fit with the Windows-OS, the last one I had was the XP, normally I'm useing Ubuntu or Fedora and there I never had problems with a installation or GTKmm... this is also the reson I'm using CodeLite5.1, there is a wxWidgets-version included...)
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Binding wxW.dll

Post by eranif »

Casisto wrote:Is there a "How to do" for Windows?
No. Since this is out of scope of codelite.
You might want to try in the wxWidgets forum
Casisto wrote: this is also the reson I'm using CodeLite5.1, there is a wxWidgets-version included...)
You can download binaries from wxWidgets SF directly. Since wx3.0 they started building binaries for MinGW

http://sourceforge.net/projects/wxwindo ... /binaries/

Eran
Make sure you have read the HOW TO POST thread
Post Reply