MSys2 Install, Some Examples fail to build, where is project generator?

Just installed OF on windows 7 Msys2 64 bit

Some of the examples failed to build.

Here is the output from the build all examples script

=================================================================
Success:120 - Skipped:0 - Failed:16 - total:136

Failed examples :
3d/3DModelLoaderExample 3d/assimpExample 3d/cameraLensOffsetExample 3d/modelNoiseExample communication/oscChatSystemExample communication/oscReceiveExample communication/oscSenderExample computer_vision/kinectExample computer_vision/opencvExample computer_vision/opencvHaarFinderExample gl/computeShaderTextureExample graphics/polylineBlobsExample gui/oscParametersReceiverExample gui/oscParametersSenderExample input_output/svgExample templates/allAddonsExample

Also there is no project generator as in the linux version.
Can the project generator be installed on windows? if so how?
Is there a guide to creating projects manually without an IDE or the project generator around somewhere?

Hi,

Not sure about those examples.

To run examples you can compile and use the commandLine project generator.

Usually this works on msys:

  • update pacman
  • install_dependencies.sh
  • compile commandLine PG
  • update pacman again
  • cd project/example directory
  • invoke commandLinePG (or just copy std::Makefile here)
  • type make
  • type make run

Notepad++ is a very nice IDE

Hth

Alice

Hello,

For the examples not building, I believe that they are all examples that require an addon.
There is a bug in the makefile that is called when using addons.
I think it’s solved in the master but you can fix it by yourself. Have a look at my post here

For the Project Generator, I do not use it, I prefer copying ‘config.make’ and ‘Makefile’ from other projects. For example, from <OF_ROOT>\scripts\templates\msys2

Good luck

Thanks Alice,

Sorry it’s taken me a while to reply.

Got the install to work ok, just a few of the examples didn’t build with the build all script.

They probably need addons.

I don’t see the code for the project generator in the package, though it’s there in the older version.
I’ll have a go and just copying existing projects and modifying the make files.

I’m using sublime text on windows and atom on linux, not much of a fan of ides.

Thanks again

Thanks Oxillo,

That sounds like the answer, it’s not a big deal that some of the examples don’t build anyway,

I’ll have a go at copying and editing make files instead of using the project generator, probably a better way to do it anyway, even if there’s a bit of a learning curve.

Cheers.

I can copy an an example and work from that but I don’t know how to manually add an add on in the make file, could you possibly explain how to do that?, i’m trying to use ofxmidi and it’s instructions only describe how to include it with the project generator. It also requires the project generator to compile the examples that come with it.

Generally, you don’t need to modify the makefile.
To use addons, you just need to create (if not already there) an ‘addons.make’ file that list the addons (one per line) you want to use.
In your case, it may only have one line:

ofxmidi

OF will try to locate the directory ‘ofxmidi’ in the OF ‘addons’ directory.

Some more hints :

  • Each line of addons.make is a (relative) path to the root directory so ..\myaddons\myofxmidi should work
  • If an addon depends on other addon, it shouldn’t be necessary to include the dependency addons.

tried that, doesn’t work.
tried copying a working project from my linux machine, that doesn’t work either.

tried using the project generator from the visual studio release and no luck with that either.

Also tried cloning the project generator code from github and compiling that, won’t build, no script for msys2.

I’ve just downloaded ofxMidi and built the midiInputExample with no problem on MSYS2.

Can you explain what doesn’t work ?
Did you apply the patch in ‘config.addons.mk’ ? Do you have ‘ofxMidi’ in your file and not ‘ofxmidi’ (with uppercase M) ?

what patch?

yes I copied the working addons.make file from the linux machine.

i made an empty project and it compiles and builds then i copied the code and the addons.make from the working example from the linux machine and it doesn’t compile.

this is the output

$ make
Compiling OF library for Release
make[1]: Entering directory ‘/home/Strum/OF/of_v0.11.0_msys264_release/of_v0.11.0_msys264_release/libs/openFrameworksCompiled/project’
Done!
make[1]: Leaving directory ‘/home/Strum/OF/of_v0.11.0_msys264_release/of_v0.11.0_msys264_release/libs/openFrameworksCompiled/project’

Compiling test2 for Release
make[1]: Entering directory ‘/home/Strum/OF/of_v0.11.0_msys264_release/of_v0.11.0_msys264_release/apps/myApps/test2’
/home/Strum/OF/of_v0.11.0_msys264_release/of_v0.11.0_msys264_release/libs/openFrameworksCompiled/project/makefileCommon/config.addons.mk:210: *** missing separator. Stop.
make[1]: Leaving directory ‘/home/Strum/OF/of_v0.11.0_msys264_release/of_v0.11.0_msys264_release/apps/myApps/test2’
make: *** [/home/Strum/OF/of_v0.11.0_msys264_release/of_v0.11.0_msys264_release/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:129: Release] Error 2

the examples that come with ofxMidi do not have make files, the project generator creates them.

so how did you build them without using the project generator?

the instructions for installing ofxMidi and compiling the examples describe only how to build them using the project generator to create the projects and not how to do it without the project generator.

The error you are seeing is due to an evolution of ‘make’ that creates an error when building a project with an addon.
You have to apply the patch has describe in my post above or here

To build the example, I’ve just copied Makefile and config.make from $(OF_ROOT)/scripts/templates/msys2

Thanks Oxillo

Applied that change and it works now.

Because some examples that use addons were building and that change seems to refer to building the project generator I hadn’t realised it applied to ofxMidi as well.

Now i’ve fixed it I should be able to just copy projects and add addons manually without needing the project generator,

Thanks for your help.