New to xcode and compiler issues

I have been using qt creator for a couple of years but as xcode seems to be more supported in OF I am making the switch. My current project uses quite a few addons and compiles fine in qt creator in OF 0.11.2.

I can get the basic examples to compile in xcode (success!) but am running into issues with my own project. This is the first error I’m getting when the build fails:

no member named ‘ptr_fun’ in namespace ‘std’

And this arises in the ofxHTTP addon. From what I understand ptr_fun is deprecated in C++17 fully. I did a bit of searching and I think I should be able to compile certain addons with e.g. C++14? Is that something that is common to do? I tried to set the compiler flag for certain files but am unsure of how to do that exactly in xcode.

Some of the addons in OF are getting quite old and I’m assuming other users are also running into similar issues.

Any xcode veterans out here?

to add onto this, in qt creator I can compile the same sketch without issues, but it is unclear to me how it determines which c++ version it uses (the documentation around qt is horrible compared to xcode - also a good reason to jump ship :slight_smile: )

not sure if it will help but using XCode you can look at the configurations in your Project.xcconfig to change compiler settings.
I would recommend you open an issue on ofxHTTP repository too because if it is deprecated fully it is a good reason to fix it.

Yep this particular error is because of the c++ version with the current OF (17) and the addon was written with 14. Check the repo, I have a functioning solution and a pr you can trace that is working with the current OF from my tests.

Thanks, this makes sense. I’ve now implemented the ‘c++17’ branche of ofxHTTP and ofxIO and have tried compiling the ‘example basic client post’, unfortunately no luck :frowning:

Still c++17 related issues it seems. I’m using xcode and the latest nightly build of OF.

thanks, yes I have looked at the compiler settings. If I comment out the flag CLANG_CXX_LANGUAGE_STANDARD = c++17 I get different errors, mainly related to ‘filesystem’ (which afaik needs c++17). This is why I was enquiring about file-specific compiler flags.

Hi, the PR for my changes is still active, I am not sure if there is some issue with it. I didnt have a chance to check this again, but have used it in the last few months. My fork that contains the PR is here: GitHub - fred-dev/ofxHTTP: A suite of HTTP tools, including clients and servers for openFrameworks. not sure if you got the changes as the PR was not accepted. Here is my fork of ofxIO with the changes GitHub - fred-dev/ofxIO: A collection of I/O core utils including a directory watcher, file filters and ordering, compression and more. note that these are on the Develop branch not the master.

Let me know if that helps.


Thanks, I ensured I’m using these dev branche files now and I’m trying to compile in Xcode, using c++17. Nightly build from OF, and am getting errors (surely related to the c++17 version) like

/addons/ofxIO/libs/ofxIO/include/ofx/IO/ThreadsafeLoggerChannel.h:67:18: ‘log’ marked ‘override’ but does not override any member functions

I am trying to compile e.g. the example client post app that comes with ofxHTTP.

Hi, I am not sure where exactly you get the repo from. I just had a chance to check a project using ofxHttp and ofxIO, I had to make a few chnages for them to work, but these were new issues and not related to the errors you got. I just did a quick text (I didnt test all functionality) and things are working for me.

I used the master of ofxHTTP (GitHub - fred-dev/ofxHTTP: A suite of HTTP tools, including clients and servers for openFrameworks.) and the develop branch of ofxIO (GitHub - fred-dev/ofxIO at develop). These worked for me this monring with OF master branch.

Let me know if that works for you.


I took them earlier from here as well but with these latest changes it works! Thanks so much :slight_smile: