I am new to OF and have installed Codeblocks & MingW successfully on Win 7.
However when I run any examples or project files. The error I get is
Linking console executable: bin\windowExample.exe
C:\Program Files\CodeBlocks\MinGW\bin\ld.exe: cannot find -lstrmbase
I tried using instructions properly, as per this post,
still no success. Do you think this has to anything do with Win 7?
Please help .
sorry - this problem is most likely related to step (e) – can you possibly check it again?
specifically, you need copy the contents from within one folder (add to libs) into the libs folder (not copying the folders themselves) and the same for the “add to includes” –
can you check it once more and make sure that it’s right?
I just had this same problem and the solution Zach describes worked for me.
I have this problem as well, and I did copy the contents of the two add_to_codeblocks_mingw folders into the corresponding locations.
Win 7, 64 bit. I don’t suppose this could have anything to do with there being a “Program Files” and “Program Files (x86)” directory, and that CodeBlocks resides in the latter?
I moved the files to wherever Code::Blocks installs itself – I suppose that’s the x86 folder (I didn’t notice). I was running Windows 7 x64 for this, and if I understand the problem correctly the only possible issue is just having the files in the wrong directory.
I just repeated all steps from installation to copying the add_to_mingw_* files. Still get the error.
Just to make sure I’m not being a complete 'tard:
I’ve moved the contents of add_to_mingw_include–i.e., the individual files & folders including activecf.h and BaseClasses\ --into the folder C:\Program Files (x86)\CodeBlocks\MinGW\include.
So the file C:\Program Files (x86)\CodeBlocks\MinGW\include\activecf.h exists, as does C:\Program Files (x86)\CodeBlocks\MinGW\include\BaseClasses\amextra.cpp
Is there anything I should be looking for in Build Settings that might affect CodeBlocks’ ability to find -lstrmbase? For example, in Build Options > Linker Settings, the Link Libraries list is empty, and the “other linker options” contains only …/…/…/libs/openFrameworksCompiled/lib/win_cb/openFrameworks.lib.
Everything in the “Search Directories” tab is empty.
The file libSTRMBASE.a exists in C:\Program Files (x86)\CodeBlocks\MinGW\lib. What exactly is codeblocks or ld.exe trying to do with when it tries to “find” -lstrmbase ?
Ok, I got it working.
The issue for me was that I had previously installed Strawberry Perl, which included a GNU C++ compiler, and I guess CodeBlocks was using that compiler which somehow did not see the files added to the MinGW subfolders.
I wasn’t sure how to resolve this other than to uninstall Strawberry; I then had to uninstall CodeBlocks and delete the CodeBlocks folder in $USER\AppData, then reinstall CodeBlocks. When I reinstalled CodeBlocks without deleteing the AppData folder, I still got a “invalid compiler” error.
Presumably there’s a better way than what I did that would allow a user to keep the Strawberry installation intact, but since I don’t use it anymore I went for the most-likely-to-succeed option first.
I was able to compile and run the openFrameworks example projects just fine in Visual Studio 2010 on my Vista machine - then I installed Strawberry Perl for school. Now I recieve 52 errors when I try to compile and run.
I decided to try Code Blocks thinking it’s a quirk with VS . With CB I recieve the error message that “ld.exe cannot find lstrmbase”. I did not use CB before installing Strawberry Perl so I can’t say this error is due to that installation. However, the oF programs compiled and ran in VS 2010 just fine before installing Strawberry Perl.
The first VS error message mentions the xcopy command. I need to figure out what that is. The rest of the messages have to do with Intellisense having issues.
I need Perl installed for school. Is there a way to correct this and have Strawberry Perl and VS coexist?
If you get the -lstrmbase error you most likely have not followed step e) of the setup guide:
Thanks for your reply.
I wish it was that easy. I did follow the instructions in step e. I copied the contents of each folder to the folder as stated in the instructions.
I just noticed that CB is using the C compiler that Strawberry Perl installed (see attached photot). I changed the path to C:\Program Files (x86)\CodeBlocks\MinGW and everything seems to work now in CB.
I suspect VS 2010 has the same sort of issue. Does anyone know where the compiler path is listed in VS 2010?