Member Since: Nov 21, 2009
11-21-2009, 07:54 AM
I am currently working on a QT C++ project and have been able to get it to compile using the following steps:
- Place all my .h and .cpp files in the directory MyProject
- Run make clean (obviously not on the first go)
- Create the QT project file using qmake -project
- Do the QT precompilation (qmake -spec macx-g++ && qmake)
- Open the .xcodeproj file then build and run.
I have wrapped this in a shel script which I can run and do it all at once.
echo "QT += network" >> MyProject.pro
qmake -spec macx-g++
# Now open the .proj file and build with xcode
Now whilst all of this works fine it involves creating a new XCode project each time (losing any of my project settings) and because qmake sets up some linking and generates .moc files used by QT for its Signals/Slots functionality I need to run it pretty much every time I create a new class.
My question is does anyone know of another way to do this? I need to generate all the temporary files used by QT, setup the XCode project in the same way (with all libraries and settings) but without having to redo the whole thing. As I say I think there are some linker options being set and I am looking into those but in case there is some standard or obvious method I am missing I figured I would post now as well.
Thanks in advance.