LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 10-26-2004, 04:44 AM   #1
pycoucou
Member
 
Registered: Apr 2004
Location: Edinburgh
Posts: 78

Rep: Reputation: 15
[Maybe redundant] main.cpp:1:18: warning: extra tokens at end of #include directive


Hi there,

I am doing some c++ and my program is working quite fine. Unfortunately, my compilation is giving me this warning.

main.cpp:1:18: warning: extra tokens at end of #include directive

I know it's just a warning but I am sure it can be easily fixed. However, I don't understand it. Probably my header files are not 'written' properly (at least for gcc 3.2.2 under RH9.2). I haven't found something relevant on gooooooogle even if this warning seems to upset quite a lot of people.

If you know how to fix it, thanks very much for letting me know. By the way, what does "main.cpp:1:18" mean? line 18 of sth? what? the #include number 1?

Regards,
PY
 
Old 10-26-2004, 05:10 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,490

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
I guess it is line number one, 18th character.

It would help if you show us your program's first lines.
 
Old 10-26-2004, 09:57 AM   #3
pycoucou
Member
 
Registered: Apr 2004
Location: Edinburgh
Posts: 78

Original Poster
Rep: Reputation: 15
Tks you... It was a stupid ;

I am too slow ;-)
But tks for the meaning of the second numbers... Now I can get rid of the stupid charaters I added.
 
  


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
warning: no final newline at the end of /etc/fstab Jeebizz Slackware 2 10-12-2004 02:19 PM
Getting extra lib / include paths with automake MadCactus Linux - Software 0 08-21-2004 01:04 PM
warning: no newline at end of file huno Programming 1 07-16-2004 09:39 AM
%include directive in Kickstart configuration file deepika Linux - Newbie 0 07-24-2003 05:32 PM
Warning: no newline at end of file acid_kewpie Programming 1 03-13-2002 02:53 AM


All times are GMT -5. The time now is 03:33 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration