# CentOS (or RedHat) dependencies

**URL:** <https://forum.juce.com/t/centos-or-redhat-dependencies/8103>\
**Category:** Linux\
**Created:** [February 9, 2012, 6:05pm UTC](https://forum.juce.com/t/centos-or-redhat-dependencies/8103 "2012-02-09T18:05:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hergest](https://avatars.discourse-cdn.com/v4/letter/h/db5fbb/32.png) [@Hergest](https://forum.juce.com/u/Hergest)\
**Post date:** [February 9, 2012, 6:05pm UTC](https://forum.juce.com/t/centos-or-redhat-dependencies/8103/1 "2012-02-09T18:05:08Z")

</div>

Hi!

I’m trying to compile a simple example in an CentOS (5.7) machine, but all I get is hundreds of errors.  
Juce static lib is created ok, but when compiling the example with it, the problems arrive.

Examples:

juce\_linux\_NativeCode.cpp:(.text.\_ZN4juce12XBitmapImageC1ENS\_5Image11PixelFormatEiibiP6Visual[juce::XBitmapImage::XBitmapImage(juce::Image::PixelFormat, int, int, bool, int, Visual\*)]+0x12d): undefined reference to `XShmAttach’

juce\_linux\_NativeCode.cpp:(.text.\_ZNK4juce18LinuxComponentPeer8containsERKNS\_5PointIiEEb[juce::LinuxComponentPeer::contains(juce::Point const&, bool) const]+0xfa): undefined reference to `XTranslateCoordinates’

juce\_PNGLoader.cpp:(.text+0x1aa): undefined reference to `png\_create\_read\_struct’  
(…)

“Introjucer” can’t compile either.

Sure is a dependencies problem… Anyone can help me?

Thanks!

PD: I installed all the dependencies in the “sticky message” (no the exact name, but…)

---

<div class="post-metadata">

**Author:** ![falkTX](https://avatars.discourse-cdn.com/v4/letter/f/9f8e36/32.png) [@falkTX](https://forum.juce.com/u/falkTX)\
**Post date:** [February 9, 2012, 8:08pm UTC](https://forum.juce.com/t/centos-or-redhat-dependencies/8103/2 "2012-02-09T20:08:07Z")

</div>

[quote=“Hergest”]Hi!

I’m trying to compile a simple example in an CentOS (5.7) machine, but all I get is hundreds of errors.  
Juce static lib is created ok, but when compiling the example with it, the problems arrive.

Examples:

juce\_linux\_NativeCode.cpp:(.text.\_ZN4juce12XBitmapImageC1ENS\_5Image11PixelFormatEiibiP6Visual[juce::XBitmapImage::XBitmapImage(juce::Image::PixelFormat, int, int, bool, int, Visual\*)]+0x12d): undefined reference to `XShmAttach’

juce\_linux\_NativeCode.cpp:(.text.\_ZNK4juce18LinuxComponentPeer8containsERKNS\_5PointIiEEb[juce::LinuxComponentPeer::contains(juce::Point const&, bool) const]+0xfa): undefined reference to `XTranslateCoordinates’

juce\_PNGLoader.cpp:(.text+0x1aa): undefined reference to `png\_create\_read\_struct’  
(…)

“Introjucer” can’t compile either.

Sure is a dependencies problem… Anyone can help me?

Thanks!

PD: I installed all the dependencies in the “sticky message” (no the exact name, but…)[/quote]

You need to add ‘-lXext’ to the list of link libraries (and maybe ‘-ldl’ as well) in the Makefile  
afaik, this has been already fixed in the juce-modules git brach

---

<div class="post-metadata">

**Author:** ![Hergest](https://avatars.discourse-cdn.com/v4/letter/h/db5fbb/32.png) [@Hergest](https://forum.juce.com/u/Hergest)\
**Post date:** [February 10, 2012, 9:51am UTC](https://forum.juce.com/t/centos-or-redhat-dependencies/8103/3 "2012-02-10T09:51:57Z")

</div>

“/usr/bin/ld: cannot find -lXext”

In the packet administrator, the system has installed:  
libXext-1.0.1-2.1.i386 and libXext-devel-1.0.1-2.1.i386

I’ll try the git version!

\*Edit: Downloaded git version.: “git clone --depth 1 git://juce.git.sourceforge.net/gitroot/juce/juce”

Tried to compile “Introjucer” and:  
Compiling jucer\_DocumentEditorComponent.cpp  
…/…/Source/Application/jucer\_DocumentEditorComponent.cpp:1: error: valor erróneo (native) para el interruptor -march=  
…/…/Source/Application/jucer\_DocumentEditorComponent.cpp:1: error: valor erróneo (native) para el interruptor -mtune=  
make: \*\*\* [build/intermediate/Release/jucer\_DocumentEditorComponent\_695dff1d.o] Error 1AAA

Trying to compile static library. Compiles ok.

Another try to compile my simple example and… a lot of errors…  
☹

Also tried the “modules” version:  
git clone --depth 1 git://juce.git.sourceforge.net/gitroot/juce/juce  
cd juce  
git checkout -b origin/modules

The same errors… :x

\*\*EDIT: Turn the “experimental” version “g++44” for the compiler, “Introjucer” compiles!!!

---

<div class="post-metadata">

**Author:** ![Hergest](https://avatars.discourse-cdn.com/v4/letter/h/db5fbb/32.png) [@Hergest](https://forum.juce.com/u/Hergest)\
**Post date:** [February 10, 2012, 3:30pm UTC](https://forum.juce.com/t/centos-or-redhat-dependencies/8103/4 "2012-02-10T15:30:08Z")

</div>

Using the “makefile” of “Introjucer”, I could compile my example! 😃
