LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-27-2003, 03:42 PM   #1
Gerardoj
Member
 
Registered: May 2003
Location: Somewhere over the Rainbow
Distribution: Slackware 9.x, Knoppix, Damn Small Linux, RedHat.
Posts: 465

Rep: Reputation: 30
Emacs


Hi everyone!!
I was trying to do a "Hello World" C++ program in emacs but I have a little problem:

The Hello World code is:

#include <iostream.h>
int main()
{

cout << " Hello World " << endl;
return(0);

}

and when I compile appear me alot of error and warnings but when I compile in to M$ Visual C++ works fine.

I made a calculator in emacs and works fine I don't know what I made wrong!! Thanks for Answers!!

-----------Gerardo
 
Old 05-27-2003, 04:38 PM   #2
slightcrazed
Member
 
Registered: May 2003
Location: Lisbon Falls, Maine
Distribution: RH 8.0, 9.0, FC2 - 4, Slack 9.0 - 10.2, Knoppix 3.4 - 4.0, LFS,
Posts: 789

Rep: Reputation: 30
Re: Emacs

Quote:
Originally posted by Gerardoj
and when I compile appear me alot of error and warnings
It would help to know what errors and warnings you are receiving.

Other than that, the syntax looks fine.

slight
 
Old 05-27-2003, 04:57 PM   #3
Gerardoj
Member
 
Registered: May 2003
Location: Somewhere over the Rainbow
Distribution: Slackware 9.x, Knoppix, Damn Small Linux, RedHat.
Posts: 465

Original Poster
Rep: Reputation: 30
The Errors are:

hello.cpp:1: error de decodificación antes de `for'
hello.cpp:1:36: falta carácter terminando '
hello.cpp:1:36: aviso: constante de carácter demasiado larga
hello.cpp:2: error de decodificación antes de `to'
hello.cpp:3: error de decodificación antes de `text'
hello.cpp:3:36: falta carácter terminando '
hello.cpp:3:36: aviso: constante de carácter demasiado larga
En el fichero incluído de /usr/include/c++/3.2/backward/iostream.h:31,
de hello.cpp:5:
/usr/include/c++/3.2/backward/backward_warning.h:32:2: aviso: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use
-Wno-deprecated.
En el fichero incluído de /usr/include/c++/3.2/iosfwd:45,
de /usr/include/c++/3.2/ios:44,
de /usr/include/c++/3.2/ostream:45,
de /usr/include/c++/3.2/iostream:45,
de /usr/include/c++/3.2/backward/iostream.h:32,
de hello.cpp:5:
/usr/include/c++/3.2/bits/stringfwd.h:51: `char_traits' no es una plantilla
/usr/include/c++/3.2/bits/stringfwd.h:53: `char_traits' no es una plantilla
/usr/include/c++/3.2/bits/stringfwd.h:59: error de decodificación antes del
elemento `<'
/usr/include/c++/3.2/bits/stringfwd.h:63: error sintáctico antes del elemento
`;'
/usr/include/c++/3.2/bits/stringfwd.h:64: error sintáctico antes del elemento
`;'
En el fichero incluído de /usr/include/c++/3.2/cstddef:48,
de /usr/include/c++/3.2/cstdio:50,
de /usr/include/c++/3.2/i386-redhat-linux/bits/c++io.h:35,
de /usr/include/c++/3.2/bits/fpos.h:44,
de /usr/include/c++/3.2/iosfwd:46,
de /usr/include/c++/3.2/ios:44,
de /usr/include/c++/3.2/ostream:45,
de /usr/include/c++/3.2/iostream:45,
de /usr/include/c++/3.2/backward/iostream.h:32,
de hello.cpp:5:
/usr/lib/gcc-lib/i386-redhat-linux/3.2/include/stddef.h:147: redeclaración en
plantilla de `typedef int ptrdiff_t'
/usr/lib/gcc-lib/i386-redhat-linux/3.2/include/stddef.h:147: confusión por errores previos, saliendo

Thanks slightcrazed!!!

------------ Gerardo,
_________________________________
Linux Fast, Stable, Flexible
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
where is the .emacs file in the emacs source code tarball? aizkorri Programming 2 01-13-2007 03:05 PM
emacs not responding to .emacs file in Mandriva 2005 LE. Please help LaptopLinux Mandriva 1 06-08-2005 09:36 AM
Emacs. shayan_tabrizi Linux - Software 1 07-23-2004 08:02 AM
edb (emacs database) won't open file - emacs 20 & 21 tip184 Linux - Software 0 04-03-2004 08:31 AM
Emacs HELP! sathyan Programming 6 07-18-2003 03:55 AM


All times are GMT -5. The time now is 09:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration