From: Bing-Chang L. <op...@bc...> - 2003-05-15 01:15:06
|
Hi! I want to use Open C++ on Mac OS 10.2 (and above). I checked out the sandbox-kthulhu line using anonymous CVS and it managed to build the occ program. The main 2.6.1 release does not support Mac OS X, so I am unable to get that to compile at all. I have two main problems that I would like some input on: 1. Open C++ doesn't seem to like GCC 3.1's Standard C++ library 2. Enabling AltiVec extensions ==================================================== 1. Open C++ doesn't seem to like GCC 3.1's Standard C++ library ==================================================== Trying to occ on the following C++ program: #include <iostream> int main(int argc, char *argv[]) { return 0; } Fails with: MOP warning: The hash table is full. Expanded... /usr/include/gcc/darwin/3.1/g++-v3/bits/stl_alloc.h:392: parse error before `= *' /usr/include/gcc/darwin/3.1/g++-v3/bits/stl_alloc.h:401: parse error before `__ret ;' /usr/include/gcc/darwin/3.1/g++-v3/bits/stl_construct.h:67: parse error before `namespace std' /usr/include/gcc/darwin/3.1/g++-v3/bits/stl_construct.h:86: parse error before `template <' /usr/include/gcc/darwin/3.1/g++-v3/bits/stl_construct.h:98: parse error before `template <' /usr/include/gcc/darwin/3.1/g++-v3/bits/stl_construct.h:101: parse error before `__last ;' /usr/include/gcc/darwin/3.1/g++-v3/bits/stl_construct.h:101: parse error before `__first )' /usr/include/gcc/darwin/3.1/g++-v3/bits/stl_construct.h:112: parse error before `template <' /usr/include/gcc/darwin/3.1/g++-v3/bits/stl_construct.h:134: parse error before `template <' /usr/include/gcc/darwin/3.1/g++-v3/bits/stl_construct.h:145: parse error before `} namespace' 10 Error(s). OpenC++ stops. Removing the "#include <iostream>" produces an executable. ==================================================== 2. Enabling AltiVec extensions ==================================================== Trying "occ -- -faltivec main.cpp" on: int main(int argc, char *argv[]) { __vector signed char ch; return 0; } Produces main.cpp:2: parse error before `char ch' 1 Error(s). OpenC++ stops. I was under the impression that Open C++ is a front-end. So perhaps all that I need to do is to get Open C++ to accept my "__vector" as a keyword? Thanks in advance. Regards, Bing-Chang Lai PS: Version information $ g++ --version g++ (GCC) 3.1 20020420 (prerelease) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ occ --version OpenC++ version 2.5.6_testing Copyright (c) 1997-2001 Shigeru Chiba. All Rights Reserved. Copyright (c) 1995, 1996 Xerox Corporation. All Rights Reserved. Copyright (c) 2002 Other Developers. Usage: occ [-l][-s][-V][-v][-E][-m[<file name>]][-c][-n][-p][--regular-c++] [-I<directory>][-D<macro>[=<def>]][-M<option>[=<value>]] [-g][-d<option>][-S<metaclass>] [-- <compiler options>] <source file> -g Produce debugging information -M Specify an <option> with <value> passed to metaobjects -l List metaclasses -S Load a metaclass -s Show program tree on stdout -V Show version -v Verbose mode Building stages options -n Don't preprocess -p Don't translate (stop after parsing) -E Don't compile (stop after translation) -c Don't make executable (stop after compilation) -P Preprocess again after translation -m Compile a metaclass (make a shared library) Preprocessor options -I<directory> Add <directory> to the #include path -D<name>=<def> Define a macro <name> as <def> -d<option> Specify a preprocessor option -C Don't discard comments Other options --regular-c++ Inhibit the extended syntax |