New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus • Advice and insight from world-class Apple enthusiasts • Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Problem including X11 in XCode.


Post Reply New Thread Subscribe

 
Thread Tools
CosmicQuahog

 
Member Since: Mar 18, 2013
Posts: 3
CosmicQuahog is on a distinguished road

CosmicQuahog is offline
I am using XCode and a library called CImg which uses X11. When I run this program:
include "CImg.h"
using namespace cimg_library;
int main() {
CImg image("snail.bmp");
}

I get these errors:

Undefined symbols: "_XUnlockDisplay", referenced from:
"_XGetVisualInfo", referenced from: cimg_library::CImgDisplay::_assign(unsigned int, unsigned int, char const*, unsigned int, bool, bool)in main.o
"_XStoreColors", referenced from: cimg_library::CImgDisplay::_set_colormap(unsigned long&, unsigned int)in main.o
etc.

I think XCode doesn't know where my X11 is, and to be honest I'm not sure I've installed it correctly. I think it is supposed to be in opt/X11 but I don't see it.
Any idea of how to fix this?
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 18,352
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
I'm not sure what version of OS X you're using but if you're using Snow Leopard or newer, head over to the XQuartz project and install X11 from there.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks
CosmicQuahog

 
Member Since: Mar 18, 2013
Posts: 3
CosmicQuahog is on a distinguished road

CosmicQuahog is offline
Quote:
Originally Posted by vansmith View Post
I'm not sure what version of OS X you're using but if you're using Snow Leopard or newer, head over to the XQuartz project and install X11 from there.
I am using 10.5.8 and have installed XQuartz. I am still getting the same error though. I think it has to do with changing my command line tools in XCode. How do I do this?
QUOTE Thanks
CosmicQuahog

 
Member Since: Mar 18, 2013
Posts: 3
CosmicQuahog is on a distinguished road

CosmicQuahog is offline
I forgot to mention I am using XCode 3.1.4, if that matters.
QUOTE Thanks
cradom

 
cradom's Avatar
 
Member Since: Feb 14, 2004
Location: Nederland, Texas
Posts: 3,474
cradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant future
Mac Specs: 13in macbook - 10.10.1

cradom is offline
What you need to do is install the X11 SDK, or Software Development Kit. Don't ask me where to get it, haven't messed with that in a LONG time.

Craig Domingue - resident redneck.
“Never argue with an idiot. He will only bring you down to his level and beat you with experience.”, George Carlin
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 18,352
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
Quote:
Originally Posted by cradom View Post
What you need to do is install the X11 SDK, or Software Development Kit. Don't ask me where to get it, haven't messed with that in a LONG time.
I imagine that a copy is available on Apple's developer download page.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks

Post Reply New Thread Subscribe


« Codesign not working "Timestamp service not available" | Size of Arrays »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Problem installing xcode dbm OS X - Development and Darwin 2 05-19-2012 06:32 PM
Xcode problem lordlucan Switcher Hangout 32 04-25-2012 10:49 AM
How exactly do I use X11? Nightblade OS X - Development and Darwin 6 05-28-2004 11:46 PM
G5 Video problem WilliS Apple Desktops 3 05-05-2004 10:16 AM
xcode c++ problem WilliS OS X - Development and Darwin 1 04-04-2004 05:50 PM

All times are GMT -4. The time now is 11:04 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?