tags:

views:

17

answers:

1

Hey,

I'm trying to use the Libxl library in my eclipse c/c++ project. Right now I'm using the minGW compiler in eclipse.

With this following code:

Book* book = xlCreateBook();

I get this error:

/src/xls2csv.cpp:22: undefined reference to `xlCreateBookCA'

Any help would be greatly appreciated :)

A: 

You haven't got the library linked in. In Eclipse, right-click on your project and go to Properties. Next, open the Libraries section under GCC C++ Linker. In the Libraries (-l) panel add an entry with the value "xl" (I presume) and click OK. Make sure the directory in which this library is contained is in your LD_LIBRARY_PATH environment variable (you may need to restart Eclipse for this change to take effect).

Chris Dennett
Ok, I had already referenced the Cpp include files in the GNU C++ panel under preferences. I also added the path to the Library paths in eclipse. I'm using a windows system just to clarify because I forgot to mention it earlier. It still does not seem to resolve the error.
Jake88
Ohh my mistake! You were on the right track all along. Sorry about that. I got some extra help and realized that what you were referring to was the MinGW linker. I think it's working now. Thank you for your help!
Jake88