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?
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?
I have never seen this behaviour before.
Any clues?
On Sun, 6 Aug 2023 15:54:00 +0100, The Natural Philosopher wrote:
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?
Anything wrong with the contents of the iwlib.h file? I assume it was replaced correctly by the update?
The library needs to be listed after the object files that depend on it,
not before.
On 06/08/2023 15:54, The Natural Philosopher wrote:
I have never seen this behaviour before.
Any clues?
Does it need to pick up .so files from LD_LIBRARY_PATH ?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 371 |
Nodes: | 16 (2 / 14) |
Uptime: | 175:08:56 |
Calls: | 7,915 |
Files: | 12,983 |
Messages: | 5,797,724 |