0

Hi,
i am trying to use a library. included the header in my code set the path (-L) and the library (-l), but i get the following error and a bunch of undefined symbols. Does anyone have an idea? What am i doing wrong? Thans in advance.


PB:~/Downloads/lp_solve_5.5.0.11_c max$ gcc -L/Users/max/Library/lp_solve -llpsolve55 implicit.c
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: warning empty table of contents: /Users/max/Library/lp_solve/liblpsolve55.a (can't load from it)
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: Undefined symbols:
_default_basis
_del_column
_del_constraint
_delete_lp
.......asf.

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by kabbo
0

Hi,
i am trying to use a library. included the header in my code set the path (-L) and the library (-l), but i get the following error and a bunch of undefined symbols. Does anyone have an idea? What am i doing wrong? Thans in advance.


PB:~/Downloads/lp_solve_5.5.0.11_c max$ gcc -L/Users/max/Library/lp_solve -llpsolve55 implicit.c
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: warning empty table of contents: /Users/max/Library/lp_solve/liblpsolve55.a (can't load from it)
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: Undefined symbols:
_default_basis
_del_column
_del_constraint
_delete_lp
.......asf.

First write in your C file

#pragma comment(lib, "library_name")

where library_name is a name of your library file.
These errors can be produced, that your library doesn't have functions and tables that you need. It can be old version or just another library.

0

It doesn't help. I can see the methods i use are defined in the header files, and judging from the api and the version number of my library, they should all be defined. Besides i have the problem with every single method i use, and not just a few.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.