Thread: Need to find a header file

  1. #1
    Registered User
    Join Date
    Oct 2016
    Posts
    4

    Need to find a header file

    A code file has an include
    Code:
    #include    "commisc.h"
    . This header file is not in the same directory as most of the other header files. The make file has the line
    Code:
    STAR_CCF2WAIS_LIBS = $(NET_LIBS)
    , which I suspect may tell me where the commisc.h file is. How do I find NET_LIBS?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    There's too little information to help you.

    How about telling us the name of the project you're attempting to compile.

    You could try just commenting out the mystery include file and see what error messages you get. For all you know, it could be obsolete and unused.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Oct 2016
    Posts
    4
    Salem, FWIW, the project's name is ccf2wais. The code currently only exists on the production server. I am trying to set it up locally so I can do maintenance work on it, without making my experimental changes directly on live code. My IDE is giving me an error because 'Symbol 'WARNING' could not be resolved.' There are several header files for which I'm getting the warnings like, "Unresolved inclusion: "commisc.h"". If I can find commisc.h on the server, I bet the other missing ones are in the same place.

  4. #4
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    So, the code on the production server gets compiled on the server rather than compiled elsewhere with the binary pushed to the server? If so, then the makefile (or other relevant build system file) should give you a clue as to where are the directories searched for include files.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  5. #5
    Registered User
    Join Date
    Oct 2016
    Posts
    4
    Correct, the code on the production server gets compiled on the server. The make file has the line
    Code:
    STAR_CCF2WAIS_LIBS = $(NET_LIBS)
    How do I find NET_LIBS?

  6. #6
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    So why aren't you asking your work colleagues, instead of random internet strangers who have no knowledge of your "production server" or anything else about how your company organises it's code.

    Start by talking to the person who gave you the assignment, and explain to them that you can't find this header file.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  7. #7
    Registered User
    Join Date
    Oct 2016
    Posts
    4
    I can't answer your question directly, because it (and the suggestion) is making invalid assumptions. I would be able to answer the logically prior question, "Have you asked your work colleagues?", however.


    On the other hand, even though you don't know the answer to my question, maybe someone else does. For example, for compiling directly through GCC, there is an answer. Perhaps there is also one for Make.

    Programmers find two things insurmountably difficult:

    1. Admitting they don't know the answer to a question;
    2. Not responding to a question if they don't know the answer.

  8. #8
    Registered User
    Join Date
    May 2010
    Posts
    4,633
    So what exactly are you asking?

    What exactly do you seem to be missing?
    STAR_CCF2WAIS_LIBS = $(NET_LIBS)
    The above might help you find the library location, however it will probably not help you find the location of the header file. For the header file you should look in your make file for an entry for that header. A header file is not the library and a library is usually not a header file.

    By the way that header is not a standard header, it is probably only available on your companies systems. Either somewhere on the server or somewhere on the system used to build the "project". So you will probably need to search your server and/or the build system to find the location of the header.

    Lastly drop the attitude if you really want help. Your best avenue for help for these issues will be someone familiar with your system, not some random stranger that has no idea how that proprietary build system is setup.

    Jim

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How do you find header of a function?
    By yougene in forum C Programming
    Replies: 4
    Last Post: 06-02-2009, 04:20 PM
  2. Replies: 30
    Last Post: 06-19-2006, 12:35 AM
  3. Replies: 4
    Last Post: 12-14-2005, 02:21 PM
  4. Can't find Header File!
    By HowardS. in forum C++ Programming
    Replies: 5
    Last Post: 04-03-2002, 06:59 PM
  5. Where to find the code for Header File FUnctions
    By vsriharsha in forum C Programming
    Replies: 1
    Last Post: 04-02-2002, 12:37 PM

Tags for this Thread