Thread: Compiling question

  1. #1
    Registered User
    Join Date
    Aug 2009

    Compiling question

    Okay this isn't going to easy to explain but i wanted to simply my question

    I wanna be able to compile a program main.c in

    in main.c theres a header queue.h

    for queue.h the source file queue.c is in

    whats the command line to compiles together since the source and header are in different locations to where the main is and beable to run cuz right now i get
    (.text+0xa23): undefined reference to ' .........'

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    gcc -I./h main.c source/queue.c
    ought to do it.
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. another do while question
    By kbpsu in forum C++ Programming
    Replies: 3
    Last Post: 03-23-2009, 12:14 PM
  2. Question about linux compiling with GCC
    By elsheepo in forum C++ Programming
    Replies: 23
    Last Post: 03-07-2008, 11:36 PM
  3. Design layer question
    By mdoland in forum C# Programming
    Replies: 0
    Last Post: 10-19-2007, 04:22 AM
  4. opengl DC question
    By SAMSAM in forum Game Programming
    Replies: 6
    Last Post: 02-26-2003, 09:22 PM
  5. Simple Compiling question ...
    By hypertension in forum C++ Programming
    Replies: 2
    Last Post: 02-16-2003, 01:02 PM