VS2005 to gcc

N

nkomli

Hi, I have a simple C++ source file which works perfectly in Visual
Studio 2005. Unfortunately I have to get it compiled for use on a
remote linux machine. Using putty I get a zillion cryptic error
messages that scroll off the putty screen making it impossible to see
the first error messages. Is there a way to compile Linux executables
on Windows or somehow get a more forgiving Linux compiler or a page
with all the nonos in gcc that are acceptable in VS?
 
K

Kai-Uwe Bux

Hi, I have a simple C++ source file which works perfectly in Visual
Studio 2005. Unfortunately I have to get it compiled for use on a
remote linux machine. Using putty I get a zillion cryptic error
messages that scroll off the putty screen making it impossible to see
the first error messages.

Hint: Redirect the error messages to a file so that you can read through
them after the compiler is done.
Is there a way to compile Linux executables
on Windows

Don't know. Also: this is off-topic here. You might get better answers in a
Linux or Windows group.
or somehow get a more forgiving Linux compiler or a page
with all the nonos in gcc that are acceptable in VS?

a) Since you get a zillion messages, I venture the conjecture that there are
libraries missing on the linux box that the program requires. In that case,
it's not just about making gcc happy.

b) Specific compiler issues are best addressed on forums dedicated to those
platforms.


Best

Kai-Uwe Bux
 
A

Adem24

Hint: Redirect the error messages to a file so that you can read through
them after the compiler is done.

The OP is a so called "windows" programmer,
so you have to tell him what redirection means
and how it is done since this concept is alien to "windows" programmers.
Most of them even don't know what a shell is... :)
This is really no joke! That's what MS makes of these people,
ie. il stupido to the max.
 
J

Jim Langston

Hi, I have a simple C++ source file which works perfectly in Visual
Studio 2005. Unfortunately I have to get it compiled for use on a
remote linux machine. Using putty I get a zillion cryptic error
messages that scroll off the putty screen making it impossible to see
the first error messages

You can redirect the output to a file.
whatevercommadntocompilehere > MyOutput
then you can look at MyOutput at your leasure.
. Is there a way to compile Linux executables
on Windows

Well, DevCPP uses a more linuxesque compiler. You can donload DevCPP for
free.
 
E

Eric Johnson

In addition to what others have suggested, you may want to check out
cygwin. You can then use g++ on your Windows box, which may be a
little easier to work with than a remote Linux machine.
 
F

Federico Zenith

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, I have a simple C++ source file which works perfectly in Visual
Studio 2005. Unfortunately I have to get it compiled for use on a
remote linux machine. Using putty I get a zillion cryptic error
messages that scroll off the putty screen making it impossible to see
the first error messages. Is there a way to compile Linux executables
on Windows or somehow get a more forgiving Linux compiler or a page
with all the nonos in gcc that are acceptable in VS?

Well duh, it seems people already suggested to redirect the output but
nobody actually told you how to perform redirection in a Linux shell...
so here it goes:

g++ -o foo foo.cpp 1> output.txt 2> error.txt

The "Standard output" stream (cout) will be in output.txt, the "Standard
error" (cerr) in error.txt. They are usually mingled to screen output,
but if you redirect them like this you will see nothing on the screen.

Usually you can also scroll screen output using Shift+PgUp, but this
depends on the implementation.

As for what the errors could be, maybe you are lacking a library:

g++ -o foo foo.cpp -lmissinglibrary

If the file is not a trade secret, you can post it here so it will be
easier for us to see what is wrong with it.

Cheers,
- -Federico
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFIZM0OBIpu+y7DlLcRAjOlAKCX1VWUY6f169IS49V3lEf5SCnxxACZAbXr
262FjhyAmeT7jfHo4JgB0GQ=
=bkoT
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,227
Latest member
Daniella65

Latest Threads

Top