Ask a Question related to UNIX Programming, Design and Development.
-
Johnny Shih #1
header/include files and compilers
Hi everyone,
When writing a program (say, work.c), I could simply include header
files using, for example:
#include <stdio.h>
and "gcc work.c" would compile no problem.
For the compiler such as gcc, how does it know where to find that
include file, without even having to specify paths to search using -I ?
I'd certainly think it has internally included (default) path to
/usr/include/ ? It also seems to be the case for arm-linu-gcc (cross
compiler for arm processor). What if I do not want use those header
files in my native system but the others (ie. the ones that come with
arm cross compiler package)?
In addition, if two included paths both contain the header needed (same
name but not necessary the same content). Which one does a compiler choose?
I never have understood this concept until recent I started working with
different compiler for different platform which has its own libraries
and different versions of linux kernels. And I'd get confused with
different versions of header files in my system.
I'd really appreciate if anyone could answer these questions for me.
Thanks alot!
Johnny
Johnny Shih Guest
-
intel compilers
Has anyone tried install intel's compilers on 6.04? My 'replacement headers' install, but the compiler fails to install. There is No error... -
how do I hide database connection files using PHP include files?
I have the following at the beginning of the PHP page: <?php require_once('Connections/conn.php'); ?> I want to hide the connection file,... -
Differences is using netdb.h with the cc and gcc compilers.
I have a small 'C' program that wraps up the netdb.h headers on multiple platforms. The AIX version of this code compiles beautifully using the... -
include and imagejpg() weird behavior - maybe header?
I have a function that resizes images. If I put it in the same php file that calles it it workes fine. Gives a nice thumbnail or whatever size I... -
include() header and footer
I'm ashamed that I need to ask this question. I've been using PHP for almost a year now, and have used HTML extensively in the last few years. ... -
Artie Gold #2
Re: header/include files and compilers
Johnny Shih wrote:
Sure. If your using a flavor of gcc, do a `gcc -v'. The output will refer> Hi everyone,
>
> When writing a program (say, work.c), I could simply include header
> files using, for example:
> #include <stdio.h>
>
> and "gcc work.c" would compile no problem.
>
> For the compiler such as gcc, how does it know where to find that
> include file, without even having to specify paths to search using -I ?
> I'd certainly think it has internally included (default) path to
> /usr/include/ ? It also seems to be the case for arm-linu-gcc (cross
> compiler for arm processor). What if I do not want use those header
> files in my native system but the others (ie. the ones that come with
> arm cross compiler package)?
>
> In addition, if two included paths both contain the header needed (same
> name but not necessary the same content). Which one does a compiler choose?
>
> I never have understood this concept until recent I started working with
> different compiler for different platform which has its own libraries
> and different versions of linux kernels. And I'd get confused with
> different versions of header files in my system.
>
> I'd really appreciate if anyone could answer these questions for me.
> Thanks alot!
>
to a `specs' file that will contain all such information.
HTH,
--ag
--
Artie Gold -- Austin, Texas
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
[url]http://www.newsfeed.com[/url] The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Artie Gold Guest



Reply With Quote

