Application Won't Launch

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
geenweb
In need of some credit
In need of some credit
Posts: 2
Joined: Tue Jan 23, 2018 10:50 pm

Application Won't Launch

Post by geenweb »

Hi,
I’m trying to setup wxWidgets for use on a Windows 7 PC. I don’t have control of the system and am trying to make it work with what’s available. I’m trying to build/compile wxWidgets-3.0.3.1 under Cygwin 1.7.15 with GCC version 4.5.3. Here are the steps I took based mostly on install.txt in docs/msw.

cd wxWidgets-3.0.3.1
mkdir build-debug
cd build-debug
export LDFLAGS=’-L /lib/w32api’
../configure –enable-debug –disable-shared –with-msw 2>&1 | tee make.log
cd samples/minimal
make 2>&1 | tee make.log

Everything builds and compiles without errors. The file minimal.exe is created which runs fine from the Cygwin shell command line. If I open the directory in Windows File Explorer It shows minimal.exe as an application and even has the wxWidgets icon associated with it. But it doesn’t launch when I double click it, or if try and open it. What am I missing?
Thanks.
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Application Won't Launch

Post by doublemax »

But it doesn’t launch when I double click it
Do you get an error message?

I don't know anything about Cygwin, but Google tells me that the most likely cause is that "cygwin.dll" is not found. Try copying it into the location of the executable.
Use the source, Luke!
User avatar
eranon
Can't get richer than this
Can't get richer than this
Posts: 867
Joined: Sun May 13, 2012 11:42 pm
Location: France
Contact:

Re: Application Won't Launch

Post by eranon »

Hello,

In a first place, the purpose of Cygwin is to ease porting of *nix-based applications to Windows a lot easier... But wxWidgets can be directly built in Windows without need of extra accomodation! On my part, I only compile under (I don't use cygwin, but it's globally equivalent) msys2 when I can't do otherwise easily (mainly when the building notes only talk about the usual "configure/make/make install" sequence).

So, to go the most direct way, you can install a MinGW package like TDM-GCC (known to well work against wxWidgets sources) under Windows, then directly invoke mingw32-make for building...

--
EDIT: Read "I don’t have control of the system" afterward... Well, so you have to educate the one holding the system (often, people go the way they know even when it's not the best option) ;)
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]
geenweb
In need of some credit
In need of some credit
Posts: 2
Joined: Tue Jan 23, 2018 10:50 pm

Re: Application Won't Launch

Post by geenweb »

Eranon, Yes this is travelling from Houston to LA via Philly. Not the way to go, but I have no choice.

Doublemax, Thanks. No messages. Turns out it needs multiple DLLs. Copied all several hundred over and it worked. Started deleting groups to see which ones were needed. I gave up after a while as it would take too long to determine the full list.

I came up with a work around. In file explorer: Create a shortcut to minimal.exe. Open the shortcut's Properties. insert "C:\cygwin\bin\run.exe " in front of what is currently in "Target". Change "Start In" to "C:\cygwin\bin".
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Application Won't Launch

Post by doublemax »

Are you sure you really need a cygwin build?
Use the source, Luke!
User avatar
eranon
Can't get richer than this
Can't get richer than this
Posts: 867
Joined: Sun May 13, 2012 11:42 pm
Location: France
Contact:

Re: Application Won't Launch

Post by eranon »

geenweb wrote:it would take too long to determine the full list.
You can use Dependency Walker to determine the dependencies.
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]
Post Reply