![]() Comment below or reach us via email at or via Twitter at VisualC. We would love to see what you contribute to our repo and are active on reviews and collaboration. Note that a target is a CMake construct, which could either be an executable or another library. Download the CMake Tools extension for Visual Studio Code and let us know what you think. Linking C executable gen_utility.exeĬMakeFiles\gen_utility.dir/objects.a(main.c.obj): In function `show_stripe_pattern':Ĭ:/Users/User/CLionProjects/gen_utility/main.c:33: undefined reference to `HPDF_Page_SetRGBStroke'Ĭ:/Users/User/CLionProjects/gen_utility/main.c:34: undefined reference to `HPDF_Page_SetLineWidth'Ĭ:/Users/User/CLionProjects/gen_utility/main.c:35: undefined reference to `HPDF_Page_MoveTo'Ĭ:/Users/User/CLionProjects/gen_utility/main.c:36: undefined reference to `HPDF_Page_TextWidth'īut I'm confused because Cmake seems to find the library:Ĭ:\Program Files\JetBrains\CLion 2018.2.3\bin\cmake\win\bin\cmake. Use targetlinklibraries to link libraries to a target. ![]() "C:\Program Files\JetBrains\CLion 2018.2.3\bin\cmake\win\bin\cmake.exe" -build C:\Users\User\CLionProjects\gen_utility\cmake-build-debug -target all -j 2 Boost may also already be available on your. Here is my CMakeLists.txt: cmake_minimum_required(VERSION 3.10) Popular Linux and Unix distributions such as Fedora, Debian, and NetBSD include pre-built Boost packages. The trouble is that even though Cmake finds my external library, it fails to link it with target_link_libraries. A library target name: The generated link line will have the full path to the linkable library file associated with the target. I have a small C project in Clion I have running fine in Linux that I'm trying to get running in Windows (Msys2)
0 Comments
Leave a Reply. |