Menu

Linking Problem?

Help
2006-03-14
2015-10-23
  • Nobody/Anonymous

    Hi.  I'm trying to compile a simple test program, and I'm getting the following error, presumably from the linker:

    $ gcc -DLINUX auto_hood.c
    /tmp/cc6D52sd.o(.text+0x8): In function `rBenchmark':
    undefined reference to `seconds'
    /tmp/cc6D52sd.o(.text+0x12): In function `rBenchmark':
    undefined reference to `thirds'
    /tmp/cc6D52sd.o(.text+0x8d): In function `rBenchmark':
    undefined reference to `daveReadBytes'
    /tmp/cc6D52sd.o(.text+0xf4): In function `rBenchmark':
    undefined reference to `thirds'
    /tmp/cc6D52sd.o(.text+0xfd): In function `rBenchmark':
    undefined reference to `seconds'
    /tmp/cc6D52sd.o(.text+0x113): In function `rBenchmark':
    undefined reference to `seconds'
    /tmp/cc6D52sd.o(.text+0x11d): In function `rBenchmark':
    undefined reference to `thirds'
    /tmp/cc6D52sd.o(.text+0x178): In function `rBenchmark':
    undefined reference to `daveReadBytes'
    /tmp/cc6D52sd.o(.text+0x1df): In function `rBenchmark':
    undefined reference to `thirds'
    /tmp/cc6D52sd.o(.text+0x1e8): In function `rBenchmark':
    undefined reference to `seconds'
    /tmp/cc6D52sd.o(.text+0x203): In function `rBenchmark':
    undefined reference to `seconds'
    /tmp/cc6D52sd.o(.text+0x20d): In function `rBenchmark':
    undefined reference to `thirds'
    /tmp/cc6D52sd.o(.text+0x24d): In function `rBenchmark':
    undefined reference to `davePrepareReadRequest'
    /tmp/cc6D52sd.o(.text+0x278): In function `rBenchmark':
    undefined reference to `daveAddVarToReadRequest'
    /tmp/cc6D52sd.o(.text+0x2a3): In function `rBenchmark':
    undefined reference to `daveAddVarToReadRequest'
    /tmp/cc6D52sd.o(.text+0x2ce): In function `rBenchmark':
    undefined reference to `daveAddVarToReadRequest'
    /tmp/cc6D52sd.o(.text+0x2f7): In function `rBenchmark':
    undefined reference to `daveAddVarToReadRequest'
    /tmp/cc6D52sd.o(.text+0x320): In function `rBenchmark':
    undefined reference to `daveAddVarToReadRequest'
    /tmp/cc6D52sd.o(.text+0x33a): In function `rBenchmark':
    undefined reference to `daveExecReadRequest'
    /tmp/cc6D52sd.o(.text+0x34e): In function `rBenchmark':
    undefined reference to `daveStrerror'
    /tmp/cc6D52sd.o(.text+0x3cc): In function `rBenchmark':
    undefined reference to `thirds'
    /tmp/cc6D52sd.o(.text+0x3d5): In function `rBenchmark':
    undefined reference to `seconds'
    /tmp/cc6D52sd.o(.text+0x460): In function `wBenchmark':
    undefined reference to `daveWriteBytes'
    /tmp/cc6D52sd.o(.text+0x518): In function `wBenchmark':
    undefined reference to `daveWriteBytes'
    /tmp/cc6D52sd.o(.text+0x59d): In function `main':
    undefined reference to `daveSetDebug'
    /tmp/cc6D52sd.o(.text+0x5bf): In function `main':
    undefined reference to `openSocket'
    /tmp/cc6D52sd.o(.text+0x603): In function `main':
    undefined reference to `daveNewInterface'
    /tmp/cc6D52sd.o(.text+0x619): In function `main':
    undefined reference to `daveSetTimeout'
    /tmp/cc6D52sd.o(.text+0x63b): In function `main':
    undefined reference to `daveNewConnection'
    /tmp/cc6D52sd.o(.text+0x649): In function `main':
    undefined reference to `daveConnectPLC'
    /tmp/cc6D52sd.o(.text+0x68c): In function `main':
    undefined reference to `daveReadBits'
    /tmp/cc6D52sd.o(.text+0x69a): In function `main':
    undefined reference to `daveStrerror'
    collect2: ld returned 1 exit status

    This seems like a simple problem, but I don't enough about what's going on here solve it on my own.  Please help.  Thanks, Jimmy.

     
    • Nobody/Anonymous

      Nevermind,
      I learned how to use make :-)

       
  • Anonymous

    Anonymous - 2015-10-23
    Post awaiting moderation.

Anonymous
Anonymous

Add attachments
Cancel