Fresh install of 0.8.3 + C::B -- where's compiled oflib?

I have oF 0.8.3 for CodeBlocks and latest version thereof (13.12). Ran gpuParticleSystemExample and got this error:

“Unable to resolve 1 external dependency:
…\libs\openFrameworksCompiled\lib\win_cb\openFrameworks.lib”

That’s because the …\win_cb directory contains only the file .gitkeep – unlike the Visual Studio version of 0.8.3 which, under openFrameworksCompiled\lib, has a \vs folder with a 38MB compiled lib.

Was C::B supposed to build the lib or was it supposed to be in the download?

I don’t believe that Code::Blocks 13.12 is supported by openFrameworks yet (ref: this post from april).

Code::Blocks should build openFrameworks.lib when you compile an oF project for the first time.

Did you follow the install instructions for Code::Blocks and add the appropriate files to the MinGW directory? When you say you ran the gpuParticleSystemExample, do you mean that you opened it up in C::B, tried building it and error-ed out with that message? Are opening the workspace file or the project file? (You should be opening the workspace file.)

you should open the workspace file instead of the cbp so codeblocks compiles the OF library, that also will make autocomplete work properly.

but, yes as @mikewesthad says i’m not sure 13.12 will work properly

Thanks for your comments.
I did follow the installation instructions closely… except for triggering the .workspace file rather than the .workspace file. So I isolated C::B 13.12 by renaming it, downloaded version 12.11 and tried to do a “startover”.
Yes indeed, triggering the .workplace file in emptyExample launched Code::Blocks 12.11 and it appeared to build the compiled lib (6,13KB) as expected.
Unfortunately, when working on emptyExample I get a bunch of warnings and errors like these examples:
||Warning: .drectve -defaultlib:LIBCMT ' unrecognized| ... ||Warning: corrupt .drectve at end of def file| ... ..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(HTTPSStreamFactory.o):HTTPSStreamFactory.cpp|| undefined reference to__gxx_personality_sj0’|

If I were you I wouldn’t spend a lot of time on this peculiarity. I will bang on it later today. Thanks again.

Don’t worry about the warnings, those won’t hurt you as far as I know.

That error, though, is troublesome. When you started over with 12.11, did you add all the files to MinGW\include\ and MinGW\lib?

mikewesthad:
All seems in order in MinGW include and lib areas. For example, the oF additional folder BaseClass (among others) is located in MinGW\include\ and file d3dx8.lib (among the others) is in place in MinGW\lib.

Lacking a better idea, I downloaded of_v0.8.3_win_cb_release.zip again and reinstalled oF. Like before, triggering emptyExample.workspace produced what looks like a clean build of the oF compiled lib but spews fatal errors working on emptyExample. I list the final few lines put out by CodeBlocks’ log here:

…\libs\poco\lib\win_cb\libPocoNetSSL.a(HTTPSStreamFactory.o):HTTPSStreamFactory.cpp:(.text+0x160b): undefined reference to `_Unwind_SjLj_Resume’

c:/mingw/bin/…/lib/gcc/mingw32/4.8.1/…/…/…/…/mingw32/bin/ld.exe: …\libs\poco\lib\win_cb\libPocoNetSSL.a(HTTPSStreamFactory.o): bad reloc address 0x84 in section `.rdata’

collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (2 minutes, 7 seconds)
20 errors, 37 warnings (2 minutes, 7 seconds)

Sorry to cause any heartburn. I played a quite a bit with openFrameworks a while back and appreciated it greatly. I got a little exasperated with copying emptyExample over and again so tried Cinder. Also very cool but for me, experienced C programmer but new to C++ and openGL, the difficulty in digging out basic features in the sparse documentation sent me back to oF. I hope to make Project Generator work close to what TinderBox does.

Hmm, so the individual openFrameworks libraries are compiling successfully, but when the linker tries to put everything together into an executable something screwy is happening.

I just downloaded the current release, the one you are using, and it builds and run without errors for me. So I suspect that something went wrong with the Code::Blocks installation. Did you uninstall Code::Blocks 13.12 before installing 12.11? I know it’s a pain, but I’d recommend uninstalling all versions of Code::Blocks that you have installed, then redownloading oF v0.8.3, reinstalling Code::Blocks 12.11 and putting the additional files into the fresh installation.

If you are still getting errors after that, then could copy+paste the complete text from the build log within Code::Blocks? Or better yet, you could paste the build log over at pastebin.com and post a link to it.

mikewesthad:
I will follow your suggestions and should be able to report sometime Monday.
Thanks again.

i think the problem might be that your install of codeblocks is using a different mingw that was previously installed in your computer, probably the one from cb13. don’t have cb12 installed right now but somewhere in settings you can see which mingw it’s using and change it to the correct one

1 Like

You can check the version that @arturo is mentioning by going to settings -> compiler settings -> toolchain executables and reading the section that is titled “Complier’s installation directory.”

Since Code::Blocks defaults to installing in C:\Program Files (x86)\CodeBlocks regardless of which version of Code::Blocks you are installing, you might only have one version of MinGW on your computer. Maybe when you try to install C::B12 over an existing installation of C::B13, it realizes that the MinGW from 13 is more recent than the MinGW from 12 and decides to not override it. If that’s the case, then the path of that MingGW installation won’t tell you which version you are using. If you open up cmd, type in cd "C:\Program Files (x86)\CodeBlocks\MinGW\bin" and then type in g++ --version and then ld --version, that would give you an idea of what version you are running. (It should be 4.7.1 for g++ and 2.22 for ld.)

Bottom line, though - if you uninstall Code::Blocks and then do a fresh install of 12.11, you shouldn’t have to worry about any of the above. Uninstalling + reinstalling should set you up with the proper MinGW version.

MinGW mixup seems to be the answer. To compound the situation I had another installation of MinGW at the top directory level! (This was a left-over from an ancient project.)
Scrubbing all openFrameworks and CodeBlocks instances and reinstalling both – including the additional files for CB include and lib – resulted in an error-free build and run.
Thanks mikewesthad and arturo for walking me through the mess!
Bob

1 Like