I installed gsl with sudo apt-get install libgsl-dev and it is in /usr/include. Last edited by d_stranz 25th March 2020 at 20:16. I am trying to use the gsl library in C++ but I get gsl/gslsfbessel.h: No such file or directory when I run cmake -build even though it says - Found GSL: /usr/include (found version '2.7.1') in the terminal after running cmake. I mostly use Makefiles so here is the direct. Tell cmake to link against libboostprogramoptions. ![]() You can then run it standalone from a command prompt after you have CD'd to that directory. Now with that actually shown concrete example which tells us that you want Boost program options (and even more told us that you are on Ubuntu), you need to do two things: Install libboost-program-options-dev so that you can link against it. ![]() If you specify an "install()" command in your CMakelists file, you can use it to deploy your executable and the DLLs it needs to execute. It has nothing to do with telling the executable where to find those DLLs at run time. In a standalone environment, if the DLLs are not searchable via your PATH variable or are not installed as described in the Deployment documentation, the program will not run and will give the error you are seeing.Īll the TARGET_LINK_LIBRARIES() command in your CMakelists file is doing is telling CMake to link your program with the -import libraries- (.lib) to resolve any symbols that will later have to be located in the DLLs that are loaded at runtime. Running in a development environment (like Qt Creator or Visual Studio) works because the IDE has set up the paths to the DLLs and other binaries required to build and run programs. Have you read the section on Deployment in the Qt documentation? If you have any problems with the registration process or your account login, please contact us. Registration is fast, simple and absolutely free so please, join our community today! By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. You can list object files along sources in addexecutable () and addlibrary (): addexecutable (myProgram source.cpp object.o ) The only thing is that you need to use addcustomcommand to produce object files, so CMake would know where to get them. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. If it is a relative path, it will be evaluated with respect to the current output directory, but it may also be an absolute path. If you are looking for information about Qt related issue - register and post your question. Over 90 percent of questions asked here gets answered. Qt Centre is a community site devoted to programming in C++ using the Qt framework. Select the forum that you want to visit from the selection below.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |