I downloaded the source code to an open-source project and want to compile it. It has a makefile. How do I compile it using Visual C++? I see that it has a "Makefile Project Wizard", but I don't know how to use it.
Related
Is there a way to debug external cpp code in Visual Studio C++ 6.0? I mean, cpp code that is pre-compiled and linked to (but not compiled in) the solution. In newer versions (e.g. Visual Studio 2008 and later) I just put the code among the project files and it works, if "Enable Just My Code" is un-ckecked.I don't find anything like this for the older Visual C++ 6.0 version...
I have seen many open-source projects use CMake as their build system. I'd like to use it too, but so far all of my development has been on Visual Studio (2015). This makes me wonder how I'm supposed to edit code when using CMake as a build system? Should I use editors like Vim or emacs, or can I still use Visual Studio (with IntelliSense, if possible)?
You can use CMake to generate Visual Studio solution for you:
https://cognitivewaves.wordpress.com/cmake-and-visual-studio/
But unfortunately the opposite is not possible(or harder than expected), for every new file or include folder generation you will have to update your CMakeLists.txt file respectively(edits do not require updating CMake), looking at the Visual Studio flags while compiling could help this, but the process is still manual:
Using CMake to generate Visual Studio C++ project files
cmake creating visual studio solution on the command line
There are also 3rd Party tools which could facilitate the production cycle for you, including the visual studio to CMake generation, but they are not officially supported
I understand I can use Qt5 in Visual Studio by using the Visual Studio Add-in for Qt as mentioned in Building Qt5 with Visual Studio 2012 / Visual Studio 2013, and integrating with the IDE.
Is it possible to use Qt5 in Visual Studio without using the Add-in?
Also, I would like to use CMake to generate the Visual Studio Project.
Yup.
I have it working for a pretty complex subdirs template.
Qmake can generate the visual studio solution file and vcxproj, look here:
http://doc.qt.io/qt-5/qmake-platform-notes.html#creating-visual-studio-project-files
What I do is use the Qmake project as the master project, and generate the VS stuff out of folder as temporaries. This prevents Visual studio from tangling up in your source files as well as in the qmake stuff. And you can also port it to other OSs without any hassle. Using this approach, if you want to add files to your project, don't do it through VS, but add it to the .PRO file and re-run qmake.
The only thing (that I've found) is if you change anything that needs to be MOC'd, then re-run qmake.
If you want CMake exclusively then this is a nice guide
http://www.kdab.com/using-cmake-with-qt-5/.
The qmake way is a little cleaner as you don't get all the extra noise of finding Qt libraries as you need in CMake.
i'm trying to port to Windows a C project wrote to work on Linux. It's a simple project that depends CUDA and Glib librarys.
I believe the best way is to compile with Microsoft Visual Studio 2010, but i don't have idea how to link Glib to this project. CUDA code is going well, but every call to Glib methods generate a "unresolved external symbol" error.
i just solved my problem using this guide to configure GTK on Visual Studio 2008:
http://www.etechplanet.com/blog/visual-studio-2008-configuration-for-gtk2b-gui-development.aspx
The only change i done was about the Tools/Options/VC++ Directories because this was deprecated on VS2010. I added the paths directly to the project properties.
Right now I have some libraries that link easily to Visual Studio projects but I can't figure out how to link them with Qt. My idea is to write a VS project that wraps the functionality I need from the libraries, then compile that to a library which can be linked to Qt. From my understanding, VS and Qt use compilers that create incompatibile libraries. My questions are:
Can I modify VS or Qt in a way that I can compile a library in VS which can be linked to Qt?
Is there a simpler solution to this problem?
The specific library I'm using is Nitro-Nitf. For my Qt project I'm using Qt Creator and for Visual Studio I'm using VS 2008.
Yes, the Windows binaries provided by Qt are built using MinGW. If you build Qt from source using Visual Studio, then your libraries will be compatible.
Although I haven't tried it, Qt Creator 1.2 introduces support for MS compilers, so you should be able to continue to develop your Qt projects in Creator.
Qt is available as source code, you can build it with whatever toolchain you like. Visual Studio is an IDE (integrated development environment) that normally invokes the microsoft compiler (cl) and linker (ld), although you can configure a Visual Studio project file to do a makefile build, or IIRC, invoke any other program you like to do the build step (at my previous job, we built our Qt apps with cl and ld, and could debug with Visual Studio just fine, since about 2005).
Also, it appears this "NITRO" project is open source, so you can download the source instead of a pre-built binary, and build it using MinGW if you'd like to build Qt apps with MinGW, or if you are using pre-built Qt libraries that were built with MinGW.
To build Qt4.5 with visual studio
Download the source
./configure.exe -platform win32-msvc2008 or win32-msvc2010
nmake
There is even a free release of the visual studio plugin to make handling all the autogenerated code automatic in visual studio