Its been a bad day for coding. Fixed one problem by writing debug code deleted debug code and problem is back.
But that's not the issue. This issues is conceptually simple.
I want to use a library. specifically the libiw library
I install the library using apt-get install libiw-dev
I include the file <iwlib.h>
The source code compiles fine, so its found iwlib.h Or at least I assume so. When I try to link with -liw though, it simple barfs on any reference to the library.
I found libiw.so, and it contains all the right symbols.
gcc doesn't say it cannot find the libary, only that it *cannot match the symbols*.
Specifically
gcc -liw -o scan scan.o /usr/bin/ld: scan.o: in function `main': scan.c:(.text+0x1f): undefined reference to `iw_sockets_open' /usr/bin/ld: scan.c:(.text+0x40): undefined reference to `iw_get_range_info' /usr/bin/ld: scan.c:(.text+0x7f): undefined reference to `iw_scan' collect2: error: ld returned 1 exit status
I have never seen this behaviour before. Any clues?