Thread: undefined reference to `create

  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    50

    undefined reference to `create

    I am getting the error:

    file3.o: In function `openfile':
    file3.c.text+0x45): undefined reference to `create'
    collect2: ld returned 1 exit status


    when trying to compile a few files with the following line:

    cc file1.o file2.o file3.o -o file1

    the create function exists in file3.c. I am not sure why this error is occurring. Could anyone provide any insight? Please let me know if more context is needed. Thanks!

  2. #2
    Registered User
    Join Date
    Oct 2008
    Location
    TX
    Posts
    2,059
    Sure you don't want creat()?
    Post file3.c if it isn't too big.

  3. #3
    Registered User
    Join Date
    Feb 2010
    Posts
    50
    DOPE!!! Well, that's the last time I make that mistake. Thanks! Look for my next post asking why I can't seem to find the /user/ directory.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. Undefined Reference Compiling Error
    By AlakaAlaki in forum C++ Programming
    Replies: 1
    Last Post: 06-27-2008, 11:45 AM
  3. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  4. C OpenGL Compiler Error?
    By Matt3000 in forum C Programming
    Replies: 12
    Last Post: 07-07-2006, 04:42 PM
  5. c++ linking problem for x11
    By kron in forum Linux Programming
    Replies: 1
    Last Post: 11-19-2004, 10:18 AM