Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > VS2005 to gcc

Reply
Thread Tools

VS2005 to gcc

 
 
nkomli@gmail.com
Guest
Posts: n/a
 
      06-20-2008
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?
 
Reply With Quote
 
 
 
 
Kai-Uwe Bux
Guest
Posts: n/a
 
      06-20-2008
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> 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
 
Reply With Quote
 
 
 
 
Adem24
Guest
Posts: n/a
 
      06-20-2008
"Kai-Uwe Bux" wrote
> (E-Mail Removed) wrote:
>
> > 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.


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.

> > 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.


 
Reply With Quote
 
Jim Langston
Guest
Posts: n/a
 
      06-20-2008

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.

> or somehow get a more forgiving Linux compiler or a page
> with all the nonos in gcc that are acceptable in VS?



 
Reply With Quote
 
Eric Johnson
Guest
Posts: n/a
 
      06-20-2008
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.
 
Reply With Quote
 
Federico Zenith
Guest
Posts: n/a
 
      06-27-2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(E-Mail Removed) wrote:
> 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+y7DlLcRAjOlAKCX1VWUY6f169IS49V3lE f5SCnxxACZAbXr
262FjhyAmeT7jfHo4JgB0GQ=
=bkoT
-----END PGP SIGNATURE-----
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gcc 3.4.X to Gcc 4.1.X upgrading kas C++ 1 04-22-2010 08:56 PM
GCC 3.4.3 and GCC 4.1.2 ashnin C++ 1 07-07-2008 01:10 PM
Template construction in old gcc 3.3.3 does not compile in gcc 3.4.4 eknecronzontas@yahoo.com C++ 5 09-17-2005 12:27 AM
gcc 2.95 and gcc 3.2 gouqizi.lvcha@gmail.com C++ 8 03-16-2005 02:34 AM
C99 structure initialization in gcc-2.95.3 vs gcc-3.3.1 Kevin P. Fleming C Programming 2 11-06-2003 05:15 AM



Advertisments