WOW thank you so much, that was the last little bit I needed to get this
working. Here's the basic process I went through, for the benefit of those
who read this later:
1. I installed Xcode and X11 from the OS X disc (obviously).
2. I used Vlad's build.sh script on the following packages (which I
downloaded from their respective sites): cairo-1.6.4,
fontconfig-2.6.0, freetype-2.3.7, gettext-0.17, glib-2.18.1,
pango-1.20.5,
and pixman-0.12.0.
3. I downloaded clutter-0.8.4 and ran the following:
./configure --with-flavour=osx; make; make install
4. I set up PKG_CONFIG_PATH:
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH
5. I got the flags from pkg-config:
pkg-config --cflags clutter-0.8
pkg-config --libs clutter-0.8
6. Finally, for those who want this to work in Eclipse, just create a blank
ANSI C project and right-click it and go to Properties. In the sidebar ender
C/C++ Build go to Settings, and under the Tool Settings tab go to
Miscellaneous under MacOS X C Linker (or whatever they call it on your
platform) and paste the output from "pkg-config --libs clutter-0.8" in the
"Linker flags" box. Then go to Miscellaneous under GCC C Compiler and paste
the output from "pkg-config --cflags clutter-0.8" in the "Other flags" box.
Finally, go to Directories under GCC C Compiler and put in the directory
that the clutter headers were installed (mine
was /usr/local/include/clutter-0.8).
To test it out, paste the code below in your main C file. If the resulting
program brings up a blank window like it does with me, that means (I'm
guessing) it works!
#include <clutter/clutter.h>
#include <stdlib.h>
int main(int argc, char **argv) {
ClutterActor *stage;
clutter_init (&argc, &argv);
stage = clutter_stage_get_default ();
clutter_actor_show (stage);
clutter_main ();
return EXIT_SUCCESS;
}
THANK YOU again everyone for the help.
On Thu, Jan 1, 2009 at 1:31 PM, Reid van Melle <[email protected]> wrote:
> The clutter guys have done a really nice job of providing pkg-config files
> that will currently and in the future ensure that all of the right header
> files and libraries are made available for compiling. You can test this
> very easily:
>
> % pkg-config --cflags clutter-0.8
> % pkg-config --libs clutter-0.8
>
> Everything that is listed there should be in the Eclipse compile and link
> flag sections respectively. I don't know Eclipse at all, but I would be
> shocked if they didn't provide a mechanism for using pkg-config dynamically.
>
> If you get pkg-config errors, ensure that your PKG_CONFIG_PATH is set
> properly. It should include:
>
> % echo $PKG_CONFIG_PATH
> /usr/local/lib/pkgconfig
>
> Good luck.
>
> - Reid
>
> On 1-Jan-09, at 12:20 PM, Z. S. O. wrote:
>
> Hey again everyone,
>
> I've included a screenshot of the Eclipse settings panel. I've successfully
> added /usr/local/include/clutter-0.8 to the GCC C Compiler-->Directories
> section, but I think I need to link to the library itself as well because
> I'm still getting errors.
>
> I added /usr/local/lib/libclutter-osx-0.8.0.dylib to the MacOS X C
> Linker-->Libraries section, as the screenshot shows, but the errors don't go
> away so I imagine I'm doing it wrong.
>
> I also included a screenshot of some of the hundreds of errors I'm getting,
> in case it helps.
>
> On Wed, Dec 31, 2008 at 7:02 PM, Z. S. O. <[email protected]> wrote:
>
>> Okay I figured out my problem -- you need to add
>> "/usr/local/include/clutter-0.8" to Settings-->GCC C++
>> Compiler-->Directories, not Settings-->MacOSX C++ Linker-->Libraries.
>> I'm still getting a bunch of errors, but I assume that's because I need to
>> get the C++ bindings working. I figured that would be built-in but I guess
>> not.
>>
>> Anyway thank you again Vlad, you've been a huge help!
>>
>>
>> On Wed, Dec 31, 2008 at 10:37 AM, Vlad Seryakov
>> <[email protected]>wrote:
>>
>>> Linker flags are for -L -l options, -I includes should go into other C++
>>> options, i do not use Ecclipse so i do not know exactly
>>>
>>> Z. S. O. wrote:
>>>
>>>> Not sure why that isn't working...in Eclipse, you just go to
>>>> Properties-->C/C++ Build-->Settings-->MacOSX C++ Linker Libraries and add
>>>> what you want to go before the "-l". When I add
>>>> "/usr/local/include/clutter-0.8.4" it still can't find it.
>>>>
>>>> On Tue, Dec 30, 2008 at 9:30 PM, Vlad Seryakov
>>>> <[email protected]<mailto:
>>>> [email protected]>> wrote:
>>>>
>>>> Then it should be -I/usr/local/include/clutter-0.8.4 or clutter-.9,
>>>> depends on version you installed
>>>>
>>>> Z. S. O. wrote:
>>>>
>>>> Ahhh, I just found it. It's in /usr/local/include. I just did
>>>> the pkg-config commands again and they work now. Is there
>>>> anything else I need to do to get Eclipse working? It still
>>>> can't find clutter/clutter.h.
>>>>
>>>> On Tue, Dec 30, 2008 at 9:20 PM, Vlad Seryakov
>>>> <[email protected] <mailto:[email protected]>
>>>> <mailto:[email protected]
>>>> <mailto:[email protected]>>> wrote:
>>>>
>>>> Strange, where did make install send the files then?
>>>>
>>>> Z. S. O. wrote:
>>>>
>>>> And to be clear, I don't see clutter-0.8.4 in
>>>> /opt/local/lib either.
>>>>
>>>> On Tue, Dec 30, 2008 at 9:16 PM, Z. S. O.
>>>> <[email protected] <mailto:[email protected]>
>>>> <mailto:[email protected]
>>>> <mailto:[email protected]>> <mailto:[email protected]
>>>> <mailto:[email protected]>
>>>>
>>>> <mailto:[email protected]
>>>> <mailto:[email protected]>>>> wrote:
>>>>
>>>> Should I see a directory called "clutter-0.8.4" int
>>>> /opt/local?
>>>> Because I don't. I only see bin,
>>>> etc, include, lib, libexec, man, sbin, share, and var.
>>>> I hope the
>>>> installation didn't fail without me knowing it...
>>>>
>>>> Anyway, I did "export
>>>>
>>>> PKG_CONFIG_PATH=/opt/local/lib/pkgconfig:$PKG_CONFIG_PATH"
>>>> but the
>>>> two pkg-config commands appear to have the same result
>>>> as before.
>>>>
>>>> On Tue, Dec 30, 2008 at 9:06 PM, Vlad Seryakov
>>>> <[email protected]
>>>> <mailto:[email protected]> <mailto:[email protected]
>>>> <mailto:[email protected]>>
>>>> <mailto:[email protected]
>>>> <mailto:[email protected]>
>>>> <mailto:[email protected]
>>>> <mailto:[email protected]>>>> wrote:
>>>>
>>>> When you compiled clutter and then installed, i
>>>> suppose
>>>> it went
>>>> into /opt/local with pkgconfig files in
>>>> /opt/local/lib/pkgconfig
>>>>
>>>> You need to set environment variable
>>>>
>>>> PKG_CONFIG_PATH=/opt/local/lib/pkgconfig:$PKG_CONFIG_PATH
>>>>
>>>> before running pkg-config command
>>>>
>>>>
>>>>
>>>> Z. S. O. wrote:
>>>>
>>>> So you mean that running those two commands
>>>> should
>>>> fix the
>>>> Eclipse issues, or is that something else? Both
>>>> of
>>>> them lead
>>>> to this error: "Package clutter-0.9 was not
>>>> found in the
>>>> pkg-config search path."
>>>>
>>>> Here's the Eclipse console output for the
>>>> empty project:
>>>>
>>>> make all Building file: ../src/TestClutter.cpp
>>>> Invoking: GCC C++ Compiler
>>>> g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD
>>>> -MP
>>>> -MF"src/TestClutter.d" -MT"src/TestClutter.d"
>>>> -o"src/TestClutter.o" "../src/TestClutter.cpp"
>>>> ../src/TestClutter.cpp:1:29: error:
>>>> clutter/clutter.h: No
>>>> such file or directory
>>>> make: *** [src/TestClutter.o] Error 1
>>>>
>>>> On Tue, Dec 30, 2008 at 8:51 PM, Vlad Seryakov
>>>> <[email protected]
>>>> <mailto:[email protected]>
>>>> <mailto:[email protected]
>>>> <mailto:[email protected]>>
>>>> <mailto:[email protected] <mailto:[email protected]>
>>>> <mailto:[email protected]
>>>> <mailto:[email protected]>>>
>>>> <mailto:[email protected]
>>>> <mailto:[email protected]>
>>>> <mailto:[email protected]
>>>> <mailto:[email protected]>>
>>>>
>>>> <mailto:[email protected]
>>>> <mailto:[email protected]>
>>>> <mailto:[email protected]
>>>> <mailto:[email protected]>>>>> wrote:
>>>>
>>>> You have to use `pkg-config --cflags
>>>> clutter-0.9`
>>>> `pkg-config --libs
>>>> clutter-0.9`
>>>>
>>>> If Ecclipse cannnot execute, just run it
>>>> and add the
>>>> output into
>>>> project properties
>>>>
>>>>
>>>> Z. S. O. wrote:
>>>>
>>>> I have successfully built and installed
>>>> clutter after
>>>> running
>>>> Vlad's script (thanks again!). I am now
>>>> attempting to
>>>> create a
>>>> C++ project in Eclipse, but I don't
>>>> know how
>>>> to link
>>>> it the
>>>> clutter library. I added "clutter" to
>>>> the
>>>> linker in
>>>> the project
>>>> properties, but it still can't find
>>>> clutter/clutter.h
>>>> when I
>>>> #include it. Is there something else I
>>>> need to
>>>> do to
>>>> get it working?
>>>>
>>>>
>>>> -- Vlad Seryakov
>>>> [email protected]
>>>> <mailto:[email protected]>
>>>> <mailto:[email protected]
>>>> <mailto:[email protected]>>
>>>> <mailto:[email protected] <mailto:[email protected]>
>>>> <mailto:[email protected]
>>>> <mailto:[email protected]>>>
>>>> <mailto:[email protected]
>>>> <mailto:[email protected]>
>>>> <mailto:[email protected]
>>>> <mailto:[email protected]>>
>>>>
>>>> <mailto:[email protected]
>>>> <mailto:[email protected]>
>>>> <mailto:[email protected]
>>>> <mailto:[email protected]>>>>
>>>>
>>>> http://www.crystalballinc.com/vlad/
>>>>
>>>>
>>>>
>>>> -- Vlad Seryakov
>>>> [email protected]
>>>> <mailto:[email protected]> <mailto:[email protected]
>>>> <mailto:[email protected]>>
>>>> <mailto:[email protected]
>>>> <mailto:[email protected]> <mailto:[email protected]
>>>> <mailto:[email protected]>>>
>>>> http://www.crystalballinc.com/vlad/
>>>>
>>>>
>>>>
>>>>
>>>> -- Vlad Seryakov
>>>> [email protected] <mailto:[email protected]>
>>>> <mailto:[email protected] <mailto:[email protected]
>>>> >>
>>>> http://www.crystalballinc.com/vlad/
>>>>
>>>>
>>>>
>>>> -- Vlad Seryakov
>>>> [email protected] <mailto:[email protected]>
>>>> http://www.crystalballinc.com/vlad/
>>>>
>>>>
>>>>
>>
> <screenshot-settings.png><screenshot-errors.png>
>
>
>