Creating a JUCE application with Code::Blocks and MinGW


#1

Creating a JUCE 1.5 application with Code::Blocks+MinGW 8.02

  1. open the Juce project: juce/build/win32/codeblocks/juce.cbp
  2. open the demo app project: juce/extras/juce demo/build/win32_codeblocks/JuceDemo.cbp

Building “Juce Library” project I get:

Linking static library: ..\..\..\bin\codeblocks\libjucedebug.a ar.exe: creating ..\..\..\bin\codeblocks\libjucedebug.a ar.exe: build\.objd\src\juce_appframework\audio\plugins\formats\juce_AudioUnitPluginFormat.o: No such file or directory

Cheers,
Miquel.


#2

Keeping codeblocks up to date is a very low priority for me, sorry. I thought it was ok in the actual 1.50 version though (but it certainly won’t work with the current tip if that’s what you’re using).


#3

this looks like AU on windows, delete all the AU stuff from the codeblocks project, and zou should be fine.

if all else fails, download VS Express it’s free and even if you hate M$, it still is a great IDE


#4

I don’t want to sound like a cheerleader but I spent 3 days porting my project over to the Qt Creator IDE. I was previously using Code:Blocks. I normally develop under Visual Studio, but VC++ uses a two pass template compilation method which is very lax, so I often break my Macintosh build.

I would compile under Code:Blocks every week and spend hours fixing the compile errors. Code:Blocks is pretty rough and no longer under active development. I got my project working in Qt Creator and let me tell you, this IDE is AWESOME. In some ways better than visual studio (but some ways worse).

Qt Creator is under active development, and can be used to build native applications (you do not need to use the Qt libraries). There are even a couple of very active IRC channels where you can get help (unlike Code:Blocks). The debugger is quite good.

I am still using Visual Studio because it is a little bit faster at compiling and checking dependencies, and of course the Visual Studio debugger is still the king. But I have switched to using the Intel C++ compiler as my back end since it has the stronger 1-pass template checking so I don’t break the Mac builds.

Qt Creator is FREE (and open source):
http://qt.nokia.com/products/developer-tools

Quite frankly, Qt Creator does everything that Code:Blocks does, times ten, and more. There is never a reason to use Code:Blocks anymore.


#5

Thanks very much. I’ll check that.

Cheers,
Miquel.


#6

I’ve encountered the same problem. The solution is to remove the juce_AudioUnitPluginFormat.cpp from the project file, cause it doesnt exist anymore. And the same must be done to a source file related to QuictTime, but the compiler tells that filename exactly :slight_smile:

Then, to solve the “sorry, unimplemented…” forcedinline problem, either use MinGW-TDM (which uses gcc 4.4.1 if I’m right, as seen here, it works well), or here is a solution for earlier gcc versions:

[quote=“ZekeDragon”]I fixed it. Go to src\juce_core\basics\juce_PlatformDefs.h, lines 342 to 353, and change…

[code]#else
/** A platform-independent way of forcing an inline function.

  Use the syntax: @code
  forcedinline void myfunction (int x)
  @endcode

*/
#ifndef JUCE_DEBUG
#define forcedinline inline attribute((always_inline))
#else
#define forcedinline inline
#endif
[/code]
to

[code]#else
/** A platform-independent way of forcing an inline function.

  Use the syntax: @code
  forcedinline void myfunction (int x)
  @endcode

*/

#define forcedinline inline
[/code]

This will build properly. However, it does remove any distinction between the Debug version and the Release version for inlining functions outside of MSVC, and does not force inlining in rather crucial processor heavy areas. I’m not too sure if this will make any major impact on the speed of the program, but I do know that it builds properly.[/quote]