Muaz Usmani
Muaz Usmani

Reputation: 1318

Compiling source without cmake

Maybe it is a naive question, so apologies in advance. I am trying to compile a source code, it has instructions only to install using make command, which I think works fine for Linux or OSX but I am trying to compile it over Windows. Moreover, this project doesn't have CMakeLists file.

I tried to look for solution online but not sure why I couldn't find much content over it. I would be really pleased if someone could help me in compiling a project on Windows without cmake.

Upvotes: 0

Views: 3331

Answers (1)

prushik
prushik

Reputation: 331

This is just a general answer. Compiling a complex application without using the build system is difficult. With simple C programs, you can sometimes get away with just passing all C source code files as arguments to gcc (or whatever compiler you are using), and then dealing with any errors you encounter by adding correct include paths for compile time issues and the proper libraries for link time issues. No guarentees, but sometimes this can work for simple programs. Also note that make and cmake are very very different. Make is a build system that reads makefiles and invokes a compiler based on the makefile script. Cmake is a program the generates makefiles. It sounds like the project you reference uses make and not cmake. Also note that make is available for windows as part of the mingw distribution.

Upvotes: 1

Related Questions