Differing debug environment
Differing debug environment
- Subject: Differing debug environment
- From: Randall Meadows <email@hidden>
- Date: Wed, 17 Dec 2003 13:46:28 -0500
OK, so I've created this XCode project, a "Standard Tool", based on
an existing Makefile. For reasons I need not go into here, this
program, upon launching, tries to connect to an X Windows server
(Apple's X11, in this particular instance, running on my local
machine) using the X call XOpenDisplay().
When I run the executable built by this XCode project from Terminal,
all is well (at least, the connection to the X server is made).
However, when I try to execute it from within XCode, XOpenDisplay()
fails. I get the same failure whether I try to RUN or DEBUG from
XCode.
In my ~/environment.plist file, I've defined "DISPLAY" to be ":0.0".
In my XCode project, for the executable in question (the only target
in the project) I've defined an environment variable "DISPLAY" and
set its value to ":0.0".
In the process of trying to figure this out, I ended up putting a
call to setenv("DISPLAY", ":0.0", 0) at the start of main() just to
be sure it's defined.
The next statements in my main routine print out the results of
getenv("DISPLAY"), and I get exactly what I'd expect (which is
"DISPLAY=:0.0").
So why can I not make the connection to the X server from within
XCode, while I can from a Terminal session (which does me no good
when trying to debug!).
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.