New to QT I added PCL using vcpkg (.\vcpkg.exe install pcl
), on x86-windows, but PCL cannot find boost, If I do a simple find_package(Boost REQUIRED)
boost is found, but if I add the other components system and filesystem as the following with my CMakeList.txt:
...
set(Boost_USE_STATIC_LIBS ON)
set(Boost_DEBUG ON)
set(Boost_NO_WARN_NEW_VERSIONS 1)
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets LinguistTools)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets LinguistTools)
set(Boost_INCLUDE_DIR C:/Users/maxim/OneDrive/Bureau/vcpkg-master/installed/x86-windows/include)
find_package(Boost REQUIRED COMPONENTS system filesystem REQUIRED)
find_package(PCL REQUIRED)
target_link_libraries(main PRIVATE ${PCL_LIBRARIES})
...
My previous error which was:
erreur : common is required but boost was not found C:/Users/maxim/OneDrive/Bureau/vcpkg-master/installed/x86-windows/share/pcl/PCLConfig.cmake:350 (pcl_report_not_found) C:/Users/maxim/OneDrive/Bureau/vcpkg-master/installed/x86-windows/share/pcl/PCLConfig.cmake:517 (find_external_library) CMakeLists.txt:26 (find_package)
On the find package PCL, is now on the find boost : Could NOT find Boost (missing: system filesystem) (found version "1.78.0")
On Qt Creator if I do the same on Projects -> Build -> Re-Configure with Initial Parameters, I have the same error
In my configuration I have added the vcpkg.make:
I have been stuck on it the whole day, I have looked other post without success but I found this post linking to this github Boost_install, from what I understand have a cmake I could use, but I can't find a way to ask my CMakeList to load/use-it? Any help would be great.
-- EDIT : Following comments, my CMake version was maybe not the correct one for my Boost version -> as shared
So, I have to specify that I want to use boost 1.77, I added a vckpg.json at the root of my project for Qt creator to call vcpkg on it. Qt couldn't access vcpkg.exe, so I added the env path to my folder containing my vcpkg.exe But vcpkg need Ninja to use vcpkg.json (you need to add the path to ninja to your environement).
--- EDIT : OK, I didn't clone the vcpkg repo, so it wasn't a .git repo, and for my vcpkg.json to work, you need to specify the git baseline :
{
"name": "showcase",
"version": "6.3.0",
"dependencies": [
"boost-system",
{
"name": "boost",
"version>=": "1.77.0"
}
],
"builtin-baseline":"2ac61f87f69f0484b8044f95ab274038fbaf7bdd"
}
(I cloned it, installed pcl, updated my path), and I followed the comments suggestion, now I can just have find_package(PCL REQUIRED)
The new problem is python3 .../python3/x64-mingw-static-rel/...
files not found, I followed the link in the error log and as sugested try to define in vcpkg.json python3 version as 3.9.6 without success.
I think the problem come from python trying to be in mingw (I'm on windows 10) because when I do a vcpkg.exe install python3
i have x86-windows
instead, and if I do a vcpkg.exe install python3 --triplet=x64-mingw-static
I got a :
ninja: error: loading 'build.ninja'
and if I search in the log :
No CMAKE_C_COMPILER could be found
-- EDIT 3 : I'm stuck I added path to Msbuil, added path to cmake (and installed it), it's failing during compilation, now Its msbuild who fail with python
\Microsoft.CppBuild.targets(439,5): error MSB8020: Les outils de génération pour external (ensemble d'outils de plateforme = 'external') sont introuvables. Pour générer à l'aide des outils de génération external, installez les outils de génération external. Vous avez également la possibilité de mettre à niveau les outils Visual Studio actuels en sélectionnant le menu Projet ou en cliquant avec le bouton droit sur la solution, puis en sélectionnant "Recibler la solution". [H:\vcpkg\buildtrees\python3\x64-mingw-static-rel\v3.10.2-c601936d22.clean\PCbuild\pythoncore.vcxproj]
I don't find a way to resolve it