English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I´ve recently downloaded cygwin in order to compile c++ files on WindowsXP, i downloaded the g++ package and i have actived it ( g++ -v on dos comand line), g++ is recognized as a command from dos command line, but when i try to complile a file, it does not send any message and any error but it does not create any EXE file neithier, could some one help me? (I apologize if my english is no so good, thats because i am learning)

2007-03-08 15:23:36 · 4 answers · asked by Anonymous in Computers & Internet Programming & Design

4 answers

Bad idea. Cygwin isn't useful unless you need an entire emulation layer for POSIX.

You should have downloaded MinGW (http://sourceforge.net/projects/mingw).

g++ on Cygwin doesn't create an exe because an exe works only on windows. You want MinGW which will ink exe files for you. Cygwin will get you *NIX like files.

2007-03-08 16:17:58 · answer #1 · answered by csanon 6 · 0 0

On Unix, "g++ myprogram.cpp" by default always creates a file called "a.out" -- not "myprogram". Cygwin follows the same model: "g++ myprogram.cpp" always creates "a.exe".

So what you typically do is use the "-o programname" option (cygwin assumes a ".exe" extension):

g++ -o myprogram myprogram.cpp

The result of this is myprogram.exe.

2007-03-09 00:21:33 · answer #2 · answered by Mike 2 · 0 0

if you dont specify an output file via the -o switch .. the compiler defaults to a.exe .. without seeing your command line and what switches you using to compile it is difficult to proceed.

2007-03-08 23:34:05 · answer #3 · answered by Netjackal 1 · 0 0

hey, dont use cywig its not that good of a compiler

use Visual Studios C++, its a better compiler when using windows
you can download it for free

http://msdn.microsoft.com/vstudio/express/downloads/default.aspx

:)

2007-03-08 23:28:50 · answer #4 · answered by dragongml 3 · 0 0

fedest.com, questions and answers