Thread: Compiler error.

  1. #1
    Novice.
    Join Date
    Oct 2005
    Posts
    88

    Compiler error.

    Hello,

    When I compile a program I get the following error:

    pim@zwart:~/C$ gcc Blakjack.c -o black
    /tmp/cc4vhl2b.o: In function `main':
    Blakjack.c.text+0x26): undefined reference to `initCardScreen'
    Blakjack.c.text+0x7b): undefined reference to `getAnts'
    collect2: ld returned 1 exit status

    Does anyone know what this means?

    Thank You,

    OmnificienT

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,665
    Do you have more than one source file in your project?
    In which case, it would be
    gcc -o prog file1.c file2.c

    If it's just a single source file, then either you didn't implement it, or you spelled it wrong (C is case sensitive, so getAnts != GetAnts
    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
    Novice.
    Join Date
    Oct 2005
    Posts
    88
    Thanks!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how do you resolve this error?
    By -EquinoX- in forum C Programming
    Replies: 32
    Last Post: 11-05-2008, 04:35 PM
  2. Making C DLL using MSVC++ 2005
    By chico1st in forum C Programming
    Replies: 26
    Last Post: 05-28-2008, 01:17 PM
  3. error: template with C linkage
    By michaels-r in forum C++ Programming
    Replies: 3
    Last Post: 05-17-2006, 08:11 AM
  4. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 10:43 AM
  5. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM