I'm trying to compile and link a program to test parapin.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "parapin.h"
int main(int argc, char *argv[])
{ ...
Code:
lib$ cd /usr/lib
lib$ ls -al libparapin*
-rwxr-xr-x 1 root root 2602 Dec 18 09:57 libparapin.a
When I compile, I get:
Code:
noppp$ gcc -O -lparapin -o testpp test.c
/tmp/cc3tvN9s.o: In function `main':
test.c:(.text+0x19): undefined reference to `pin_init_user'
test.c:(.text+0x3d): undefined reference to `pin_input_mode'
test.c:(.text+0x49): undefined reference to `pin_output_mode'
test.c:(.text+0x69): undefined reference to `set_pin'
test.c:(.text+0x75): undefined reference to `clear_pin'
test.c:(.text+0x81): undefined reference to `pin_is_set'
collect2: ld returned 1 exit status
It looks like the library is found (no error anyway) but the functions in it are not seen. Text at the beginning of libparapin.a includes function names as used in the test program, and parapin.h declares them.
What am I missing?
TIA