vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| "James Pearce" <jlpearce@pacbell.net> wrote in message news:<0129c.15008$Wh1.14022@newssvr27.news.prodigy .com>... > Greetings, > > I'm having a difficult time with a previously installed copy of the 3.3.2 > GNU compiler collection - first, it didn't seem that the c++ header files > and libraries were installed (couldn't find them at all, and the compiler > hadn't a clue). > > Finally found them, and copied them (really copied, not linked) into > /usr/local/include/c++/3.3.2. Made sure to chmod 755 the directories, set > CPLUS_INCLUDE_PATH (was this necessary?), and tried to compile a simple > 'Hello World': > > #include <iostream> > > int main() > { > std::cerr<<"Hello, World!"<<std::endl; > return 0; > } > > > When I do try to compile (gcc -c src/HelloWorld.cpp), I get the following: > > In file included from > /usr/local/include/c++/3.3.2/bits/locale_facets.tcc:41, > from /usr/local/include/c++/3.3.2/locale:47, > from /usr/local/include/c++/3.3.2/bits/ostream.tcc:37, > from /usr/local/include/c++/3.3.2/ostream:535, > from /usr/local/include/c++/3.3.2/iostream:45, > from src/HelloWorld.cpp:1: > /usr/local/include/c++/3.3.2/cmath: In function `double std: > int)': > /usr/local/include/c++/3.3.2/cmath:504: error: `double std: > int)' > conflicts with previous using declaration `double pow(double, int)' > > Now, I am pretty sure that I have something setup incorrectly. I don't want > to break anyone else's build environment by re-installing, but I need to get > this working. Anyone have any suggestions? > > Thanks, > > Jim Pearce Hy Jim, I'm experiencing similar problems, while trying to build a new gcc-g++ compiler on linux, in 'libstdc++-3' I get following errors, and compile exits : /lapmore/build-3.3.2/gcc/xgcc -shared-libgcc -B/lapmore/build-3.3.2/gcc/ -nostdinc++ -L/lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/src -L/lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/src/.libs -B/usr/local/i686-pc-linux-gnu/bin/ -B/usr/local/i686-pc-linux-gnu/lib/ -isystem /usr/local/i686-pc-linux-gnu/include -nostdinc++ -I/lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/include/i686-pc-linux-gnu -I/lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/include -I../../../../gcc-3.3.2/./libstdc++-v3/libsupc++ -I../../../../gcc-3.3.2/./libstdc++-v3/libmath -g -O2 -D_GNU_SOURCE -fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -c ../../../../gcc-3.3.2/./libstdc++-v3/src/bitset.cc -fPIC -DPIC -o ..libs/bitset.o In file included from /lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/include/bits/locale_facets.tcc:41, from /lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/include/locale:47, from /lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/include/bits/ostream.tcc:37, from /lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/include/ostream:535, from /lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/include/bitset:58, from .../../../../gcc-3.3.2/libstdc++-v3/src/bitset.cc:43: /lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/include/cmath:443: error: ` modf' not declared /lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/include/cmath: In function `float std::modf(float, float*)': /lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/include/cmath:453: error: `:: modf' undeclared (first use here) /lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/include/cmath: In function `long double std::modf(long double, long double*)': /lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/include/cmath:465: error: ` long double std::modf(long double, long double*)' used prior to declaration /lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/include/cmath:467: error: `:: modf' undeclared (first use here) make[4]: *** [bitset.lo] Error 1 make[4]: Leaving directory `/lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/src' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3' make[2]: *** [all-recursive-am] Error 2 make[2]: Leaving directory `/lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3' make[1]: *** [all-target-libstdc++-v3] Error 2 make[1]: Leaving directory `/lapmore/build-3.3.2' make: *** [bootstrap] Error 2 root@lapdjeez:/lapmore/build-3.3.2# And this is a gcc3.3.2 too I'm trying to build with, but it uses its own included headers, so I guess it might not be related to the compiler(system installed gcc) the inital xgcc(compiler used to compile new g++ with) is built with. I haven't figured out what the problem might be though ... but it sounded similar, so maybe this might even help your search for the clue, and mine too bye, gert |
| ||||
| What's wrong with this one? I use it without problems. http://h21007.www2.hp.com/dspp/tech/...03,547,00.html Just install the binutils and the gcc package. Paul "Djeezus" <djeezus@skynet.be> wrote in message news:64b3bf07.0404261254.3fadf493@posting.google.c om... > "James Pearce" <jlpearce@pacbell.net> wrote in message news:<0129c.15008$Wh1.14022@newssvr27.news.prodigy .com>... > > Greetings, > > > > I'm having a difficult time with a previously installed copy of the 3.3.2 > > GNU compiler collection - first, it didn't seem that the c++ header files > > and libraries were installed (couldn't find them at all, and the compiler > > hadn't a clue). > > > > Finally found them, and copied them (really copied, not linked) into > > /usr/local/include/c++/3.3.2. Made sure to chmod 755 the directories, set > > CPLUS_INCLUDE_PATH (was this necessary?), and tried to compile a simple > > 'Hello World': > > > > #include <iostream> > > > > int main() > > { > > std::cerr<<"Hello, World!"<<std::endl; > > return 0; > > } > > > > > > When I do try to compile (gcc -c src/HelloWorld.cpp), I get the following: > > > > In file included from > > /usr/local/include/c++/3.3.2/bits/locale_facets.tcc:41, > > from /usr/local/include/c++/3.3.2/locale:47, > > from /usr/local/include/c++/3.3.2/bits/ostream.tcc:37, > > from /usr/local/include/c++/3.3.2/ostream:535, > > from /usr/local/include/c++/3.3.2/iostream:45, > > from src/HelloWorld.cpp:1: > > /usr/local/include/c++/3.3.2/cmath: In function `double std: > > int)': > > /usr/local/include/c++/3.3.2/cmath:504: error: `double std: > > int)' > > conflicts with previous using declaration `double pow(double, int)' > > > > Now, I am pretty sure that I have something setup incorrectly. I don't want > > to break anyone else's build environment by re-installing, but I need to get > > this working. Anyone have any suggestions? > > > > Thanks, > > > > Jim Pearce > > Hy Jim, > > I'm experiencing similar problems, while trying to build a new gcc-g++ > compiler on linux, in 'libstdc++-3' I get following errors, and > compile exits : > > /lapmore/build-3.3.2/gcc/xgcc -shared-libgcc > -B/lapmore/build-3.3.2/gcc/ -nostdinc++ > -L/lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/src > -L/lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/src/.libs > -B/usr/local/i686-pc-linux-gnu/bin/ > -B/usr/local/i686-pc-linux-gnu/lib/ -isystem > /usr/local/i686-pc-linux-gnu/include -nostdinc++ > -I/lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/include/i686-pc-linu x-gnu > -I/lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/include > -I../../../../gcc-3.3.2/./libstdc++-v3/libsupc++ > -I../../../../gcc-3.3.2/./libstdc++-v3/libmath -g -O2 -D_GNU_SOURCE > -fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings > -fdiagnostics-show-location=once -ffunction-sections -fdata-sections > -c ../../../../gcc-3.3.2/./libstdc++-v3/src/bitset.cc -fPIC -DPIC -o > .libs/bitset.o > In file included from > /lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/include/bits/locale_face ts.tcc:41, > from > /lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/include/locale:47, > from > /lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/include/bits/ostream.tcc :37, > from > /lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/include/ostream:535, > from > /lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/include/bitset:58, > from > ../../../../gcc-3.3.2/libstdc++-v3/src/bitset.cc:43: > /lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/include/cmath:443: > error: ` > modf' not declared > /lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/include/cmath: In > function > `float std::modf(float, float*)': > /lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/include/cmath:453: > error: `:: > modf' undeclared (first use here) > /lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/include/cmath: In > function > `long double std::modf(long double, long double*)': > /lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/include/cmath:465: > error: ` > long double std::modf(long double, long double*)' used prior to > declaration > /lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/include/cmath:467: > error: `:: > modf' undeclared (first use here) > make[4]: *** [bitset.lo] Error 1 > make[4]: Leaving directory > `/lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3/src' > make[3]: *** [all-recursive] Error 1 > make[3]: Leaving directory > `/lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3' > make[2]: *** [all-recursive-am] Error 2 > make[2]: Leaving directory > `/lapmore/build-3.3.2/i686-pc-linux-gnu/libstdc++-v3' > make[1]: *** [all-target-libstdc++-v3] Error 2 > make[1]: Leaving directory `/lapmore/build-3.3.2' > make: *** [bootstrap] Error 2 > root@lapdjeez:/lapmore/build-3.3.2# > > And this is a gcc3.3.2 too I'm trying to build with, but it uses its > own included headers, so I guess it might not be related to the > compiler(system installed gcc) the inital xgcc(compiler used to > compile new g++ with) is built with. > > I haven't figured out what the problem might be though ... but it > sounded similar, so maybe this might even help your search for the > clue, and mine too > > bye, > gert |