Thread7
Thread7

Reputation: 1090

Cross platform compilation of C++/Qt project

I am a C++ novice. I have found an open source project written in C++/Qt. I want to make slight modifications and compile for both Windows and Mac. Is it typically that I will need to change my code to support either platform, or can it usually compile for both platforms out of the box?

Upvotes: 1

Views: 123

Answers (2)

PetukhovLive
PetukhovLive

Reputation: 43

In most cases, you don't have to change your code to support both OS s excepting cases described above. You simply have to open folder with ur qt project and open .pro file. The you should compile it and receive ur OS build.

Upvotes: 1

Arno Duvenhage
Arno Duvenhage

Reputation: 1960

If the source code uses clean C++ and Qt then it should compile (given that you have a Qt project file or Cmake file). If the code uses any platform specific APIs, you will have to update those first (either with multiple pieces of code, or with other cross-platform APIs)

Upvotes: 1

Related Questions