Undefined reference

This is a discussion on Undefined reference within the C Programming forums, part of the General Programming Boards category; Originally Posted by tabstop So, do you have libgcc.a at ../../../../cygwin/opt/m68k/m68k-elf/lib? And that's a lot of up directories -- maybe ...

  1. #16
    Registered User TheEngineer's Avatar
    Join Date
    Aug 2009
    Posts
    50
    Quote Originally Posted by tabstop View Post
    So, do you have libgcc.a at ../../../../cygwin/opt/m68k/m68k-elf/lib? And that's a lot of up directories -- maybe try an absolute path instead.

    I changed it to:

    Code:
    -LC:\cygwin\opt\m68k\lib\gcc\m68k-elf\4.1.1\m68000

    Which gave the same "cannot find -lgcc" error. And yes, libgcc.a is at this directory.

    Experimenting with quotes and slash direction all gave undefined reference errors

  2. #17
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    It's been a long time since I used cygwin, but my understanding was that cygwin understood nothing about "C:\"-style drive letters. And yes, they should be / style path separators.

    If it were me, I would type "cd /" in Cygwin to get to the root directory of your cygwin filesystem and figure out where I am. I guess the path would be "/opt/m68k/lib/gcc/m68k-elf/4.1.1/m68000" (without the quotes, naturally).

  3. #18
    Registered User TheEngineer's Avatar
    Join Date
    Aug 2009
    Posts
    50
    Quote Originally Posted by tabstop View Post
    It's been a long time since I used cygwin, but my understanding was that cygwin understood nothing about "C:\"-style drive letters. And yes, they should be / style path separators.

    If it were me, I would type "cd /" in Cygwin to get to the root directory of your cygwin filesystem and figure out where I am. I guess the path would be "/opt/m68k/lib/gcc/m68k-elf/4.1.1/m68000" (without the quotes, naturally).
    Tried that and am still getting undefined reference errors...I have tried several variations also

Page 2 of 2 FirstFirst 12
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, 09:18 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21