Click here to Skip to main content
14,422,224 members
Rate this:
Please Sign up or sign in to vote.
Hi, friends!
I want to compile a open source c++ project on windows system.
But this project is configured linux cpp, h files and configure files such as 'configure', 'Makefile', '', '' and so on.

What I have tried:

To compile on windows, I tried to use cmake, but failed.
I use vs2013.
I have not cmakefile.txt file.
Updated 31-Aug-17 4:42am

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

There is no ready-to-use conversion. But before trying to compile you should check if the source can be build for Windows. That should be stated somewhere in the documentation.

If it is a rather simple project, just create a new console or DLL project (depends on the type of the source), add the existing source and header files to that, and (for console projects) move the code from the Linux source main function to the VS generated main source file. Because Linux uses UTF-8, you need to create an ANSI build instead of a Unicode build. To convert the project to Unicode, all string literals have to be prefixed and all function calls accepting <code>char* strings has to be replaced by the Unicode or TCHAR version.

Alternatively (and for more complex projects) install the Windows versions of the required Linux tools and use that for building (e.g. using Cygwin[^] ).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100