wxmsw30u_gcc_custom.dll is missing, can't run exe Topic is solved

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
DodoSerebro
In need of some credit
In need of some credit
Posts: 1
Joined: Sun Apr 06, 2014 1:40 pm

wxmsw30u_gcc_custom.dll is missing, can't run exe

Post by DodoSerebro » Wed Apr 23, 2014 7:33 pm

Hi,

We have created a project, and I wish to export the exe only to someone who does not have wxWidget nor Code::Blocks 13.12 installed (nor any compiler)

but just wants to test our program (sorta like the .jar file). when I try to run this the .exe found in the Bin > RELEASE folder it gives me this problem

Image

Any help please

User avatar
doublemax
Moderator
Moderator
Posts: 15170
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxmsw30u_gcc_custom.dll is missing, can't run exe

Post by doublemax » Wed Apr 23, 2014 8:14 pm

You either have to ship the DLLs together with your application or use static linking (SHARED=0 when building both the wxWidgets libraries and your application).
Use the source, Luke!

sly_chandan
Knows some wx things
Knows some wx things
Posts: 48
Joined: Fri Sep 25, 2015 2:33 pm

Re: wxmsw30u_gcc_custom.dll is missing, can't run exe

Post by sly_chandan » Sat Oct 03, 2015 1:57 pm

I used the following command as per your instructions:

mingw32-make -f makefile.gcc SHARED=0 UNICODE=1 MONOLITHIC=1 RUNTIME_LIBS=static BUILD=release

But now the wxWidgets application isn't compiling.
I get an error at wx/setup.h: no such file or directory.

Am I running the right command???

Please help.

sly_chandan
Knows some wx things
Knows some wx things
Posts: 48
Joined: Fri Sep 25, 2015 2:33 pm

Re: wxmsw30u_gcc_custom.dll is missing, can't run exe

Post by sly_chandan » Tue Oct 06, 2015 7:00 am

I solved the dll problem.....

Run the following command:
mingw32-make -j8 -f makefile.gcc BUILD=release SHARED=1 UNICODE=1 VENDOR=custom MONOLITHIC=1

The dll file will be generated......

User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2293
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania
Contact:

Re: wxmsw30u_gcc_custom.dll is missing, can't run exe

Post by evstevemd » Fri Oct 16, 2015 2:06 pm

sly_chandan wrote:I used the following command as per your instructions:

mingw32-make -f makefile.gcc SHARED=0 UNICODE=1 MONOLITHIC=1 RUNTIME_LIBS=static BUILD=release

But now the wxWidgets application isn't compiling.
I get an error at wx/setup.h: no such file or directory.

Am I running the right command???

Please help.
what is "RUNTIME_LIBS=static" supposed to do? IMHO there is no such flag
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 19.04/Windows 10 Pro/MacOS 10.13 - GCC/MinGW/Clang, CodeLite IDE]

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2566
Joined: Sun Jan 03, 2010 5:45 pm

Re: wxmsw30u_gcc_custom.dll is missing, can't run exe

Post by PB » Fri Oct 16, 2015 4:02 pm

evstevemd wrote:what is "RUNTIME_LIBS=static" supposed to do? IMHO there is no such flag
The flag exists but is not used for GCC:
RUNTIME_LIBS=static
Links static version of C and C++ runtime libraries into the executable, so that the program does not depend on DLLs provided with the compiler (e.g. Visual C++'s msvcrt.dll or Borland's cc3250mt.dll). Caution: Do not use static runtime libraries when building DLL (SHARED=1)!

User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2293
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania
Contact:

Re: wxmsw30u_gcc_custom.dll is missing, can't run exe

Post by evstevemd » Fri Oct 16, 2015 4:43 pm

PB wrote: The flag exists but is not used for GCC:
I think that explains it. I have never Used MSVC (I hated it the first days I tried to learn VS)
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 19.04/Windows 10 Pro/MacOS 10.13 - GCC/MinGW/Clang, CodeLite IDE]

SSteven
Earned a small fee
Earned a small fee
Posts: 15
Joined: Fri Sep 04, 2015 7:03 am

Re: wxmsw30u_gcc_custom.dll is missing, can't run exe

Post by SSteven » Sat Oct 17, 2015 4:02 pm

Doublemaxx wrote:
"You either have to ship the DLLs together with your application or use static linking (SHARED=0 when building both the wxWidgets libraries and your application)."

I tried this on my PC. It appears that the exes and the DLLs must be in the same folder. If so, it works. Otherwise, it won't.

Can the configuration be setup so that the DLLs are in 1 folder, but the exes are in separate folders, and can reference the DLLs from the DLL folder? In a typical installation (in my environment), the exes would need to be in multiple folders (related to their respective applications), and would need to access the wx DLLs from the wx DLL folder, and also perhaps other DLLs from other apps. Can such a config be setup and if so, how?

Thanks.
Steven

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2566
Joined: Sun Jan 03, 2010 5:45 pm

Re: wxmsw30u_gcc_custom.dll is missing, can't run exe

Post by PB » Sat Oct 17, 2015 6:47 pm

I believe that the load-time linked DLLs are pretty much always put in the same folder as the EXE(s). If they are not, the standard search order is used by the Windows to locate them.

User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2293
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania
Contact:

Re: wxmsw30u_gcc_custom.dll is missing, can't run exe

Post by evstevemd » Sat Oct 17, 2015 6:49 pm

Put dll somewhere and tell installer to add that particular path to the "system path"
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 19.04/Windows 10 Pro/MacOS 10.13 - GCC/MinGW/Clang, CodeLite IDE]

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2566
Joined: Sun Jan 03, 2010 5:45 pm

Re: wxmsw30u_gcc_custom.dll is missing, can't run exe

Post by PB » Sat Oct 17, 2015 7:16 pm

evstevemd wrote:Put dll somewhere and tell installer to add that particular path to the "system path"
Generally speaking, that may not be the best idea with common libraries. You risk that some other application added itself into the %PATH% before you and the Windows may load their version of the library which can have the same name but had been built differently, see the DLL search order in my previous post. You may also look up the term "DLL Hell".

This can be somewhat avoided by naming your wxWidgets DLLs uniquely, e.g. building them with a custom VENDOR (see WXWIN/docs/msw/install.txt). Unless really necessary I would recommend sticking to putting load-time linked DLLs and EXEs to the same directory. It may not be pretty but there is a reason why the applications from MS, Adobe and others are installed this way...

Even the allmighty MS Office has all its applications and DLLs in the single folder and not in separate ones for Word, Excel, PowerPoint and so on. The point is, we are not in the MS DOS era anymore. The user does not need and should not care with what is in the application folder, having to find the executable he wants to launch by himself there: He is supposed to use application shortcuts, be it from the start menu, desktop, pinned on the taskbar...
Last edited by PB on Sat Oct 17, 2015 7:35 pm, edited 2 times in total.

User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2293
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania
Contact:

Re: wxmsw30u_gcc_custom.dll is missing, can't run exe

Post by evstevemd » Sat Oct 17, 2015 7:26 pm

@PB
Putting DLL in same dir as exe is the best and standard way. I gave that because op insisted on putting somewhere else. Naming app dlls strangely to avoid dll hell might prodyce false positives if you have Antivirus a la Avira antivir
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 19.04/Windows 10 Pro/MacOS 10.13 - GCC/MinGW/Clang, CodeLite IDE]

Post Reply