2
votes

I installed libxl package file from offcial website. It contains header files in include_cpp folder and libxl.lib in libs folder. I am using QT(cpp) to run my project. I was able to link libxl package to QT in linux (by editing its .pro file by right clicking and adding lib path and include path.). The same in windows is not working. Sometimes it runs the console empty and later on executing again throws an error that .dll files are missing( even when I have added CONFIG += static in .pro file.) I even tried downloading static linking package of libxl and adding the .lib files to QT but still had no good luck.

3

3 Answers

2
votes

add this to the INCLUDEPATH: being careful to replace with the correct location of the library

-isystem "C:\path\to\libxl\"

and report back if that helps. this may be considered a hack but it worked for me a few times when problems arose linking boost libraries in windows

1
votes

You should be fine by adding

win32:LIBS += -LD:/PATH/TO/LIB -lxl
win32:INCLUDEPATH += D:/PATH/TO/LIBHEADERS/

to your .pro file.

1
votes

Sometimes it runs the console empty and later on executing again throws an error that .dll files are missing If application compiles cleanly without linking errors yet throwing missing dll errors on start then application can't locate dll files. Dlls should be in the same dir as app is or in dirs in your PATH environment variable. There's also "manifests" thing on windows that can prevent app from loading dll when conditions mentioned above are met. There's depends.exe tool to inspect dlls app depends on.

even when I have added CONFIG += static in .pro file. I think setting static in your project file CONFIG var don't change anything. To get static build you must compile qt with static option.