Hello,
Before I begin, I truly hope this is not a repeatedly-asked question....
I'm trying to compile C++ code which is currently merely #include-ing
dx.h. I'm running RH9 linux, using GCC/G++ 3.2.2, and OpenDX 4.3.2
(which I compiled myself).
When including dx.h in my C++ source, as follows:
#include "dx/dx.h"
my G++ compile error is:
In file included from.... (bunch of files):
/usr/local/dx/include/dx/object.h:30: using typedef-name `std::string'
after `
struct'
So I look at .../include/dx/object.h, and it redefines "string" to be
"*String". Since I'm also doing a "using namespace std" in my C++
header file hierarchy, I have a feeling that G++ is getting hung up
about "string" (from an #include <string> in the included headers).
Does anyone know a clever way around this? I believe a similar problem
with the C++ "private" keyword was already taken care of in object.h by
redefining it to be "__private__" if the C++ compile was detected. I
know one solution would be to add a similar definition for "string", but
I really do not want to edit OpenDX source. Too bad all OpenDX types
were not prefixed with "dx" or something similar to emulate the benefit
of C++ namespaces...
Thanks for your time and any suggestions.
Matt Genovese
University of Texas at Austin
--