Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

721
Views
Easiest way to "port" a Visual Studio C++ project to compile on Linux?

Have been developing a Visual Studio (2012) C++ project and wondered what would be the most convenient way of being able to copy it over to Linux so that I could re-compile the whole project there? Assume the C++ is platform-independent.

Would it be a case of copying all the .h and .cpp files manually in to one folder, copy that folder to Linux and then somehow creating a script (makefile?) which controls how the files are compiled? I'm not too sure if a makefile is what I require- but any mechanism so that I can compile the whole project from one command on the terminal?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

For the physical part, the easiest solution is to just grab the sources from your Version Control System. That will take care of the \r\n -> \n translation in your .cpp and .h files.

On the linux side, pretty much any build tool is superior to raw make. make is really the assembly language of build systems; your tool might produce a makefile as an intermediary but don't try to maintain that.

over 4 years ago · Santiago Trujillo Report

0

Yes, copy the files (or as @MSalters says - checkout a fresh copy) then construct an alternative .vcxproj for the Linux build tools. Note that the Visual Studio project file is really just a very fancy type of makefile.

A makefile at its simplest is just a list of files (or file types even) and a command for running on them. Once you have that written up, building is as simple as running MSBuild against a .sln file.

So you need to decide which build system to use on Linux - there's CMake which is a makefile-generator, and several other systems available.

Someone has made a tool that parses the VS project file and can generate a makefile from it, but it doesn't support VS2012 (you can fix this though, contribute)

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!