-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build error using installed STIR library with visual studio #1483
Comments
If I am understanding the error correctly STIR/src/include/stir/Array.inl Lines 622 to 625 in 8c57bc9
However, STIR/src/include/stir/NumericVectorWithOffset.h Lines 58 to 75 in 8c57bc9
However, this probably isn't the issue. More likely I am missing Includes or the STIR library is not properly supported. My current line of thinking is that STIR/src/cmake/STIRConfig.cmake.in Line 48 in 8c57bc9
does a lot of work with Boost libraries and builds things like Any direction would be appreciated. |
I'm a bit confused by this. You managed to build STIR with VS (via CMake)? But you don't manage to use it in a VS project? To me, that says you're missing some compilation flags, e.g. you need to say it has to be c++17. I suppose you can figure that out by checking what the compilation flags are when improving the STIR solution generated by CMake. However, I'm not sure why you're following this path. It's always going to be fragile. Depending on how you built STIR, you'll need various other libraries, openmp settings, etc. Regarding the actual error, the line referred to is actually l96, but it also calls base_type(). That default conductor should have been auto-generated to the best of my knowledge, unless it happens to be a C** version specific thing, hence my guess above. |
I am trying to create a STIR wrapper with visual studio. I have build STIR and installed it in
Program Files (x86)
.Using the CMake example in examples/using_installed_STIR/demo_create_image.cxx. I am able to configure, build and run this example using CMake. Notably, CMake uses the
find_package(STIR 6.0 REQUIRED CONFIG)
command.Porting over to Visual Studio. I want to compile the same file examples/using_installed_STIR/demo_create_image.cxx using Visual Studio, by including the libraries.
For this I used https://stackoverflow.com/a/23882710 as my guide. STIR is installed at
C:\Program Files (x86)\STIR
withbin
,include
,lib
,share
directories.Within my
STIRWrapper
Visual Studio project, I set the following properties:C:\Program Files (x86)\STIR\include\STIR-6.2
andC:\Program Files\boost_1_82_0
C:\Program Files (x86)\STIR\lib
*.lib
content ofC:\Program Files (x86)\STIR\lib
Error Log
I have attached the full build error log file [VSSTIRBuildErrorLog.txt](https://github.com/user-attachments/files/16384510/VSSTIRBuildErrorLog.txt) but here is what I believe to be the most important bit.I believe this to be an issue with the includes as this error occurs at the build stage. Has anyone else ever encountered this issue? My guess is
find_package(STIR 6.0 REQUIRED CONFIG)
is doing something with the Includes that I am missing in Visual Studio. Any recommendations on how to proceed?The text was updated successfully, but these errors were encountered: