How to compile and run a C++ project with a Makefile? [closed] - c++

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I needed a library for my project that would cover CANFIS functionalities and Fuzzylitex does that. But the problem is, I don't know how to build this project? I am familiar with cmake files but this project has Makefile and I cannot work with it? I am using Visual Studio 2015.

Thanks to the comments, I found out about the difference between Makefile and Cmake files. The tool that can be used to make a project with Makefile in Visual Studio, is NMAKE.EXE. It is built in for Visual Studio. All you need to do is to open the visual studio command prompt (tools -> Visual Studio Command Prompt) and go to the directory of the Makefile and type "nmake" and press enter. The problem just begins here! There is a good chance that you will get errors. Anyway, this is the solution to my problem. Also, this is a good tutorial on using NMAKE.

Related

How do I build a program after cloning a repository from github? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I want to take this program: https://github.com/baskiton/Img2STL, open it in visual studio and make an executable. I realize I could get it straight from the release, but I want to learn how to edit it and build myself. When I clone it into visual studio, the folders all have blue padlocks next to them and the build function is grayed out.
Thanks!
This repo has a CMakeLists.txt file in its root, hence this project can be generated and built via CMake.
Generally you download and install CMake and then you have 2 options:
Use GUI.
Use your console.
For Windows you can use powershell:
git clone https://github.com/baskiton/Img2STL
cd Img2STL
mdkir build
cd build
cmake ../
CMake uses a Generator to configure your projects. It can be defaulted to use your installed Visual Studio.
Or else, you can use Ninja and Visual Studio Code, or Visual Studio with open folder to open your project.
This should be enough to get you started.

How to make a c++ project from command prompt? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
Note that this is referred to make a project from command prompt, not build or run it, by "make", i mean, creating a .vcxproj file like Visual Studio does.
I am unable to use Visual Studio for now, this is why i'm asking to make a project through cmd, i tried gcc, but it doesn't generate these project stuff.
The vcxproj format provides information the MSBuild tool to control the build process. It's an XML file that is automatically created by Visual Studio, but its possible to make it manually by writing the XML yourself, and then specifying the file when invoking MSBuild from the cmd prompt.
See this walkthrough in the MS docs, and this reference to the vcxproj format if you want it to work when you regain access to VS.
Alternatively, if you're not absolutely required to use Visual Studio and the Visual C++ ecosystem, then it might be worth exploring other build systems as suggested in other answers/comments.
GCC is just a compiler, rather than a full IDE like Visual Studio. It takes source code (and some binary libraries), and then outputs compiled executables or object files.
You can use a build system like CMake or Meson, which can make the building process easier for you and those who clone your code, and can even be integrated into Visual Studio. You can actually use CMake to convert projects into Visual Studio format.

"The system cannot find the file specified" in Visual Studio C++. Why? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I'm a very beginner in Programming.
Visual Studio shows an error "the system cannot find the file specified" in C++ when I add two or more C++ files under Source Files.
I reinstalled visual studio 2019 and still getting the same errors.
Single C++ files run smoothly.
It's not able to find the executable Project1.exe because your program didn't compile successfully which is probably due to the two main functions you have defined.

Including dll to Visual Studio project [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I need to read a mat file in a Visual Studio project. I'm using Visual Studio 2015 32bit on Windows 10 64 bit.
I have installed a MatFileHandler library using NuGet Package Manager and got a MatFileHandler.dll file but I don't know how to use it. In program I've written use MatFileHandler but linker does not see this. Please don't judge me, I'm very new to Visual Studio.
MatFileHandler library is not a native C++ dll. It's .NET assembly and it depends on .NETStandard 2.0.
You should create .NET application and add this NuGet package to it. Here is the step-by-step instruction on how to create .NET Core application.

How can I change the visual studio 2015 compiler to cygwin [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Is it possible to change the visual studio 2015 compiler to Cygwin the ide is nice I would just like a different compiler.
Not directly, but you can use CMake to generate both Cygwin and Visual Studio projects. Write code in Visual Studio, build the Cygwin build via CMake. Only downside: updates to the Visual Studio .vcxproj file aren't sync'ed back to the CMakelist.txt file.