[SOLVED] Where do header files come from?

I'm a little confused about which files get included when compiling a program in C.
I made a file named "screen.h". It's pretty obvious that the compiler is trying to use a different "screen.h" than mine, especially since it compiles fine when I rename my file to "screenblarg.h".
I am making a video game using the Allegro Game Library. Here is the command I use to compile the source files:
gcc -O2 -Wall -Wextra -ansi -pedantic -c filename.c -I/usr/include
I "properly" include the necessary files, using quotes and angled brackets, for example, in "main.c":
#include <allegro.h> /* System header */
#include "screen.h" /* Local header */
I'm especially confused because there is no "screen.h" in "/usr/include".
Does this behavior make sense to anyone? Please let me know if it would help to see the actual code. Thank you!
Last edited by drcouzelis (2010-08-11 02:00:11)

tavianator wrote:
Use gcc -v to see where it's searching for include files.
Also, -I/usr/include is unnecessary, as gcc will search there for includes by default.
Thank you for your response. I don't see anything in the output of "gcc -v" that would say where it is searching for header files. (it's from the standard Arch Linux package, by the way)
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --prefix=/usr --enable-languages=c,c++,fortran,objc,obj-c++,ada --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-gnu-unique-object --enable-lto --enable-plugin --disable-multilib --disable-libstdcxx-pch --with-system-zlib --with-ppl --with-cloog --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info
Thread model: posix
gcc version 4.5.0 20100610 (prerelease) (GCC)
As for including "-I/usr/include", I understand that it's not necessary. It comes from the Allegro command "allegro-config --cflags" in my makefile, which I added to make compiling my program a bit more portable.
There are two other files on my computer named "screen.h". I tried renaming them, but my program would still not compile.
A search on the Internet doesn't say anything about a common "screen.h" file in Linux.
Does the compiler "see" header files (such as a "screen.h") in the libraries that are in "/usr/lib"? Or something? O_o

Similar Messages

  • Where did these tracks come from?

    I was helping a friend hook up his IPOD. His IPOD was given to him by a friend. ITUNES was already on his PC.
    When I connected the IPOD, ITUNES started "converting" a bunch of songs from one format to antoher. It took so long I had to cancel it. But already there were about 10 albums that had been "converted" and now appeared in his library.
    I just assumed these were songs from his IPOD. But when I browsed the IPOD using the ipod screen, it shows up empty.
    (1) Where did these songs come from?
    (2) How would I get the rest of the songs, wherever they are?
    (NOTE FYI -- I also am having a problem updating, can't update ipod, option is greyed out. I tried "restoring" the ipod, no help. I didn't do a reset because I did't know how. I will when I return)

    I'm always willing to be proven wrong, but to my understanding iTunes will under no circumstances add music from your iPod into the library on the PC. There is no supported way to move music from the iPod to the PC.
    There are, however, 3rd party applications that will do this.
    As for where the imported music was coming from, my guess would be an existing Mp3 or wma music collection the person had on their PC. If itunes searched the pc for music when it first was installed, and found files not in .m4a format, it would convert them and import them into the library.
    What are the tracks? It could have even been importing the sample music or system sounds that come with windows, I suppose.

  • Where is the data come from when BW extract data from APO's MSP

    Hi,all.
       The APO system has many datasource,I have activated all the datasource with TCODE RSA5.
      I want to extract APO data to BW(Not APO's),where the APO data come from for BW extract,APO BW or SAP transparent table of APO or APO liveCache?
      PLZ help me,thank you very much.

    Hi,
    APO to BI Data Flow :
    1. Normally APO  DS  naming convention start with "9".
    2. Normally Planning area will provide the data for the DS.
    3. Using one T-Code ( /N/SAP/ ..... Ask APO Person) DS will be generated .In the specified T-Code you will provide the relavant 
        Planning area and DS will be generated.
    4.As you know RSA3 is for checing the data for DS.If you found there is no data for some fields then you will check the data at the planning area level (In R/3 table level).
    Regards
    Ram.

  • Where do array Methods Come From?

    I've been curious about this for awhile. I can't find anything useful on google; all I end up with are array tutorials, which don't go into the "meat and potatoes" of my question at all.
    It's probably easiest to point out what I'm asking by posting the following first:
    public class TestArray{
       public static void main(String [] args){
          String [] catSounds = {"meow", "purr", "growl"};
          System.out.println(catSounds.toString());
          System.out.println("length: " + catSounds.length);
    }Okay, so given a basic String array (could be an array of anything, including primitives, but I just used String for simplicity's sake), we can call functions on it, like toString above. However, for lack of better wording, where does that method come from? I used eclipse's "open declaration" feature on the method, and it took me to toString in Object. But I didn't think a basic array was an Object?
    Similarly, where is the length field stored (eclipse's "open declaration" feature doesn't work on it)? It has to be encapsulated by some class somewhere, right?
    Is there a hidden class that extends Object (duh) and encapsulates the information for an array, and does the java compiler just translate the array syntax into calls to that class? Or am I missing something?

    kevinaworkman wrote:
    That link explains some of it. It explains all of it. ;o)
    So was I correct when I said there's a "hidden" (inaccessible and not listed in the API) class that extends Object and encapsulates the array data?Sort of yes, sort of no.
    10.8 Class Objects for Arrays
    Every array has an associated Class object, shared with all other arrays with the same component type. The direct superclass of an array type is Object. Every array type implements the interfaces Cloneable and java.io.Serializable.
    There isn't a general single Array class the way you're thinking (java.lang.reflect.Array isn't what you're looking for). Arrays have special support in the Java language, as described in the JLS.
    Why go through the trouble of having special syntax for an array if there's a class that could have been used just like any other class?Tradition.
    ~

  • Where does skype signal come from

    Okay, I have skype finally. But after reading skype info I still didn't get an idea of how it works. Basically where does the signal come from. Is it like a cellphone or do you have to be near something. Oddly enough, there's no real explanation on these forums. Or at least the ones I've read. It seems that its VOIP, whatever that is. Does it need wireless, or cells... can I call to someone driving in my car or get a call from someone. What are the limitations? Confused.  

    Skype is a VoIP provider.  VoIP providers use Internet access in order to make phone calls.  If you are home you can use your phone's WiFi to obtain Internet access from your home's wireless router.  If you are not you can use either your phone's  2G/3G/4G data plan or the Internet from any WI-Fi access point you have access to in the area.

  • Does anyone know where this BAPI definition come from?

    Hi, All,
    See below example definition for BAPI_FUNCLOC_GETLIST for business object FunctionalLocation and method GetList.
    <doc:FunctionalLocation.GetList xmlns:doc="urn:sap-com:document:sap:business" xmlns="">
    <MaintplantRa>
    <item>
    <SIGN></SIGN>
    <OPTION></OPTION>
    <LOW></LOW>
    <HIGH></HIGH>
    </item>
    </MaintplantRa>
    <PlangroupRa>
    <item>
    <SIGN></SIGN>
    <OPTION></OPTION>
    <LOW></LOW>
    <HIGH></HIGH>
    </item>
    </PlangroupRa>
    <DescriptRa>
    <item>
    <SIGN></SIGN>
    <OPTION></OPTION>
    <LOW></LOW>
    <HIGH></HIGH>
    </item>
    </DescriptRa>
    <FunclocRa>
    <item>
    <SIGN></SIGN>
    <OPTION></OPTION>
    <LOW></LOW>
    <HIGH></HIGH>
    </item>
    </FunclocRa>
    <SortfieldRa>
    <item>
    <SIGN></SIGN>
    <OPTION></OPTION>
    <LOW></LOW>
    <HIGH></HIGH>
    </item>
    </SortfieldRa>
    <PlanplantRa>
    <item>
    <SIGN></SIGN>
    <OPTION></OPTION>
    <LOW></LOW>
    <HIGH></HIGH>
    </item>
    </PlanplantRa>
    <FunclocList>
    <item>
    <FUNCTLOCATION></FUNCTLOCATION>
    <FUNCLOC></FUNCLOC>
    <LABEL_SYST></LABEL_SYST>
    <DESCRIPT></DESCRIPT>
    <STRIND></STRIND>
    <CATEGORY></CATEGORY>
    <SUPFLOC></SUPFLOC>
    <PLANPLANT></PLANPLANT>
    <MAINTPLANT></MAINTPLANT>
    <PLANGROUP></PLANGROUP>
    <SORTFIELD></SORTFIELD>
    </item>
    </FunclocList>
    </doc:FunctionalLocation.GetList>
    Does anyone know where this BAPI definition come from? How do i get this BAPI definition from SAP? Does SAP still support the BAPI definition like this? Thanks a lot!

    > Does anyone know where this BAPI definition come from? How do i get this BAPI definition from SAP? Does SAP still support the BAPI definition like this? Thanks a lot!
    Hi,
    If you are wondering, how BAPIs/RFCs come into XI system then below are few points to be considered.
    1. First of all there should be a connection between XI & R3 system to communicate with each other.
    2. Scecondly the BAPIs/RFCs in R3 system should be "Remote enabled".
    3. Login to Integratin Repository then open your corresponding namespace and expand Imported Objects then right click on RFCs and press continue. It will ask you to provide the IP address, User ID & passord of R3 system. Once you provide the correct authonication details it will return al list of all BAPIS/RFCs present in R3 system. Just select you BAPI and continue. Once it is done you can see you corresponding BAPI under Imported objects.
    I hope the above information will help you.
    Regards,
    Sarvesh

  • Where did debug console come from and is it a good thing?, Where did debug console come from and is it a good thing?

    Where did debug console come from and is it a good thing? Should I keep it on?

    Unless you are a programmer or web developer, it really serves no purpose. To turn it off, open the Settings app and select Safari, Advanced (scroll down to get to it), slide the button to turn it off.

  • Where does the data come from which powers the ship date and delivery date

    Hi All,
    Please let me know, where does the data come from which powers the ship date and delivery date?.
    Adi.

    Hi,
    DELIVERY DATE  will be maintain in the SALES DOCUMENT TYPES in VOV8 in the tab REQUESTED DELIVERY DATE/PRICING DAE/PURCHASE ORDER DATE.
    The field is PROPOSE DELIVERY DATE .
    If you check the field then the document created date will be the Requested date and will be carried from ORDER TO DELIVERY.
    If you want the delivery date other thann the CURRENT date then you have to maintain the LEAD TIME in days in the same tab.
    SHIP DATE: is the date on which you do the PGI in the delivery .
    Please check them and revert back if u need further details
    thanks,
    santosh

  • Where did these *.tmp files come from?

    Hi all,
    When i run my web application under tomcat, i noticed that there are handards of temp files with name like "scb_14064.tmp", "srt_14077.tmp" are generated under my %tomcat_home%/temp folder. I am very sure that in did not use any temp files in my program, where on earth does these from come from and how to prevent them?

    I will try to put keywords so people find this thread.
    Thanks to liaoyunhe we found "fast" the origin of our problem.
    The problem is itself related to the usage of Microsoft's JDBC driver for SQL 2000 service pack 3 (�why to use M$-$QL on java?).
    We currently use the same code with Postgres and also with JTDS drivers and there is no such problem.
    What liaoyunhe says is absolutely true: you have to close ALL resultsets and ALL statements so there is no problem with the srt scb files.
    We were stressing the application and after a while we got an "Too many files open" exception and we were able to count 39.000 srt+scb files with lsof.
    After carefully reviewing our code, we found that we were not closing one resultset on a connection we re-use and the tmps were created and not released.
    Thanks again liaoyunhe.
    Thanks Micro$oft for giving us some extra work :-)

  • Extending the Insert Bar: where do the labels come from?

    Very much a beginner with Extensions; just a simple question about items on the Insert Bar.
    When I look at the content of 'insertbar.xml', the entry for 'Heading 1' is this:
    <button MMString:label="insertbar/textH1" MMString:name="insertbar/textH1" file="Text\H1.htm" id="DW_Text_H1" image="Text\H1.gif" />
    So my question is, how does the button on the Insert Bar read 'Heading 1'? That text appears nowhere in the 'insertbar.xml' document, nor is it in 'menus.xml', so it must come from somewhere else.
    I haven't found any reference to this in 'Extending Dreamweaver', and a content search of the Configurations folder yields zero as well. Any help is appreciated.

    Strings specified using MMString: have been separated out so they can be localized for different languages. They are compiled and stored in: [install-dir]/[lang]/Resources/strings.zbin (where lang is something like "en_US").
    If your extension is just for 1 language or is non-localizable text, then change "MMString:label" to "label" and put the text directly in insertbar.xml.
    If you want to make your extension for multiple languages, then store the strings in the [install-dir]/[lang]/Configuration/Strings folder and reference them by id. Take a look at the XML files in that fodler as an example.
    HTH,
    Randy

  • [SOLVED] Location of header files (for vmware tools)

    Attempting to install VMWare Tools (http://www.vmware.com/support/ws5/doc/w … linux.html) for my Archlinux guest, encountered this question:
    What is the location of the directory of C header files that match your running
    kernel? [/usr/src/linux/include]
    I found a few old posts saying to use the AUR package, but I can't per my divisions linux server policies (no non-official repositories). Are these included by default, or do I need to get them via some package? Is this kernels-26-headers package, or similar?
    Last edited by Intrepidus (2010-10-25 22:38:07)

    Thanks, that got me a bit farther than before. I've now gone from that error to this error:
    The directory of kernel headers (version @@VMWARE@@ UTS_RELEASE) does not match your running kernel (version 2.6.35-ARCH). Even if the module were to compile successfully, it would not load into the running kernel.
    This was after pointing it to /usr/src/linux-2.6.35-ARCH/include. Any ideas what the story is now?
    EDIT: Had to copy utsrelease.h and autoconf.h to version.h and autoconf.h, respectively, to /usr/src/linux-2.6.35-ARCH/include/linux.
    Last edited by Intrepidus (2010-10-25 22:17:10)

  • When typing a text message my iPhone 4 now speaks some of the words as I type.  Where did this feature come from and how do I turn it off?

    When typing a text message on my iPhone, a voice now speaks some of the words.  Where did this come from and how do I turn it off?

    You have VoiceOver turned on.  See p. 230... http://manuals.info.apple.com/en_US/iPhone_iOS4_User_Guide.pdf

  • Where does album art come from?

    I had assumed that the album artwork that iTunes 7 provided would only be from music available on iTunes. It made sense; no Beatles artwork, no AC/DC, no Led Zep. However, some albums that aren't available at the iTunes store automatically appear. Most notably, of all things, the album "Conquer the Video Craze"; an obscure record that teaches you how to play Pac-Man and Stargate. When I saw that THIS appeared, I started checking others. There are a lot of albums that aren't available on iTunes, yet the artwork is downloaded. Where does it come from?

    I also could download artwork of albums which are not available in the Dutch iTunes Store (the only one available for my purchases).
    Searching in other Stores I found the albums, so I guess the artwork has to be stored on a central server or the artwork request is redirected to others Stores' servers.
    No information is known to me where it actually comes from.
    M

  • Disable "This file comes from another computer"

    Hi, on all my adobe forms when i click on the properties, I see the message
       "This file came from another computer and might be blocked to help protect this computer"
     ever since i started getting this message, adobe forms don't work anymore and throws an error that the document properties have changed. I searched for a solution for this, but found many for fixing on Vista enterprise, but i run a vista home basic version. What do i need to do to resovle this issue that i can start using adobe forms again.
     any solution is highly appreciated.

    Describe the problem I am having in Detail. OK.
    IE10 will not download a file. END. Error given is, "bla bla bla file could not be downloaded."
    Wow...that tells me a lot??
    I have to agree with others here. I have also encountered this same issue today. Cannot even download a friggin PDF. Absolutely ridiculous. Stop with all this security crap, because all it does is slow down
    my workforce while they all try and figure out whats going on. We as users do not write this software, MS does. So why is it we the users have to jump through a zillion hoops to make your crap work. You (MS) should be doing this. 
    I used Chrome and guess what....it just works. Safari...just works......firefox../.just works.....MS IE whatever version never works right
    The ONLY reason I would still need IE, is if I need to get to some MS site where once again, MS has created the Monopoly situation where I can ONLY use IE to get to these sites. Utterly bogus. No wonder everyone is beginning to hate you.
    Another item is your new Compatibility view. Another nightmare to deal with. Managing my domain through various web interfaces, and I am always having to switch between modes depending on the application. Another huge waste of time.
    Think I'll be going the way of Russia, and completely remove any and all Windows systems from our environment forever. 
    MS HAS BECOME MY BIGGEST TIME WASTER AS I CONTINUALLY HAVE TO TROUBLESHOOT CRAP LIKE THIS.

  • My fiancé had her ex boyfriend recommended to her in Game Center (friends) where does recommended friends come from ; Facebook, contacts, or previous gaming with him?

    My fiancé had her ex boy friend in her recommendations from Game Center where does recommendations come from ; Facebook, contacts, or past gaming?

    That's a good thought that could explain some cases, but not mine: these people definitely don't know my email address, and I'm not in their Address Book. (Some of these are people I might meet on a hike, say, and nod to in passing on other hikes once a or twice a year, and that's the extent of the "relationship"--no contact info ever exchanged. We don't even know what cities each other are from.)
    we don't even know each others' email addresses, and even if we did, my Apple ID email is not one I use for actual emailing purposes. Nor do we know each others' phone numbers, nor gaming nicknames; often not even last names.
    I should correct my first post: I said I "do now know well"... that should be "do NOT know well".

Maybe you are looking for