Thread: makefiles

  1. #1
    Registered User
    Join Date
    Dec 2003
    Posts
    2

    makefiles

    Project5 : Main.o Board.o Dalek.o Game.o Object.o Player.o
    /p/gcc3/bin/g++ -lcurses -o Main.o Board.o Dalek.o Game.o Object.o Play\
    er.o

    In my makefile I am trying to link the curses library to the various files that use it. It is not working correctly and I believe it may be a syntax issue. What is the correct syntax for using a linker in a makefile?

  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
    Get the params in the right order
    /p/gcc3/bin/g++ -o Play Main.o Board.o Dalek.o Game.o Object.o Player.o -lcurses
    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. Makefiles, GCC's -ggdb option, and Valgrind
    By Jesdisciple in forum C Programming
    Replies: 5
    Last Post: 03-14-2009, 04:25 PM
  2. Makefiles
    By TriKri in forum Windows Programming
    Replies: 3
    Last Post: 03-30-2008, 06:57 AM
  3. Benefits of makefiles
    By Ganoosh in forum C++ Programming
    Replies: 2
    Last Post: 06-27-2005, 09:42 PM
  4. programming linux with gcc, emacs, and makefiles
    By Captain Penguin in forum Linux Programming
    Replies: 1
    Last Post: 11-02-2002, 12:04 PM
  5. Help with Makefiles
    By WebmasterMattD in forum Linux Programming
    Replies: 3
    Last Post: 05-24-2002, 08:51 AM