How to make executable for WinXP?

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
interessato
In need of some credit
In need of some credit
Posts: 9
Joined: Sat Nov 19, 2005 11:29 pm

How to make executable for WinXP?

Post by interessato »

Hi ... I have made a simple application and I've sent it to my friend to try it .... I builded my soution using VC 2005 Beta with wxWidgets 2.6.2 ... but my friend gets an error message like 'file corrupted' or 'executable configured badly' or something like that (it isn't problem of badly transfered executable) ... I don't know if he has to instal wxWidget libraries or I can build my solution that all WinXP machines can execute it without getting additional libraries ... Need help. Thank you
benedicte
wxWorld Domination!
wxWorld Domination!
Posts: 1409
Joined: Wed Jan 19, 2005 3:44 pm
Location: Paris, France

Post by benedicte »

Did you link your app with wxWidgets statically or dynamically? In other words, did you use .lib or .dll for wxWidgets in your app?
interessato
In need of some credit
In need of some credit
Posts: 9
Joined: Sat Nov 19, 2005 11:29 pm

Post by interessato »

I THINK it's linked dynamically (how can I see it in VC?) and I use libs (I guess) ... but how can I know that exactly (I'm not sured if what I know is correct)
benedicte
wxWorld Domination!
wxWorld Domination!
Posts: 1409
Joined: Wed Jan 19, 2005 3:44 pm
Location: Paris, France

Post by benedicte »

using .lib files means linking statically, using .dll means linking dynamically.

If you link statically, you can deliver your .exe app with no other file (except help/resources files that you may need explicitely in your app).
If you link dynamically,
  • *either you deliver the .dll files (and install them in the /Windows[/system] folder, or in your app folder),
    *or you consider the .dll is already present on the remote computer (system library, or a library the user must compile/install by himself)
Check which wx Libraries you have compiled (in wx\lib\vc_lib), and the one you use in your app project (Project Properties/Linker/Input/Additionnal Dependencies).
interessato
In need of some credit
In need of some credit
Posts: 9
Joined: Sat Nov 19, 2005 11:29 pm

Post by interessato »

OK. But I still don't know if I use .libs or .dlls ...
My Additional Dependencies:
wxmsw26_core.lib
wxbase26.lib
wxtiff.lib
wxjpeg.lib
wxpng.lib
wxzlib.lib
wxregex.lib
wxexpat.lib
winmm.lib
comctl32.lib
rpcrt4.lib
wsock32.lib
oleacc.lib
odbc32.lib
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
comdlg32.lib
advapi32.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
odbccp32.lib
But I don't know if that explicitly says that I use them in Release linking ...
interessato
In need of some credit
In need of some credit
Posts: 9
Joined: Sat Nov 19, 2005 11:29 pm

Post by interessato »

and I have compiled all of them in wx\lib\vc_lib dir
lowjoel
Part Of The Furniture
Part Of The Furniture
Posts: 1511
Joined: Sun Jun 19, 2005 11:37 am
Location: Singapore
Contact:

Post by lowjoel »

do you see a wxmsw26_vc_<something>.dll?
interessato
In need of some credit
In need of some credit
Posts: 9
Joined: Sat Nov 19, 2005 11:29 pm

Post by interessato »

lowjoel wrote:do you see a wxmsw26_vc_<something>.dll?
Nope I can't find that one niether in /lib/vc_lib/ nor in Additional dependencies ...
benedicte
wxWorld Domination!
wxWorld Domination!
Posts: 1409
Joined: Wed Jan 19, 2005 3:44 pm
Location: Paris, France

Post by benedicte »

if your wx....lib (in additionnal dependencies) also appear in the Release target (change from Debug to Release in the top combo in the Properties page), then, you use them in Release, too.
interessato
In need of some credit
In need of some credit
Posts: 9
Joined: Sat Nov 19, 2005 11:29 pm

Post by interessato »

benedicte wrote:if your wx....lib (in additionnal dependencies) also appear in the Release target (change from Debug to Release in the top combo in the Properties page), then, you use them in Release, too.
Is there some option in VC that says explicitly to link statically or VC when doesn't find some library in AddDependency list links then dynamically ?
interessato
In need of some credit
In need of some credit
Posts: 9
Joined: Sat Nov 19, 2005 11:29 pm

Post by interessato »

benedicte wrote:if your wx....lib (in additionnal dependencies) also appear in the Release target (change from Debug to Release in the top combo in the Properties page), then, you use them in Release, too.
I have done it before.
interessato
In need of some credit
In need of some credit
Posts: 9
Joined: Sat Nov 19, 2005 11:29 pm

Post by interessato »

This is my VC command line for linker:
/OUT:"C:\Documents and Settings\acer\Desktop\*****\proj****\Release\macro.exe" /NOLOGO /LIBPATH:"C:\evolution\wxWidgets-2.6.2\lib" /LIBPATH:"C:\evolution\wxWidgets-2.6.2\contrib\lib" /LIBPATH:"C:\evolution\wxWidgets-2.6.2\lib\vc_lib" /MANIFEST /MANIFESTFILE:"Release\macro.exe.intermediate.manifest" /MACHINE:X86 /ERRORREPORT:PROMPT wxmsw26_core.lib wxbase26.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib winmm.lib comctl32.lib rpcrt4.lib wsock32.lib oleacc.lib odbc32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

and compiler:
/O2 /I "C:\evolution\wxWidgets-2.6.2\include" /I "C:\evolution\wxWidgets-2.6.2\lib\vc_lib\mswd" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D "WINVER=0x0400" /D "STRICT" /FD /EHsc /MD /Fo"Release\\" /Fd"Release\vc80.pdb" /nologo /c /TP /errorReport:prompt
benedicte
wxWorld Domination!
wxWorld Domination!
Posts: 1409
Joined: Wed Jan 19, 2005 3:44 pm
Location: Paris, France

Post by benedicte »

interessato wrote:This is my VC command line for linker:
/OUT:"C:\Documents and Settings\acer\Desktop\*****\proj****\Release\macro.exe" /NOLOGO /LIBPATH:"C:\evolution\wxWidgets-2.6.2\lib" /LIBPATH:"C:\evolution\wxWidgets-2.6.2\contrib\lib" /LIBPATH:"C:\evolution\wxWidgets-2.6.2\lib\vc_lib" /MANIFEST /MANIFESTFILE:"Release\macro.exe.intermediate.manifest" /MACHINE:X86 /ERRORREPORT:PROMPT wxmsw26_core.lib wxbase26.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib winmm.lib comctl32.lib rpcrt4.lib wsock32.lib oleacc.lib odbc32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

and compiler:
/O2 /I "C:\evolution\wxWidgets-2.6.2\include" /I "C:\evolution\wxWidgets-2.6.2\lib\vc_lib\mswd" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D "WINVER=0x0400" /D "STRICT" /FD /EHsc /MD /Fo"Release" /Fd"Release\vc80.pdb" /nologo /c /TP /errorReport:prompt
so fine ! all your wx....lib files appear in the linker step so you link statically with all these files.
If Visual Studio cannot find one of the .lib files, you'll get an error message, so if you can build your .exe, everything works well.

Now, you have to know the exact error message, it may be not related to wx.
interessato
In need of some credit
In need of some credit
Posts: 9
Joined: Sat Nov 19, 2005 11:29 pm

Post by interessato »

This is error message when the application is executed on other machine (winXP):
Y:\...\program.exe
This application has failed to start because the application
configuration is incorrect. Reinstalling the application may fix this
problem.
chris
I live to help wx-kind
I live to help wx-kind
Posts: 150
Joined: Fri Oct 08, 2004 2:05 pm
Location: Europe

Post by chris »

Hi,

this seems to be triggered by a corrupted Manifest file. It's not very clear how this can happen, so I'm afraid I can be of any specific help here.
You may want to try generating a new Manifest and hope the error goes away then.

HTH, Chris

P.S.: See http://msdn.microsoft.com/library/defau ... ifests.asp
for an example Manifest.

Edit:

http://forums.microsoft.com/MSDN/ShowPo ... 5&SiteID=1 has some discussion on that. That should get you started.
this->signature=NULL;
Post Reply