how to compile with popt lib?
This is hopefully a simple question but after 90 minutes of googling, forum and man page perusal, I'm having a difficult time compiling an example popt program. I'm currently using the example code provided in Maverick's "$ man popt", and receiving this error:
$ gcc -o popt_test popt_test.c
popt_test.c: In function ‘main’:
popt_test.c:32: warning: passing argument 3 of ‘poptGetContext’ from incompatible pointer type
/usr/include/
/tmp/cc83vlH8.o: In function `usage':
popt_test.
/tmp/cc83vlH8.o: In function `main':
popt_test.
popt_test.
popt_test.
popt_test.
popt_test.
popt_test.
popt_test.
popt_test.
popt_test.
popt_test.
collect2: ld returned 1 exit status
I've tried to link against the object files I /think/ it's missing, namely directly adding -l/lib/libpopt.so.0 to the gcc line, but I'm having no love. Have I perhaps overlooked a necessary apt-get?
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu popt Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Kevin Hunter
- Solved:
- Last query:
- Last reply: