QT yaml-cpp Windows - c++

i am new on programming in windows and in QT.
I started a QT project and want include yaml-cpp 0.30
Now i have different problems. First i wanted to build the lib with cmake and Visualstudio but i am not sure if i did this right.
I start Cmake and build with VS2010 compiler. Then i load the file
build\CMakeFiles\2.8.11.2\CompilerIdCXX\CompilerCXX.vcxproj in VS 2010 but i cant build this or dont know how.
And how i integrate this build lib inside QTCreator?
Or i have the possibility to build all inside QTCREATOR?
thanks for your help

CMake will build a Visual Studio solution (a .sln file); you don't need to go into the CMakeFiles directory to find it. There should be a solution file in the top build directory.

Related

Compile GLFW Static Libraries in Windows for Visual Studio 2019

Sorry in advance if this is a really simple question or if this has already been answered somewhere. I searched for myself but couldn't find the exact answer to my problem.
I'm following the GLFW documentation to compile the GLFW libraries using CMake. I managed to make the build files, but then the documentation says "Go ahead and compile the actual GLFW library with these files, as you would with any other project."
Unfortunately, IDK how I would compile the library as I would with any other project since I don't see any files I recognize (like .h header files or .cpp files). Instead, I see a bunch of .vcxproj files and a .sln file. I'm unfamiliar with any of these files lol.
So my question is, how would I proceed from here to build a static .lib? Thank you in advance!
Build Output:
Build Directory:
Compiling GLFW Documentation
The build folder will contain a solution file (has a .sln extension) and all the project files (among other generated files) needed to build GLFW. To build you can open the .sln file in Visual Studio and build the Debug and Release configurations directly from the IDE or you can change directory to the build folder and execute this command:
cmake --build .
to build the debug versions of the library or
cmake --build . --config Release
to build the release version.

How open Qt Creator project (itk-snap) using Cmake

I am interested to import Itk-snap source code in Qt5.4. Based on their help I could built the executable itksnap in my system using cmake(3.4.1). Then, I have imported the Cmakelist.txt in Qt creator and pressed "run camke". It is configured successfully, but I cannot see the project file ( no main.cpp or any file in left panel)! , cannot build it because it does not loaded in Qt creator.
What do I do wrong? How can I have itksnap in my QT creator.
I am using OSX, and unix generator for camke.
As I can understand you are trying to build cmake project using QtCreator as an IDE, if so have a look here http://doc.qt.io/qtcreator/creator-project-cmake.html
Finally, I could find out what was wrong. For whoever is interested and have same problem like me, I recommend to do : first to build binary of itk-snap source file using Cmake-Gui and build based on their help to the different folder. After you are sure that you can make the binary file, goes to the Qt-Creator, change the Kit and other setting if its not correct, then open Cmakelist.txt from source of itk-snap. It shows a windows to run the cmake inside the QT-creator. Go back to your Cmake-Gui and from Tools >> show my changes menu, copy the argument and past to the argument textBox in QT. In my case variables are
-DVTK_REQUIRED_OBJCXX_FLAGS:STRING="" -DSNAP_USE_GPU:BOOL="1" -DVTK_DIR:PATH="/Users/../itkSnap3/vtk/build" -DITK_DIR:PATH="/Users/../itkSnap3/itk/build" -DCMAKE_PREFIX_PATH:PATH="/usr/local/Cellar/qt5/5.5.1_2/lib/cmake"
Good luck

MsBuild can't find lib

I am using the following script to build a C++ project:
msbuild D:\proj.vcxproj /p:Configuration="Release" /p:Platform="x64" /p:BuildProjectReferences=false /p:AssemblySearchPaths="D:\Import\GenericAIC\Include" /p:AdditionalLibPaths="D:\Export\Release"
I am getting an error that it can't find a certain lib. that lib is present in the D:\Export\Release folder which is set as p:AdditionalLibPaths
The project compiles perfectly in Visual studio.
Any thoughts?
Since you are building a project and not a solution,
you don't have the $SolutionDir, and MSBuild cant interpert all the macros in the project file.
you just need to add /Property:SolutionDir="" and everything will compile.

Build C++ Projects with Makefile using Visual Studio 2008

I downloaded cpptest from internet, and I want to build it using Visual Studio 2008.
The problem is that instead of .sln and vcproj file, Makefile.am is distributed, and I believe that all the all the necessary included file is included in the Makefile.am.
How to use Makefile.am to generate VS project files? I tried to use Cmake, but there is no CMakeList in the distribution.
Edit: Thanks to all the answers! There is a sln file distributed after all. But I am still interested to know the answer to my original question.
the visual studio project files for cpptest are in the win directory, not in the src directory where the makefile is..
edit
makefiles are meant to be used with GNU make. If you want that on windows, you can look at Mingw, GnuWin32 or Cygwin. But they also require gcc for compiling, so you won't really be using VS.
However, for most projects that do not have external dependencies it's no big deal if you do not have the VS project file: after all a makefile is just a list of the source files and some compilation options. To successfully build projects like cpptest, you could just create an emtpy VS project, add all source files to it, set output type to executable, build it and you're done. Eventually you can tune optimization options, but for the rest the default options will just do fine.
Go to win\VisualStudio.NET and you will find a VS solution file.
I just downloaded the archive and found the .sln file. It is under: /win/VisualStudio.NET. You can open that with VS2008 and update it, it should work.

How to build wxmathPlot for win32?

I downloaded the latest wxmathplot but the readme is a bit sparse with instructions on how to build on win32 platform.
Has anyone used this library for win32? Can someone point me to the docs or give some hints/advice on how to build for win32 targets.
We'll eventually use this for cross platform stuff, for now it is just win32 until we port our other code.
I presume I have to use CMake, but have not used it before and it is not obvious to me how to build this all - I have already installed CMake, but I am apparently too stupid to figure out how to build this library/samples.
Well, I managed to make an SLN file, but it was not obvious.
I use wxMathPlot. I simply add mathplot.cpp and mathplot.h to the MSVS2008 C++ projects that need to use it. This compiles and links without my having to do anything special.
Here is a partial answer - to get
CMake to build an sln file:
Well, unfortunately there is no good
documentation on how to build
wxMathPlot on Windows, but it is very
simple. Just use CMake:
http://www.cmake.org/
Download and install it, then open
CMake gui, selecting the directory
where you uncompressed wxMathPlot and
a target build directory. click
Configure twice and then click
Generate. CMake does all its magic and
you'll get project files to build
wxMathPlot depending on your compiler.
For example, if you use Visual Studio,
a solution sln file is generated: open
it and build.
That works for building an sln file