Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

744
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda