Click here to Skip to main content
15,889,838 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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', 'Makefile.am', 'Makefile.in' and so on.
Thanks.


What I have tried:

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

1 solution

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[^] ).
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900