I'm sure this question has already been asked before but I couldn't find anything on it so...
Can someone tell me if it's possible and how to do it? Thanks.
I'm sure this question has already been asked before but I couldn't find anything on it so...
Can someone tell me if it's possible and how to do it? Thanks.
Quickest way would be to run dev-c++ within WINE.
With some effort/skill, it should be possible to install gcc hosted on linux and producing win32 executables (probably start by looking at what mingw do).
What you need to be looking for are called cross-compilers, which run on machine 'a' and produce programs for machine 'b'. It's usually the preserve of the embedded programming community, since most desktop types just compile and execute on the same machine.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
You need these packages
xmingw-binutils Tools necessary to build Win32 programs
xmingw-gcc The GNU Compiler Collection - i386-mingw32msvc-gcc only
xmingw-runtime Free Win32 runtime and import library definitions
xmingw-w32api Free headers and libraries for the Win32 API
I dunno where to find them though
Then in a console type this (make sure you are logged in as the same user that will do the compiling)
alias g++w32="/opt/xmingw/bin/i386-mingw32msvc-g++"
Now you are ready to compile your cpp for windows:
i386-mingw32msvc-g++ ./<cppname>.cpp -o <nameoffile>.exe
You might be able to ask someone with Windows to compile your program for you.
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
which tool did you use to create the code?
most of the linux tools are linux specific.
but qt is cross platform.
if you can pull it into qt designer then save it, with project options including windows support, gcc's make will be able to use the win32 targets to cross compile.
much easier than installing cygwin / mingw, or finding someone with windows AND a compatable compiler.
( most windows compilers are not compatable wiith gcc. )
cygwin is for making linux stuff useable in windows... and Dev-C++ uses GCC... or you could just have them use GCC... (there's a MingW port for windows)Originally Posted by Jaqui
they don't need a compiler compatible with GCC anyway if your code is standard... if you used all standard coding you should just be able to pass it on to any windows user (there's a few out there... just ask around) with any (c/c++) compiler and they should be able to give you the binary.
» Quickest way would be to run dev-c++ within WINE.
what about running the MingW port of GCC within WINE? would that work?
Last edited by major_small; 07-15-2005 at 05:20 AM.
Join is in our Unofficial Cprog IRC channel
Server: irc.phoenixradio.org
Channel: #Tech
Team Cprog Folding@Home: Team #43476
Download it Here
Detailed Stats Here
More Detailed Stats
52 Members so far, are YOU a member?
Current team score: 1223226 (ranked 374 of 45152)
The CBoard team is doing better than 99.16% of the other teams
Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)
Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT
it might, but since qt designer is available with most distros, and has the cross platform support, it's probably the easiest for enabling the cross compiling that gcc and g++ can do.
if it's not installed, installing a linux app and associated libs is far simpler than tweaking wine to run an app that is designed to use gcc and g++ under mingw in windows.
the hardest effective way would be to manually edit the makefile to add win32 targets to it.
then, at the bash prompt, you would only have to enter the make -windows target name