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.

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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.