Compiling using CDT plugin for Eclipse


#1

Hi,

First time poster, please be gentle. I wasn’t sure this topic deserved its own thread since answers here might be similar to the other thread about compiling with MinGW and Cygwin, but I went ahead and started a new thread anyway. Mods feel free to merge them if warranted.

I’m trying to compile JUCE using the CDT Plugin in Eclipse which I’ve set up to use MinGW and Msys for gcc, g++, and gdb. I’ve been successfully writing, compiling and linking C and C++ projects for my classwork in school within this Eclipse CDT Plugin environment.

This is the first time I’ve tried to import and build an outside library. I opened a new workspace, and a new managed make C++ project, then imported the JUCE_1.41 directory tree (everything except the linux and mac specific folders). As soon as I did, the builder took off on it’s own using default settings.

I’m sure there are some specific build settings I need to make but I don’t know what to change and what to leave alone. There are project/property build settings in a dialog box as well as a .cdtbuild xml file. The xml file might get automatically updated when changes are made in the properties dialog. Is anyone else using CDT and Eclipse with JUCE? Can anyone help me sort out this lib making process?

Everything seems to have compiled into .o files at least but no binaries appeared in the bin directory and there is what looks like one error chain that starts in: juce_PixelFormats.h
class: PixelARGB
The two forcedinline functions tween(const Pixel&, const uint32) and set(const Pixel&) generate the error messages:

sorry, unimplemented: inlining failed in call to 'void juce::PixelARGB::tween(const Pixel&, juce::
 uint32) throw () [with Pixel = juce::PixelARGB]': function body not available

sorry, unimplemented: inlining failed in call to 'void juce::PixelARGB::set(const Pixel&) throw () [with 
 Pixel = juce::PixelARGB]': function body not available

And then in the class PixelRGB
Only the forcedinline function set(const Pixel&) generates another “sorry, unimplemented…” message.

Then there are a few other places (where those inline functions are called) that also generate error messages , but I think those are just sympathetic downstream error messages.

Thanks for any help. I’m very excited about the possibilities that JUCE represents.


#2

Hi there

I don’t understand this - if it’s using mingw, then why would you get compiler errors in code that works happily in devcpp/mingw? I’ve never actually tried eclipse myself, so don’t know much about it, sorry!


#3

Here is a typical console output from one file that reports errors. Can you see any g++ option settings that look wrong? I’m using g++ (GCC) version 3.4.2 (mingw-special)

make -k all Building file: ../src/juce_appframework/gui/graphics/imaging/juce_Image.cpp Invoking: GCC C++ Compiler g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/juce_appframework/gui/graphics/imaging/juce_Image.d" -MT"src/juce_appframework/gui/graphics/imaging/juce_Image.d" -o"src/juce_appframework/gui/graphics/imaging/juce_Image.o" "../src/juce_appframework/gui/graphics/imaging/juce_Image.cpp" ../src/juce_appframework/gui/graphics/imaging/../colour/../colour/juce_PixelFormats.h: In member function `virtual void juce::Image::clear(int, int, int, int, const juce::Colour&)': ../src/juce_appframework/gui/graphics/imaging/../colour/../colour/juce_PixelFormats.h:136: sorry, unimplemented: inlining failed in call to 'void juce::PixelARGB::set(const Pixel&) throw () [with Pixel = juce::PixelARGB]': function body not available ../src/juce_appframework/gui/graphics/imaging/juce_Image.cpp:180: sorry, unimplemented: called from here ../src/juce_appframework/gui/graphics/imaging/../colour/../colour/juce_PixelFormats.h:355: sorry, unimplemented: inlining failed in call to 'void juce::PixelRGB::set(const Pixel&) throw () [with Pixel = juce::PixelARGB]': function body not available ../src/juce_appframework/gui/graphics/imaging/juce_Image.cpp:188: sorry, unimplemented: called from here make: *** [src/juce_appframework/gui/graphics/imaging/juce_Image.o] Error 1 Building file: ...

Do you think adapting the devcpp/mingw makefile is a good place to start developing my own makefile under Eclipse?


#4

Take a look at this thread:
http://www.rawmaterialsoftware.com/juceforum/viewtopic.php?t=1312

Keep in mind that thread is in the Juce Linux forum, but the discussion there of the Eclipse CDT should apply to you.

Don’t forget about maybe using premake which is at:
http://premake.sf.net/
but I have no experience using premake on windows


#5

The problem seems to be triggered by ‘forcedinline’. I ran into this one myself a while ago. My simple solution was to remove the ‘forcedinline’ from the methods where GCC complains about it. It seems that GCC 3.4.2 is not able to inline some methods.


#6