Using make on OS X (and failing)

Hello all,
I’m working on an app for ARM linux/NVidia Jeston, but prefer to develop on OS X.
I’d like to use make, like I do on linux and avoid XCode anything.

I’m getting these iphone simulator warnings on OS X from a project that works on Linux and Linux Arm; as well as the ofGstVideoUtils and some midi related errors:

In file included from /Users/ali/Documents/Dev/of_v0.11.2_osx_release/apps/myApps/MOD/src/ofApp.cpp:1:
In file included from /Users/ali/Documents/Dev/of_v0.11.2_osx_release/apps/myApps/MOD/src/ofApp.h:3:
In file included from ../../../libs/openFrameworks/ofMain.h:6:
../../../libs/openFrameworks/utils/ofConstants.h:94:67: warning: 'TARGET_OS_IPHONE_SIMULATOR' is not defined, evaluates to 0 [-Wundef-prefix=TARGET_OS_]
        #if (TARGET_OS_IPHONE || TARGET_OS_IOS || TARGET_OS_SIMULATOR || TARGET_OS_IPHONE_SIMULATOR) && !TARGET_OS_TV && !TARGET_OS_WATCH
                                                                         ^
In file included from /Users/ali/Documents/Dev/of_v0.11.2_osx_release/apps/myApps/MOD/src/ofApp.cpp:1:
In file included from /Users/ali/Documents/Dev/of_v0.11.2_osx_release/apps/myApps/MOD/src/ofApp.h:3:
In file included from ../../../libs/openFrameworks/ofMain.h:101:
In file included from ../../../libs/openFrameworks/video/ofVideoPlayer.h:23:
In file included from ../../../libs/openFrameworks/video/ofAVFoundationPlayer.h:15:
../../../libs/openFrameworks/video/ofAVFoundationVideoPlayer.h:16:6: warning: 'TARGET_OS_IPHONE_SIMULATOR' is not defined, evaluates to 0 [-Wundef-prefix=TARGET_OS_]
#if (TARGET_OS_IPHONE_SIMULATOR) || (TARGET_OS_IPHONE) || (TARGET_IPHONE)
     ^
In file included from /Users/ali/Documents/Dev/of_v0.11.2_osx_release/apps/myApps/MOD/src/ofApp.cpp:1:
/Users/ali/Documents/Dev/of_v0.11.2_osx_release/apps/myApps/MOD/src/ofApp.h:106:9: error: unknown type name 'ofGstVideoUtils'
        ofGstVideoUtils gst;
        ^
/Users/ali/Documents/Dev/of_v0.11.2_osx_release/apps/myApps/MOD/src/ofApp.cpp:257:24: error: cannot initialize a parameter of type 'ofxMidiListener *' with an rvalue of type 'ofApp *'
    midiIn.addListener(this);
                       ^~~~
/Users/ali/Documents/Dev/of_v0.11.2_osx_release/addons/ofxMidi/src/ofxMidiIn.h:138:36: note: passing argument to parameter 'listener' here
        void addListener(ofxMidiListener* listener);
                                          ^
/Users/ali/Documents/Dev/of_v0.11.2_osx_release/apps/myApps/MOD/src/ofApp.cpp:409:27: error: cannot initialize a parameter of type 'ofxMidiListener *' with an rvalue of type 'ofApp *'
    midiIn.removeListener(this);
                          ^~~~
/Users/ali/Documents/Dev/of_v0.11.2_osx_release/addons/ofxMidi/src/ofxMidiIn.h:139:39: note: passing argument to parameter 'listener' here
        void removeListener(ofxMidiListener* listener);
                                             ^
3 warnings and 3 errors generated.
make[1]: *** [obj/osx/Release/src/ofApp.o] Error 1
make: *** [Release] Error 2

An ideas why?

check midiIn example you have to extend the ofApp class like this

class ofApp : public ofBaseApp, public ofxMidiListener {

I’m already doing that…

maybe there are still some artefacts from previous builds.

  • make clean
  • or maybe delete the .obj directory, and those within the addons
1 Like

To use this in OSX you have to use this addon

and install the GStreamer too.

this is only a warning but already fixed on nightly builds / git

I think the make clean may have solved my midi related errors.

The gstreamer issue did not goin away with installing the ofxGStreamer addon; seems that @arturo 's addon may be a bit old, or maybe the failing build reported but github there is an issue?

I just #ifdef 'ed the linux specific parts that needed the gstreamer setup and I can now build…

Does it build with xcode? That addon is a bit old but still works perfectly for me.

Just to be sure, did you install Gstreamer on macOs? different from linux you have to install. There is a script inside ofxGStreamer addon with the install, but you can choose newer versions too (not sure if they are compatible with the addon)

Yes; definitely have gstreamer (installed with homebrew) and can use it in the terminal.

are you using ofGstVideoUtils directly?
if yes how are you including the file in your project? which file has the include?