By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,433 Members | 1,649 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,433 IT Pros & Developers. It's quick & easy.

compilation of header file requested ? what is that mean

P: n/a
Hi:

I code a main function in one file "nlp.c"
code defination of variabla in one file "nlp.h"

I use "

gcc nlp.c -o nlp.out ; no error message;

I use :

gcc nlp.c nlp.out nlp.h -lm ;

the message is :

compilation of header file requested
WOuld you give me some hint of that , thanks

Nov 15 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
yezi wrote:
[...]
gcc nlp.c nlp.out nlp.h -lm ;

the message is :

compilation of header file requested

WOuld you give me some hint of that , thanks


My guess would be that you are telling gcc to compile "nlp.h" and gcc
is saying "why do you want to compile a .h file?"

Though I'm also curious why you are trying to compile a file called
"nlp.out", and why gcc didn't say something about that one as well.

--
+-------------------------+--------------------+-----------------------------+
| Kenneth J. Brody | www.hvcomputer.com | |
| kenbrody/at\spamcop.net | www.fptech.com | #include <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------------+
Don't e-mail me at: <mailto:Th*************@gmail.com>

Nov 15 '05 #2

P: n/a
yezi wrote:
Hi:

I code a main function in one file "nlp.c"
code defination of variabla in one file "nlp.h"

I use "

gcc nlp.c -o nlp.out ; no error message;

I use :

gcc nlp.c nlp.out nlp.h -lm ;

the message is :

compilation of header file requested
WOuld you give me some hint of that , thanks


Don't give ".h" files as arguments to gcc. Instead add

#include "nlp.h"

at the beginning of your nlp.c file. Now run

gcc nlp.c -lm -o nlp.out

- Hemanth

Nov 15 '05 #3

P: n/a
On 27 Oct 2005 13:50:48 -0700, in comp.lang.c , "yezi"
<ye*****@hotmail.com> wrote:
I use :

gcc nlp.c nlp.out nlp.h -lm ;

the message is :

compilation of header file requested
WOuld you give me some hint of that , thanks


This is strictly a question about how gcc works, and isn't topical
here. One of hte gnu groups is a possible location to start.

However you may also want to think hard about what an include file is,
and how it gets included, and whether trying to compile it is actually
necessary.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 15 '05 #4

P: n/a
This is work

Nov 15 '05 #5

P: n/a
yezi wrote:
This is work

Yeah, well, nothing comes for free.
Brian

--
Please quote enough of the previous message for context. To do so from
Google, click "show options" and use the Reply shown in the expanded
header.
Nov 15 '05 #6

P: n/a
On 27 Oct 2005 15:37:45 -0700, in comp.lang.c , "yezi"
<ye*****@hotmail.com> wrote:
This is work


What is?

"Please quote enough of the previous message for context. To do so
from Google, click "show options" and use the Reply shown in the
expanded header."
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 15 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.