Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 10-26-2004, 04:44 AM   #1
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?

Old 10-26-2004, 05:10 AM   #2
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
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
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.


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 > Forums > Non-*NIX Forums > Programming

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

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