I can't get OF to work! please help

I cant get openframeworks to run. I have downgraded codeblocks to 13.12 to 12.11 with no avail. I can’t seem to find a guide or even a reference to where the hell the files from pic related even go. I try loading an example workspace and the compiler doesn’t even bother because there’s no such thing as “ofMain.h” in my PC. I’m really new to this, I wanna create an audio visualizer, I’m currently learning c++ so I don’t wanna use processing. I’m on win8.1 64bits.

I just want to install OF correctly, with all the wistles and bells, but there’s no guide nor reference anywhere I look. what the heck am I supposed to do?

Hi there!

You can follow the code::blocks setup guide, it’s on the download page.

I did follow the guide, however I cant get it to work still. The example workspace of the tutorial wont load. I’m a complete beginner so I dunno what else I could add that may give you guys a hint. The compiler stops at the very first line cause it wont find the header file. Again I’ve followed the setup guide like 5 times already.

thanks for the quick reply, tho.

please post the error.

did you install codeblocks with mingw? Did you follow step “e” from the guide?

thanks,
zach

||=== graphicsExample, release ===|
C:\Program Files (x86)\CodeBlocks\MinGW\examples\graphics\graphicsExample\src\main.cpp|1|fatal error: ofMain.h: No such file or directory|
||=== Build finished: 1 errors, 0 warnings (0 minutes, 0 seconds) ===|

yes I did follow everything! thank you guys for bearing with me

Did you place the whole OF folder inside MinGW or only the examples folder?

have you moved the example out of the OF folder? can you run the “tree” command from within the root OF folder?

@hubris

Did you place the whole OF folder inside MinGW or only the examples folder?

yes, I placed the addons, apps, examples, export, all of them in C:\programfiles(x86)\codeblocks\MinGW

@zach

have you moved the example out of the OF folder? can you run the "tree" command from within the root OF folder?

yes, I did copy the graphics example to another place. Umm the “tree” command? I’m sorry, I’ve looked all over the place and I can’t find it.

that doesn’t sound right – can you possibly post a screenshot of what your mingw looks like?

the OF folder (The things inside the download) can go anywhere on your hard drive, but you can’t change their position to each other. For example, a project file looks relatively for the libs folder “…/…/…/libs” and if you start moving them around, you can mess up this relationship quickly.

It would be helpful if we can get a better sense of what you did.

that doesn't sound right -- can you possibly post a screenshot of what your mingw looks like?

sure thing

you should defintiely not put OF folders in the mingw folder. Something is wrong there. Can you uninstall codeblocks and mingw and start over? Please follow the instructions carefully, which tell you about installing specific includes and libs into mingw. Keep the OF folder separate and put it somewhere, on your desktop for example, but don’t move the contents of it around.

thanks!

alright @zach I installed everything again. I guess I’m getting closer to getting this thing on its feet since now I tried to build & run the graphics example and it only threw this error:

||=== graphicsExample, release ===|
 ..\..\..\libs\openFrameworksCompiled\lib\win_cb\openFrameworks.lib||No such file or directory|
||=== Build finished: 1 errors, 0 warnings (0 minutes, 12 seconds) ===|

(I have placed the open frameworks addons and so in C:\Users\redmachin\Documents\openframeworks)

cool ! now, open up the workspace file instead of the project file (the project file is called .cbp, the workspace looks similar to that). Try opening that instead of the project file. The workspace file builds OF if it’s not already built and also the corresponding project. The project file doesn’t know about if the OF library is built or not.

ITS ALIVE
thank you @zach!

:+1: glad to hear…

just one more question before I wrap this up. Is OF compatible with codeblocks 13.12? Or should I stay in 12.11?

I use Code::Blocks 13.12 with OF 0.8.4. so YES they are compatible.

13.12 may work with the right configuration, but it is not yet officially supported :smile: If you get it working, please post a setup guide!

@bakercp I’ve used 13.12 for oF since i started. I just followed the setup you have on your site for codeblocks. its exactly the same.

(the only thing I did differently from your setup is the part about the “codeblocks_additions” folder, since I didn’t want to contaminate my MinGW folder. Instead I just globally included it in my compiler include settings. But that isn’t required, it works either way)

1 Like

Yes, like @BananasGoMoo said, I too just followed the steps from the existing setup guide. Everything worked fine, I tried virtually all the examples and they ran without problems. For the record, I’m on Windows 8 (64 bit).

1 Like