Linux to Windows

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
zambizzi
Earned some good credits
Earned some good credits
Posts: 115
Joined: Mon Jan 03, 2005 9:16 pm
Location: Boise Idaho
Contact:

Linux to Windows

Post by zambizzi »

I've built a small app w/ wxWidgets in Linux (wxGTK) and now I'd like to take the sources, drop them onto a Windows box, and compile them there.

What's the least painful way to do this? I have no idea how to write make files and I don't know enough about the make process to do this quickly.

I've got msys and MingGW running on Windows, can I auto-generate my make files in there and compile a win32 executable?

What's the short answer?

Thanks!

-v
VonGodric
Earned some good credits
Earned some good credits
Posts: 103
Joined: Sun Jan 30, 2005 9:31 pm
Contact:

Post by VonGodric »

Easiest way: install Dev-Cpp, install wxWidget's devpack, create project and copy your sources there and compile. No need to mess with makefiles.
geon
I live to help wx-kind
I live to help wx-kind
Posts: 189
Joined: Tue Sep 07, 2004 4:10 pm
Location: Sweden, Uppsala

Post by geon »

Get Cygwin and compile the project like you did under Linux.
zambizzi
Earned some good credits
Earned some good credits
Posts: 115
Joined: Mon Jan 03, 2005 9:16 pm
Location: Boise Idaho
Contact:

Post by zambizzi »

geon wrote:Get Cygwin and compile the project like you did under Linux.
I'm not terribly familiar w/ Cygwin, doesn't it allow me to run linux apps in windows? I built my project w/ anjuta under Gnome on Gentoo Linux, so could I run anjuta and compile and it'd create a windows executable?

Sounds *too* easy.
zambizzi
Earned some good credits
Earned some good credits
Posts: 115
Joined: Mon Jan 03, 2005 9:16 pm
Location: Boise Idaho
Contact:

Post by zambizzi »

VonGodric wrote:Easiest way: install Dev-Cpp, install wxWidget's devpack, create project and copy your sources there and compile. No need to mess with makefiles.
This is the way I figured I'd do it but I also thought that there's got to be an easier way.
geon
I live to help wx-kind
I live to help wx-kind
Posts: 189
Joined: Tue Sep 07, 2004 4:10 pm
Location: Sweden, Uppsala

Post by geon »

I'm not terribly familiar w/ Cygwin, doesn't it allow me to run linux apps in windows?
Not really. It is a bash shell, but it comes with all the tools you need to compile under windows, including a gcc version.

Your Anjuta IDE probably creates a makefile and starts gcc, right? (That's the way Dev-C++ works under windows.) You should be able to just use the same makefile yourself, something like:

Code: Select all

make MyProject
zambizzi
Earned some good credits
Earned some good credits
Posts: 115
Joined: Mon Jan 03, 2005 9:16 pm
Location: Boise Idaho
Contact:

Post by zambizzi »

geon wrote:
I'm not terribly familiar w/ Cygwin, doesn't it allow me to run linux apps in windows?
Not really. It is a bash shell, but it comes with all the tools you need to compile under windows, including a gcc version.

Your Anjuta IDE probably creates a makefile and starts gcc, right? (That's the way Dev-C++ works under windows.) You should be able to just use the same makefile yourself, something like:

Code: Select all

make MyProject
I tried that under msys and it compiles...but...it still has flags for the gtk libraries and it produces a linux binary...not a windows .exe.

I think I'll try the wx-devcpp route....a little more manual work (or so it would seem) but it'll work for sure.

Thanks!
chakkaradeepcc
Earned some good credits
Earned some good credits
Posts: 116
Joined: Mon Nov 01, 2004 6:31 pm
Location: India
Contact:

Post by chakkaradeepcc »

Hi all,

why dont u try getting the MingW compiler and win32 libraries downloaded in Linux and compile wxWidgets with i586-mingw32msvc-gcc support and then compile sample programs.....................???

i havent tried yet this out..but VLC Media Player uses this concept and produces .exe files in Linux platform itself...........IT IS PAINFUL METHOD...but once implemented , u can tell wxWidgets is gr8!...

with regards,
C.C.Chakkaradeep
zambizzi
Earned some good credits
Earned some good credits
Posts: 115
Joined: Mon Jan 03, 2005 9:16 pm
Location: Boise Idaho
Contact:

Post by zambizzi »

chakkaradeepcc wrote:Hi all,

why dont u try getting the MingW compiler and win32 libraries downloaded in Linux and compile wxWidgets with i586-mingw32msvc-gcc support and then compile sample programs.....................???

i havent tried yet this out..but VLC Media Player uses this concept and produces .exe files in Linux platform itself...........IT IS PAINFUL METHOD...but once implemented , u can tell wxWidgets is gr8!...

with regards,
C.C.Chakkaradeep
Do you mean to say cross compiling? Is that possible w/ wxWidgets?

-v
chakkaradeepcc
Earned some good credits
Earned some good credits
Posts: 116
Joined: Mon Nov 01, 2004 6:31 pm
Location: India
Contact:

Post by chakkaradeepcc »

Hi,

Yes....am speaking abt Cross Compiling..............It is possible with wxWidgets.......VLC Media Player uses this concepot using the MingW compiler and produces Windows Executable in Linux Platform itself...........There are also tutorials in wxWiki on cross-compiling using wxWidgets........

i havent tried it out becoz of other reasons..............i am not getting time to do research on this...........and have not yet started on this also.........

with regards,
C.C.Chakkaradeep
Post Reply