Page 1 of 1

My wxWidgets application doesn't run in other computers,why?

Posted: Sun Mar 19, 2006 8:16 pm
by idhan
Hi..

I have created successful an wxWidgets application using Microsoft Visual Studio 2005 but when trying to run my .exe in another computer appears the message:

"The applicaci

Posted: Sun Mar 19, 2006 8:48 pm
by protocol
One thing is to make sure you link the libraries statically.

Posted: Sun Mar 19, 2006 9:08 pm
by idhan
can you explain to me more please? :lol:

Posted: Sun Mar 19, 2006 9:20 pm
by protocol
When you compile an application you can link the libraries you are programming against (wxBase, etc) either statically or dynamically.

If you like the compiled code dynamically the end user will need to have the libraries on the computer you are using your app on (so that the app can link to the code).

But if you compile it statically then the libraries are embedded inside of the assembly. The only drawback is the output size. Depending on how many different libraries you are using the size can be huge, but it usually is not big.

Static builds, you do not need extrernal files, just the exe is enough.

Dynamic builds, you will need the libraries within the exe's path.

configure wxWidgets with: ./configure --disable-shared

Posted: Sun Mar 19, 2006 9:52 pm
by idhan
Hi :),

I understand the static and dynamic libraries, nevertheless, I spoke to
do it under vc++ 2005. Bacause "./configure --diseable-shared" works under linux and mac. But I didn't find any flag under "setup.h" for wxwidgets 6.2 under windows to compile it again for static library.

Do you know how can I do that under windows?

Posted: Sun Mar 19, 2006 10:41 pm
by protocol

Posted: Mon Mar 20, 2006 12:47 am
by idhan
I am using MICROSOFT VISUAL STUDIO 2005 and I compile wxWidgets using this IDE. :wink:

Posted: Mon Mar 20, 2006 2:10 am
by emarti
Hi,
I am using wxVCExpressIntegration to build my project. (has auto-configuration)

You must search for wxVCExpressIntegration this site.

Generally, it is problem that forget msvcrt8.dll.

Posted: Mon Mar 20, 2006 2:13 am
by emarti

Posted: Mon Mar 20, 2006 8:33 am
by idhan
didn't works because I am using microsoft visual studio 2005 profesional... :(

Posted: Mon Mar 20, 2006 9:23 pm
by emarti
Ok, You are using MVS 2005. Make sure you link the libraries statically. Please, Build Library statically with using "nmake" again. Edit "config.vc"
in wxwidgets/build/msw folder.

Posted: Mon Mar 20, 2006 10:46 pm
by idhan
Upcase help me to solve the problem..

I have change the compilation option from "Multithread DLL" to "Multithread" for the "Realse" and "Debug" version of wxWidgets and I get perfect compilations using static libraries...

Thanks for all the comments.... :D