Can't compile from Linux terminal - make: *** No targets specified and no makefile found. Stop

#1

Hello,

I’m new. Very new.

I can’t get oF to compile any examples. In the console, I’m typing:

cd /home/james/Bin/OF/examples/graphics/polylineBlobsExample

make

And then i receive the following:

make: *** No targets specified and no makefile found. Stop.

I don’t seem to have a make doc in any of the example files, only Makefile. Does that matter?

I tired replacing make with makefile but it didn’t recognise the command.

Can anyone assist please? Thanks a million.

#2

You probably cloned openframeworks from GitHub, right?
There you first have to generate makefiles with the projectGenerator for each example.
To do that, you’d have to compile the projectGenerator first… :wink:

Easier is to just download openframeworks from the website:
https://openframeworks.cc/download/

And follow the install instructions from here:
https://openframeworks.cc/setup/linux-install/

#3

I’m 99% sure I downloaded it from the website, rather than cloning from GitHub.

I was trying to run things through the project generator, but when that didn’t work, I was advised to try building directly from the console - so it’s possible I’ve half completed one way, and made the other one impossible somehow?

Apologies for the lack of technical language :slight_smile:

#4

Did you follow the manual steps in the Linux install guide?

i.e. Did you run:
cd OF/scripts/linux/ubuntu
sudo ./install_dependencies.sh
?

#5

I did follow those steps and ran install dependencies, i believe. Is there a way to check?

If i run…

cd OF/scripts/linux/ubuntu
sudo ./install_dependencies.sh

…It tells me there’s no such file or directory. I’m considering uninstalling and reinstalling, is that sensible?

#6

Yes, well, or finding where OF actually is…

Looking above, it looks like your OF is at:

/home/james/Bin/OF/

So to install the dependencies, you need to include the part of the path before OF, so:

cd /home/james/Bin/OF/scripts/linux/ubuntu
sudo ./install_dependencies.sh

Or is that what you did?

#7

Did that. We’ve now got it to run but only by running ls and cd all the way down through the directory until we get to the example. It’s long winded but at least it’s running. No idea what the problem is.

Thanks for your help :):slight_smile:

#8

If I get you right, then that sounds actually like normal behaviour.
You need to cd indeed right down into the folder where the example is, for make to be able to find everything it needs to compile that specific example.

Typing ls everytime you change directories might be tedious indeed though, you could also use tab-completion to get there faster, or just open the example folder (where the Makefile) is in your file manager, right click and “open in terminal”. Then you’re directly there and can use make && make run to compile and run it.

Cheers