Compiling WxWidgets Program in CodeBlocks without DLL?

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
In need of some credit
In need of some credit
Posts: 1
Joined: Sat Feb 05, 2011 11:33 pm

Compiling WxWidgets Program in CodeBlocks without DLL?

Post by T_larson911 » Sat Feb 05, 2011 11:37 pm

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 :)

Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 670
Joined: Tue Aug 31, 2010 6:22 am
Location: Belgium

Post by briceandre » Sun Feb 06, 2011 6:47 am

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...

I live to help wx-kind
I live to help wx-kind
Posts: 158
Joined: Sat Dec 01, 2012 6:43 am

Re: Compiling WxWidgets Program in CodeBlocks without DLL?

Post by RobertHK » Thu Jan 02, 2014 4:31 pm

Good day. Try to build using monolithic libraries, using (a little older, but valid) instructions to:

Post Reply