TWiki home VRJ Wiki > Juggler > CppCHeaders (r1.1 vs. r1.2) VRJ Wiki webs:
Juggler | VRJPlanning | Main | TWiki | Test
Juggler . { Home | Changes | Index | Search | Go }
 <<O>>  Difference Topic CppCHeaders (r1.2 - 12 Sep 2002 - PatrickHartling)

Q: What are these cstddef, cctype, etc., files and why can't my compiler find them?

Line: 31 to 31

Back to: LiveFaq

META FORM FaqForm  
Changed:
<
<
META FIELD FaqTopic FaqTopic Applications
>
>
META FIELD FaqTopic FaqTopic Compiling

META FIELD ShortQuestion ShortQuestion What are these cstddef, cctype, etc., files and why can't my compiler find them?

 <<O>>  Difference Topic CppCHeaders (r1.1 - 11 Sep 2002 - PatrickHartling)
Line: 1 to 1
Added:
>
>

Q: What are these cstddef, cctype, etc., files and why can't my compiler find them?

When I try to compile a VR Juggler 1.1 application, I get compiler errors because headers such as cstddef, cstdlib, cctype, etc. are not found. What are these files, and why can't my compiler find them?

A: Some compilers do not have all the standard C++ headers, so you must add -I$VJ_BASE_DIR/include/boost/compatibility/cpp_c_headers when compiling.

The C++ standard defines headers used to include old C headers such as stdlib.h and ctype.h. They are named based on the C header with the prefix "c" and no ".h" extension. Not all compilers (most notably, SGI's MIPSpro Compilers) have these headers. The Boost software library ( http://www.boost.org/ ) makes use of these headers since they are part of the C++ standard. To deal with those compilers that do not ship with the headers in question, Boost commes with a compatibility directory that you can add to your compile line. If you are using the version of Boost that comes with VR Juggler 1.1/2.0, just add the following to your C++ compiler flags:

   -I$VJ_BASE_DIR/include/boost/compatibility/cpp_c_headers

Better yet, use the vrjuggler-config script to get the list of compiler arguments. It will give you the arguments needed that are appropriate for the compiler you are using. To use this script in a GNU makefile, simply add the following:

   CXXFLAGS= $(shell vrjuggler-config --cxxflags)

If you're not using GNU make, use the following:

   CXXFLAGS= `vrjuggler-config --cxxflags`

For this to work, you must have $VJ_BASE_DIR/bin in your path. (This is required if you are trying to compile any of the sample applications that come with VR Juggler 1.1 and 2.0.)

Back to: LiveFaq

META FORM FaqForm  
META FIELD FaqTopic FaqTopic Applications
META FIELD ShortQuestion ShortQuestion What are these cstddef, cctype, etc., files and why can't my compiler find them?


Topic CppCHeaders . { View | Diffs | r1.2 | > | r1.1 | More }
Revision r1.1 - 11 Sep 2002 - 18:51 - PatrickHartling
Revision r1.2 - 12 Sep 2002 - 14:50 - PatrickHartling

Copyright © 1999-2008 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding VRJ Wiki? Send feedback