[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bgl-discuss] compile problems
Hi,
I'd recommend compiling the C++ files with blrts_xlC instead of
blrts_xlc. If you must link with the C compiler instead of blrts_xlC, then
you may want to add to your link line:
-L/opt/ibmcmp/vacpp/7.0/blrts_dev_lib
-L/opt/ibmcmp/vacpp/7.0/blrts_lib -libmc++
-L/bgl/BlueLight/ppcfloor/blrts-gnu/powerpc-bgl-blrts-gnu/lib -lstdc++
Thanks,
- Sameer
On Thu, 13 Oct 2005, Xu, Jin wrote:
>
> Hi,
>
> I am trying to compile my C/C++ code with IBM xlc compiler, but the compiler does not recognize new and delete operator.
>
> work/Hybrid> ./Makefile.xlc
> "src/turbulence180e.C", line 6522.16: 1540-1102 (W) "km" might be used before it is set.
> "src/turbulence180e.C", line 6522.24: 1540-1102 (W) "kn" might be used before it is set.
> ./append.o:src/append.C:24: undefined reference to `__IBMCPlusPlusExceptionV1'
> ./polylib.o:src/polylib.C:190: undefined reference to `__IBMCPlusPlusExceptionV1'
> ./turbulence180e.o: In function `main':
> src/turbulence180e.C:6664: undefined reference to `operator new(unsigned)'
> ./turbulence180e.o: In function `channel::channel()':
> src/turbulence180e.C:212: undefined reference to `operator new[](unsigned)'
> src/turbulence180e.C:213: undefined reference to `operator new[](unsigned)'
> src/turbulence180e.C:214: undefined reference to `operator new[](unsigned)'
> src/turbulence180e.C:215: undefined reference to `operator new[](unsigned)'
> src/turbulence180e.C:217: undefined reference to `operator new[](unsigned)'
> ./turbulence180e.o:src/turbulence180e.C:218: more undefined references to `operator new[](unsigned)' follow
> ./turbulence180e.o: In function `channel::SetUp()':
> src/turbulence180e.C:2630: undefined reference to `operator delete[](void*)'
> src/turbulence180e.C:2630: undefined reference to `operator delete[](void*)'
> src/turbulence180e.C:2631: undefined reference to `operator delete[](void*)'
> src/turbulence180e.C:2631: undefined reference to `operator delete[](void*)'
> src/turbulence180e.C:2632: undefined reference to `operator delete[](void*)'
>
>
> work/Hybrid> cat Makefile.xlc
> /opt/ibmcmp/vac/7.0/bin/blrts_xlc -I./include -I/bgl/BlueLight/ppcfloor/bglsys/include -I/bgl/home1/jinxu/work/Hybrid/include -g -c -o ./append.o src/append.C
> /opt/ibmcmp/vac/7.0/bin/blrts_xlc -I./include -I/bgl/BlueLight/ppcfloor/bglsys/include -I/bgl/home1/jinxu/work/Hybrid/include -g -c -o ./polylib.o src/polylib.C
> /opt/ibmcmp/vac/7.0/bin/blrts_xlc -I./include -I/bgl/BlueLight/ppcfloor/bglsys/include -I/bgl/home1/jinxu/work/Hybrid/include -g -c -o ./turbulence180e.o src/turbulence180e.C
> /opt/ibmcmp/vac/7.0/bin/blrts_xlc -I./include -I/bgl/BlueLight/ppcfloor/bglsys/include -I/bgl/home1/jinxu/work/Hybrid/include -o turbulence180e ./append.o ./polylib.o ./turbulence180e.o /bgl/home1/jinxu/work/Hybrid/Hlib/Linux/liblapack_LINUX.a /bgl/home1/jinxu/work/Hybrid/Hlib/Linux/libblas_LINUX.a -L/bgl/home1/jinxu/work/Hybrid/Hlib/Linux -lvec -lfftw -lrfftw -L/bgl/BlueLight/ppcfloor/bglsys/lib/ -lmpich.rts -lmsglayer.rts -lrts.rts -ldevices.rts -lg2c /bgl/software/linux-sles9-ppc64/apps/ibmcmp-20050414-local/opt/vac/7.0/lib/libxl.a
>
> Also not clear with `__IBMCPlusPlusExceptionV1' error.
>
> I have inclueded following files:
>
> #include <stdio.h>
> #include <string.h>
> #include <stdlib.h>
>
> and I have set environment variables as:
>
> MPI_PATH=/bgl/BlueLight/ppcfloor/bglsys
> LIB=/bgl/BlueLight/ppcfloor/bglsys/lib
> INC=/bgl/BlueLight/ppcfloor/bglsys/include
>
>
> Thanks,
> Jin
>
> - --------------------------------------------------------------------
> To add or remove yourself from this mailing list, use the 'notifyme'
> command on any BGL machine. To remove: notifyme -n, to add: notifyme -y.
>
- --------------------------------------------------------------------
To add or remove yourself from this mailing list, use the 'notifyme'
command on any BGL machine. To remove: notifyme -n, to add: notifyme -y.