Undefined reference to `xlCreateBookCA' C++
I'm trying to use the Libxl library in my eclipse c/c++ project. Right now I'm using the minGW com开发者_如何转开发piler 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 :)
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).
精彩评论