Undefined Reference to JUCE

The last several hours have been quite an interesting journey for me in an attempt to get Juce to become fully functional. I’ve been doing it almost entirely without support, running it on most likely very incompatible systems, and have finally decided to surrender up to the fact that I’m completely stumped. Usually I’m quite capable of navigating my way through linker problems, dealing with missing file names, and obtaining any software I need, but this one has truly derailed my progress.

First it should be known I’m running Vista, as unfortunate as that is. I’ve downloaded everything I needed and made fresh installs of MinGW (the new version, 3.4.5), and Code::Blocks, a relatively recent build (recent as of yesterday). I had downloaded and extracted Juce in the file “C:\Frameworks\Juce”, which is how I usually deal with my application frameworks, and prepared to build the necessary Juce library. This presented me with great difficulty which, after looking over the forums, I found that a rather crude solution was found. By eliminating ALL instances of the declaration “forcedinline”, you could circumvent the problem I was having and compile. I noticed that my Debug build would build perfectly fine, without the need of this editing, but my Release build would return an error. I decided to seek out where “forcedinline” was declared and make it emulate the Debug version. I eventually found it in “src\juce_core\basics\juce_PlatformDefs.h”, at the bottom, and attempted to correct it.

After going through several of the 6 minute process of rebuilding (I had tried multiple times to get “forcedinline” to work), it still returned the error.

I then just built the Debug version with the appropriate code, then for the Release version I temporarily removed them all, in both the code files where “forcedinline” occurs, and built it without further problems.

There were other problems I quickly squelched along the way afterward, but nothing too severe. That is, until I attempted to build a new project with said library, named “libjuce.a”. I basically took verbatim the Sample project on the Main Juce Forum’s second sticky post, and tried to compile it. It failed, not because it couldn’t find juce.h (I had given my IDE the appropriate includes) but because of a trillion undefined references, basically saying everything I had written wasn’t there. Both the libraries on my computer are located on “C:\Frameworks\lib”, wholly seperated from the Juce main folder, however that shouldn’t even be an issue with a correctly built library.

I’ll probably figure it out, given time, but for now, I am out!

Funny - I’ve never had problems with the forcedinclude before, and I’ve also got mingw 3.4.5…

It just sounds like it’s not finding the juce lib. You say you set up the path to juce.h, but did you also set up the libs path?

Here is a post of some people that had a similar problem, and their solution was the same as that I did. I’ve been continuing to experiment with my C::B, and I know I have the linker pointing to the proper paths, tried both relative paths and direct paths, but neither work. I’m starting to wonder if the objective is to point to libjuce.a at all, and I’ve also noticed that all the errors start up at my second declared destructor (at line 70) and the program does, in fact, “compile”. The issue is the linker, that’s what’s causing problems.

I’m going to try and rebuild the libs. If that doesn’t work, who knows… startin’ to think I can’t ever get Juce to work.