Well that’s not going to work then

A short while ago I posted about the problems when combining Xcode’s -Wall and -Werror flags with pkg-config to get include directory flags.

I’ve just been through my configure script doing the necessary work to replace the -I flags with -isystem. In the end it turned out to be fairly straightforward to do it in just for OSX. But there are unintended consequences…

The application uses Qt to build the user interface and as part of the build uses Qt’s moc to generate some intermediate sources. moc needs to be passed the C/C++ preprocessor flags, but it only recognises -I, not -isystem and therefore throws an error.

It looks as though what I’ll need to do is maintain two separate copies of the flags, one for compiling code and one for moc. Fairly hideous, but at the moment I see no other choice.

This entry was posted in Computing, Projects and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *