Closed ComradeMashkov closed 5 months ago
What source for libcurl are you using?
What source for libcurl are you using?
I use curl installed via vcpkg. The path for curl binaries and headers are in my PATH variable and CMake see libcurl while configuration process, but it crashes while building if I don't explicitly link libcurl to target in the CMake file.
So it certainly does compile but I feel that I shouldn't necessarily link libcurl. It's hard for me to say what have gone wrong and I suspect that my vsg also work the wrong way (some shaders and lights are missing, map zooming is laggy).
If CMake finds the libcurl package on configuration it should work out of the box without needing any further changes. When you say it crashes while building what crashes?
I mostly use Linux for dev work and have only recently started using Windows 11 and vcpkg. I haven't yet had issues with libcurl but I'll check what version is being used. Performance is perfect on par with what I see on Windows.
Perhaps a git update on your vcpkg reoo might be helpful.
As for missing shaders and lights, without information about what exactly you are attempting to do and what results you are getting there is nothing we can do to help address these issues.
In case this helps, I've booted up my Windows 11 machine and these the packages and versions I've installed from vcpkg to work with the VSG. I did a git update of my local vcpkg repo yesterday and upgraded the packages to the latest then rebuilt the VSG projects. As I test I just ran vsgviewer.exe models/openstreetmap.vsgt
and it works fine for me, no lags or issues with lighting.
.\vcpkg.exe list
assimp:x64-windows 5.4.0 The Open Asset import library
brotli:x64-windows 1.1.0#1 a generic-purpose lossless compression algorithm...
bzip2:x64-windows 1.0.8#5 bzip2 is a freely available, patent free, high-q...
bzip2[tool]:x64-windows Builds bzip2 executable
curl:x64-windows 8.7.1#3 A library for transferring data with URLs
curl[non-http]:x64-windows Enables protocols beyond HTTP/HTTPS/HTTP2
curl[schannel]:x64-windows SSL support (Secure Channel)
curl[ssl]:x64-windows Default SSL backend
curl[sspi]:x64-windows SSPI support
draco:x64-windows 1.5.7 A library for compressing and decompressing 3D g...
freetype:x64-windows 2.13.2#1 A library to render fonts.
freetype[brotli]:x64-windows Support decompression of WOFF2 streams
freetype[bzip2]:x64-windows Support bzip2 compressed fonts.
freetype[png]:x64-windows Support PNG compressed OpenType embedded bitmaps.
freetype[zlib]:x64-windows Use zlib instead of internal library for DEFLATE
glslang:x64-windows 14.2.0 Khronos-reference front end for GLSL/ESSL, parti...
imath:x64-windows 3.1.11 Imath is a C++ and Python library of 2D and 3D v...
jhasse-poly2tri:x64-windows 2023-12-27 Sweep-line algorithm for constrained Delaunay tr...
kubazip:x64-windows 0.2.6 A portable, simple zip library written in C
libdeflate:x64-windows 1.20 libdeflate is a library for fast, whole-buffer D...
libdeflate[compression]:x64-windows Support compression
libdeflate[decompression]:x64-windows Support decompression
libdeflate[gzip]:x64-windows Support the gzip format
libdeflate[zlib]:x64-windows Support the zlib format
libpng:x64-windows 1.6.43#1 libpng is a library implementing an interface fo...
minizip:x64-windows 1.3.1 Minizip zip file manipulation library
openexr:x64-windows 3.2.3#1 OpenEXR is a high dynamic-range (HDR) image file...
physx:x64-windows 5.3.0 The NVIDIA PhysX SDK is a scalable multi-platfor...
polyclipping:x64-windows 6.4.2#12 The Clipper library performs clipping and offset...
pugixml:x64-windows 1.14 Light-weight, simple and fast XML parser for C++...
rapidjson:x64-windows 2023-07-17#1 A fast JSON parser/generator for C++ with both S...
stb:x64-windows 2023-04-11#1 public domain header-only libraries
utfcpp:x64-windows 4.0.5 UTF-8 with C++ in a Portable Way
vcpkg-cmake-config:x64-windows 2022-02-06#1
vcpkg-cmake-get-vars:x64-windows 2023-12-31
vcpkg-cmake:x64-windows 2024-04-18
zlib:x64-windows 1.3.1 A compression library
Thanks a lot for your reply! I'll try this out and comment back with the information.
Ok I installed all your packages in vcpkg and it seems to me that our packages are similar, here is the list:
I tried one more time to build VSG and vsgXchange. VSG is built with no erros (there were no problems with VSG building btw), but vsgXchange gives me the same error :(
I will give commands instruction that I used to build vsgXchange. I hope it will help us to investigate what is going wrong.
cmake ..
(it is built with VS 17 2022 generator, I also tried explicitly define generator but it didn't help)Z:\dev\vsgXchange\build>cmake ..
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
-- The CXX compiler identification is MSVC 19.37.32822.0
-- The C compiler identification is MSVC 19.37.32822.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found Vulkan: C:/VulkanSDK/1.3.283.0/Lib/vulkan-1.lib (found suitable version "1.3.283", minimum required is "1.1.70.0") found components: glslc glslangValidator
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- Reading 'vsg_...' macros from C:/vcpkg/installed/x64-windows/lib/cmake/vsg/vsgMacros.cmake - look there for documentation
-- Found Freetype: C:/vcpkg/installed/x64-windows/lib/freetype.lib (found version "2.13.2")
-- Found CURL: C:/vcpkg/installed/x64-windows/share/curl/CURLConfig.cmake (found version "8.7.0-DEV")
-- The following OPTIONAL packages have been found:
* vsg (required version >= 1.1.3)
* Freetype
* CURL
* Threads
-- The following REQUIRED packages have been found:
* Vulkan (required version >= 1.1.70.0)
-- Configuring done (11.8s)
-- Generating done (0.0s)
-- Build files have been written to: Z:/dev/vsgXchange/build
cmake --build . -j 19
P.S. Sorry for cyrillic letters in my MSVC output, for now I can't change it.
So it crashes on the building stage connected with class, implementing libcurl features. Of course I can explicitly define linking to libcurl in CMakeLists.txt
, but I feel it is not a solution.
I don't recall anyone else hitting upon this issue, and can't think of anything you can try to resolve it.
FYI, while I have 3 decades of working with unix of various flavours I'm a newbie under Windows so will have to defer to Windows users to help you out. Asking a question on the VulkanSceneGraph forum might help reach a wider audience and better chance of getting the help you need.
@ComradeMashkov could you try #192 which is now merged with vsgXchange master. as @AnyOldName3 has added support for setting up libcurl using cmake config.
@ComradeMashkov could you try #192 which is now merged with vsgXchange master. as @AnyOldName3 has added support for setting up libcurl using cmake config.
Hey, thanks for your reply and brand new commit. I tried to build again with these changes and it helped! Thanks @robertosfield for you being in touch and thanks @AnyOldName3 for this PR. I hope it will help other users to deal with this problem. It seems to me that we can close the issue.
When trying to link with curl using Visual Studio 17 2022 generator I get following errors:
I tried using
CURL_STATICLIB
directive but it didn't help at all. I would be so grateful if somebody can help me to fix this nasty error! Btw, maybe I'm doing something wrong?UPD: I also tried linking to wldap32 crypt32 Ws2_32 but it didn't help. UPD2: I explicitly added curl lib to target via vsgXchange CMakeLists.txt: Now everything get built but when running this example I get this:
I put .dlls into my folder and everything works fine (I guess?) but I feel I'm missing something.