473,396 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

compilation of header file requested ? what is that mean

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
6 10952
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
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
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
This is work

Nov 15 '05 #5
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Chris Mantoulidis | last post by:
Seperate compilation (that's what it's called, right?) seems to be quite popular, so I decided to get some info about it, and (d'oh) use it... But it's whole structure seems weird to me... ...
11
by: Steven T. Hatton | last post by:
I've made no secret of the fact that I really dislike the C preprocessor in C++. No aspect of the language has caused me more trouble. No aspect of the language has cause more code I've read to be...
12
by: blueblueblue2005 | last post by:
Hi, here is an example I copied from Deitel C++ book. but when I compile it, always get the above compilation error, no matter how I change the include order, please help. here is the files:...
23
by: foodic | last post by:
Hi all I have a little bit of programming experience on windows 98 using C. But this is my first attempt to compile a program on Linux using gcc.I have two files s1.c and s1.h and while compiling...
12
by: wanghz | last post by:
Hi, Could I ask some questions about the conditional compilaion? Suppose I have three simple files: a.c, b.c and c.h /* --------a.c--------- */ #include <stdio.h> #include "c.h" int...
0
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen....
1
by: Clocker | last post by:
Hello, I never practiced C++ development in VC++.net before. (only Unix) what does the error: d:\C++\UMath\UAlgebra.cpp(71): fatal error C1010: unexpected end of file while looking for...
2
by: Annie | last post by:
hello guys, I have a header file in the form of user control (.ascx) that all my pages inherit from it. I have a textbox that i need to access it from all the pages actually i show there user...
5
by: Mikael S. H. | last post by:
Header file compilation I'm coding a small irc bot, and I've noticed that compilation takes very long when I add certain header files (compared to compilation time without). I've tried to find...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.