Issues.00229 - lordmundi/wikidoctest GitHub Wiki
00229: doug header relies on X.h
Summary: doug header relies on X.h
Created: 2010–03–05 14:15
Status: Not an Issue
Category: Bug
From: caclaunc
Version: 2.0
Released_In:
Description:
It looks as though the planet2 library utilizes the standard XFree86 libraries included in linux. The X.h header file for that library defines a global variable called "Time". If I attempt to use the planet2 library in a sim which also includes JEOD, I run into a conflict because of this variable (because JEOD defines a class called "Time" as well). It looks as though anyone attempting to use this library along with any standard library which also defines something else as "Time" will have this issue.
Comments
frankie March 08, 2010, at 02:04 PM: I'm going to mark this as "Not an Issue" since it appears that the offender here is JEOD. Emails suggest JEOD will have a fix out in Jeod 2.1, slated for October 2010. For others running into this issue, I'll offer up Brad's note which has some helpful suggestions:
Are you trying to access dsp_plugin2 functions from within a DOUG/EDGE plugin ? If so you do not need to include "doug.h", all you need is "dsp_planet2.h". If you are installing callback functions you may also need to include "dsp.h". "doug.h" is onlyh required if you need to access the "DSS_DOUG" data structure for some reason and is not required for most things. Only the "doug.h" includes the "tk.h" which includes "X.h", this is required since DOUG is a dsp_viewer with an embedded Tcl/Tk interpreter. If you are trying to build a plugin that also exposes some functionality via the Tcl/Tk interpreter then you will need to include those headers if not "doug.h", this will however cause the problems you are referring to since Tk under Unix uses the X window manager headers.
Hope this helps. brad
—FG
brad March 08, 2010, at 03:45 PM: I discovered that even including "dsp.h" will cause Tcl/Tk to be included. I have since modified "dsp_structs.h" to not require the inclusion of Tcl/Tk thereby eliminating the inclusion of X header files if you include "dsp.h" and do not require your plugin to expose "Tcl/Tk" interfaces.