Connecting Tech Pros Worldwide Forums | Help | Site Map

compilation of header file requested ? what is that mean

yezi
Guest
 
Posts: n/a
#1: Nov 15 '05
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


Kenneth Brody
Guest
 
Posts: n/a
#2: Nov 15 '05

re: compilation of header file requested ? what is that mean


yezi wrote:
[...][color=blue]
> 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[/color]

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:ThisIsASpamTrap@gmail.com>

Singamsetty
Guest
 
Posts: n/a
#3: Nov 15 '05

re: compilation of header file requested ? what is that mean


yezi wrote:[color=blue]
> 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[/color]

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

Mark McIntyre
Guest
 
Posts: n/a
#4: Nov 15 '05

re: compilation of header file requested ? what is that mean


On 27 Oct 2005 13:50:48 -0700, in comp.lang.c , "yezi"
<ye_line@hotmail.com> wrote:
[color=blue]
>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[/color]

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 =----
yezi
Guest
 
Posts: n/a
#5: Nov 15 '05

re: compilation of header file requested ? what is that mean


This is work

Default User
Guest
 
Posts: n/a
#6: Nov 15 '05

re: compilation of header file requested ? what is that mean


yezi wrote:
[color=blue]
> This is work[/color]


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.
Mark McIntyre
Guest
 
Posts: n/a
#7: Nov 15 '05

re: compilation of header file requested ? what is that mean


On 27 Oct 2005 15:37:45 -0700, in comp.lang.c , "yezi"
<ye_line@hotmail.com> wrote:
[color=blue]
>This is work[/color]

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 =----
Closed Thread


Similar C / C++ bytes