Search code examples
c++qtlibxl

undefined reference to `xlCreateBookW'


While using the libxl library in QT(c++) I got this error

undefined reference to `xlCreateBookW'

I have tried the setup in their website, https://www.libxl.com/setup.html I added :

INCLUDEPATH = C:\libxl-4.0.4.0\include_cpp  
LIBS += C:\libxl-4.0.4.0\lib\libxl.lib 

to my project.pro and the file bin/libxl.dll to the project directory. It didn't work instead the error show up, how can I solve it please? the code is in here https://www.libxl.com/home.html , i don't know i couldn't add it


Solution

  • i solved the problem actually the customer support guy i emailed him, he told me to choose the bin which has the same version of my compiler (mine is 64bit) so you have to choose the bin and the lib also the same version and the path:

    for my case (Qt_6_2_3_MinGW_64_bit compiler ) INCLUDEPATH = C:/libxl-4.0.4.0/include_cpp LIBS += C:/libxl-4.0.4.0/lib64/libxl.lib in the .pro file also you have to copy the libxl.dll from C:\libxl-4.0.4.0\bin64 (for my case)

    and thank you.