views:

239

answers:

1

Hey, I just Downloaded openvrml from macports (port install openvrml) Now I have a Sample program (pretty_print.cpp from openvrml at sourceforge) that begins like this:

# ifdef HAVE_CONFIG_H
#   include <config.h>
# endif

# include <openvrml/vrml97_grammar.h>
# include <openvrml/browser.h>
# include <fstream>
...

then in Xcode, I added the following path and check "recursive" for the Header search path and Lib Search Path:

/opt/local/var/macports/software

And all '***.h file not found' errors disappeared, but now I have the following two:

complex.h 943 '__pow_helper' is not a member of std
c++locale.h 71 'vsnprintf' is not a member of std

/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/complex: In function 'std::complex<_Tp> std::pow(const std::complex<_Tp>&, int)':
/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/complex:943: error: '__pow_helper' is not a member of 'std'

both errors come from system files. I wonder what is causing this errors... Can anyone advice me on how to use openvrml samples on Macs?

thanks in advance.

+2  A: 

I've had a similar problem. I defined "recursive" flag for an '/opt/local/include' path. This pulled in some strange c++ headers from boost compatiblity includes.

In general, you do not want "recursive" flag on your include paths.

Try unchecking "recursive" from your paths.

Aleksandar Totic
Thanks for your reply, but is not working. Could you tell exactly what your input was in "Header Search Paths" and "Library Search Paths"?I copied the content of pretty_print.cpp into main.cpp of a cpp Xcode project.And, when trying recursive /opt/local/include I get 2 errors, when not recursive I get hundreds!.Also tried tried not recursive opt/local/include and not recursive opt/local/include/openvrml and got only one error in vrml97_grammar.h.I've notice that openvrml file structure is:opt/local/include/openvrml/openvrml/a_lot_of_headers.h, is this strange?
nacho4d
Or Maybe is there another setting in Xcode I might be skipping?
nacho4d
My header search path is just '/opt/local/include', non-recursive.If you have boost headers installed, searching /opt/local/include recursively will blow up with the _pow_helper error. This is because your std c++ headers will come from /opt/local/include/boost/compatibility/cpp_c_headers, and cstdio does not have vsnprintf installed.
Aleksandar Totic