Launching exe application (wxApp)causes command line window to also be created

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
sasukenebe
In need of some credit
In need of some credit
Posts: 2
Joined: Fri Aug 03, 2018 2:30 am

Launching exe application (wxApp)causes command line window to also be created

Post by sasukenebe » Sun Aug 11, 2019 6:25 am

Hello,

I have compiled a simple hello world application consisting of a wxApp on Windows 7.

When I double click the application to launch, a command line window also appears. Closing the command line window closes the application.

If I launch the application with a command line already open, then close the command line I used to launch the application, the application closes.

Can anyone tell me what the cause of this behavior is and how I can change it so that the application is not tied to a command line.

Thanks,
sasukenebe

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

Re: Launching exe application (wxApp)causes command line window to also be created

Post by PB » Sun Aug 11, 2019 7:18 am

Hard to say if you do not tell us how did you build your application.

If I had to guess, I would say you built your application with some flavor of MinGW but did not use the -mwindows to the linker parameters of your project.

sasukenebe
In need of some credit
In need of some credit
Posts: 2
Joined: Fri Aug 03, 2018 2:30 am

Re: Launching exe application (wxApp)causes command line window to also be created

Post by sasukenebe » Sun Aug 11, 2019 10:32 pm

PB i greatly appreciate you taking the time to answer my question. You have saved me quite a bit of time. You were correct that I compiled my application with a makefile using linker options provided by a Windows port of wx-config. adding the -mwindows linker option corrected my problem. I wonder if this is a bug that should be corrected in the wx-config application for windows that I used.

For any future reference I have added my linker options (previous to adding -mwindows) below. Im moving away from windows soon, but just want something working for the meantime! Open source forever!

LINKERFLAGS = -mthreads -LC:\<Path>\wxWidgets\lib\gcc_dll -lwxmsw31u_xrc -lwxmsw31u_html -lwxmsw31u_adv -lwxmsw31u_core -lwxbase31u_xml -lwxbase31u_net -lwxbase31u -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwxregexu -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 262
Joined: Fri Nov 03, 2006 2:00 pm

Re: Launching exe application (wxApp)causes command line window to also be created

Post by stahta01 » Mon Aug 12, 2019 12:42 am

You could report to the location you got the wx-config ported to windows from; but, it might be a waste of time.

Edit: I am no longer using wx-config.exe and I know of no group other CodeLite that seemed to be using it on a regular basis.

Tim S.

Post Reply