Page 1 of 1

Compiling WxWidgets Program in CodeBlocks without DLL?

Posted: Sat Feb 05, 2011 11:37 pm
by T_larson911
Hello, recently i compiled a program in wxWidgets. I use Codeblocks and C++, but when i compiled the program, my exe file has the wx icon and it can only run when the wxmsw28ud_gcc_custom.dll file is in the same directory or if it is in System32.
This is a problem because i would like to know if there is a way to make the program run on other windows computers, without relying on the DLL file. If there is a way, can someone please help me?
Thanks in advance :)

Posted: Sun Feb 06, 2011 6:47 am
by briceandre
First of all, I don't think you are in the proper forum. You should maybe move your subject to another one...
Edit: Moved. DavidHart

To answer your question, if you perform a dynamic link, it means that wxWidgets will be linked to your application at runtime. Thus, it is necessary that Windows finds wxWidgets lib when it launches your application.

In other words, if you perform a dll link, you are obliged to redistribute the wxWidgets dll's with your app. This does not mean that you cannot redistribute your app on another computer. It only means that you will have to copy more than one file : exe+dll's. If you want to avoid that, you can perform a static link.

The icon problem is not related to your dll stuff. Windows displays the icon that is embedded in the exe, if any. I suppose you copied a wxWidgets sample project to create your own and that it uses the default wxWidgets icon. Look for .res and .ico files in your project and try changing the icon with your custom one...

Re: Compiling WxWidgets Program in CodeBlocks without DLL?

Posted: Thu Jan 02, 2014 4:31 pm
by RobertHK
Good day. Try to build using monolithic libraries, using (a little older, but valid) instructions to: