How to build ITK project without cmake? - cmake

How to build an ITK project without cmakelist.txt?
I have built ITK binaries with cmake and I have included all header files and libs in visual studio project but imagefilereader object is throwing exception, is there any reason for it?

Related

How to make CMake set dependencies for a static library project?

I'm using Windows 10 Pro, Visual Studio 2022 and cmake version 3.26.0-rc3. In my Visual Studio solution I have a static library project, let's call it MyLib, which uses features from libxml2 i.e. it needs to link against libxml2.lib. Also in my solution there is an executable project, let's call it MyExe, which links against MyLib and also has libxml2.lib listed as a dependency in its project settings.
The problem is that in the CMakeLists.txt file of MyLib, target_link_directories and target_link_libraries do not seem to have any impact on the MyLib project settings, particularly Additional Library Directories and Additional Dependencies, respectively. For MyExe, those commands work as expected. If I fix the linker options for MyLib project settings manually in Visual Studio IDE, everything builds fine, but I don't think I should need to manually alter project settings initially created by CMake. So is there something I'm missing here - like that dependencies for a static library project need to be set in a different way in CMake - or is this a bug in CMake or Visual Studio? Are there any alternative ways to achieve the desired behavior and get the build to work?
In trying to find solutions for this I came across this very old post, but if I understood correctly it suggested adding an extra library project which sounds like a huge overkill for a simple thing like this which could be worked around by setting the project settings manually in Visual Studio IDE, so it's not an acceptable solution for me.

LNK1104 error for debug build in pybind11 project on visual studio with cmake & vcpkg (Windows)

I have created a PyBind11 project on Visual Studio using CMake & VCPkg on Windows platform. I'm exposing C++ functionality in Python.
I have pybind11_x64-windows & python3.10_x64-windows installed via vcpkg and CMake3.24.1 installed through Visual Studio 2019 Professional separately.
I have the necessary CMakeLists.txt file in the project's root directory. The project builds correctly in Release mode, but in the Debug mode, I have linker error:
LINK : fatal error LNK1104: cannot open file 'python310.lib'
I don't understand, why Visual Studio needs python310.lib instead of python310_d.lib in the Debug mode. In VisualStudio, when I checked the Project->Property->Linker->Input->AdditionalDependencies, it correctly points to python310_d.lib.
I found this article on Google which seems relevant to some extent:
https://discourse.paraview.org/t/debug-build-fail-cannot-open-file-python310-lib/9000
but there doesn't seem to be a clear solution.
Is this a bug in VCPkg/CMake/Python or something else ? Does anyone have a solution to this ?

How to use msbuild to generate a VS .sln file where everything is on x64 platform?

When I build my project in command line, everything works fine. But when I tried to generate a .sln file for the project by running msbuild /t:SlnGen /p:Platform=x64
at the command prompt, and then click build in VS (debug, x64), I got an error saying it can't copy a dependent binary folder because it is not found. Since my project is on CBT, I have x64, x86 and Any-CPU platform settings. My project used to be built on CoreXT. My suspicion is VS build doesn't handle the output path of the dependencies correctly.
Then how can I build the solution only on x64 through VS?
Any hint will be very helpful!

Cannot build .net core 1.1 with msbuild tools

I have a .net core class library I am attempting to build into a nugget package. however, on my build server (running team city), I am getting the following error:
C:\TeamCity\buildAgent\work\3c6531587491c25e\MySolution\MyProject.csproj
error MSB4019: The imported project "C:\Program Files (x86)\Microsoft
Visual
Studio\2017\BuildTools\MSBuild\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.props"
was not found. Confirm that the path in the declaration is
correct, and that the file exists on disk.
When I look in this directory, I ma missing the "Microsoft.NET.Sdk" folder from my build server. where do I get these tools without having to install visual studio?
Thanks!
See the tracking issue on GitHub: https://github.com/Microsoft/msbuild/issues/1697
If you don't want to touch your build tools installation (by copying SDK files), you can also set the MSBuildSDKsPath environment variable to the location of the SDKs carried in the .net CLI (usually C:\Program Files\dotnet\sdk\1.0.0\Sdks\)

Executable file in xcode

How to get the executable files from the xcode
If you're meaning to ask how to retrieve a compiled executable from a built Xcode project, you can find it in the build/Debug or build/Release folder in the project folder, depending on the build settings of the project.