[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bgl-discuss] c++ compiler
Hi,
I am Jung-Min Lee working with Dr. Lan in IIT.
I have questions about compilers of C++ and Fortran (*.f90).
I have used f90 (/opt/ibmcmp/xlf/9.1/bin/f90) for *.f90 (fortran files) and
used g++ (/usr/bin/g++) for *.cc (C++ files).
However, when both fortran files and cc files are linked together, it has a
problem.
Could you let me know how to solve this problem?
I am attaching my error script for you.
Thanks in advance.
/opt/ibmcmp/xlf/9.1/bin/f90 -I/bgl/BlueLight/ppcfloor/bglsys/include -g -O2 -qarch=440 -qmaxmem=64000 -c -o xmain-main.o `test -f 'Contrl/main.f90' || echo './'`Contrl/main.f90
** main === End of Compilation 1 ===
1501-510 Compilation successful for file main.f90.
source='hackery.cc' object='hackery.o' libtool=no \
depfile='.deps/hackery.Po' tmpdepfile='.deps/hackery.TPo' \
depmode=gcc3 /bin/sh ./depcomp \
g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"ImpactLayer\" -DVERSION=\"1.0\" -DHAVE_GLIB=1 -I. -I. -I/bgl/home1/jungmin/mxyzptlk/include -I/bgl/home1/jungmin/glib-1.2.10/include/glib-1.2 -I/bgl/home1/jungmin/glib-1.2.10/lib/glib/include -g -O2 -DIFORT -c -o hackery.o `test -f 'hackery.cc' || echo './'`hackery.cc
g++ -g -O2 -DIFORT -o xmain -L. -L/bgl/home1/jungmin/mxyzptlk/lib -L/bgl/BlueLight/ppcfloor/bglsys/lib -L/usr/lib xmain-main.o mp.o -L/bgl/home1/jungmin/Layer/libImpact.a -L/bgl/home1/jungmin/Layer/libExternal.a -lbmlfactory -lphysics_toolkit -lbeamline -lphysics_toolkit -lbeamline -lmxyzptlk -lbasic_toolkit -L/bgl/home1/jungmin/glib-1.2.10/lib -lglib -lm -lnsl -L/usr/lib -lstdc++ hackery.o -L/bgl/BlueLight/ppcfloor/bglsys/lib -lcxxmpich.rts -L/bgl/BlueLight/ppcfloor/bglsys/lib -lfmpich.rts -L/bgl/BlueLight/ppcfloor/bglsys/lib/ -lmpich.rts -lmsglayer.rts -lrts.rts -ldevices.rts
xmain-main.o(.text+0x10): In function `main':
Contrl/main.f90:8: undefined reference to `__accsimulatorclass_NMOD_init_accsimulator'
xmain-main.o(.text+0x18):Contrl/main.f90:9: undefined reference to `__accsimulatorclass_NMOD_run_accsimulator'
xmain-main.o(.text+0x20):Contrl/main.f90:10: undefined reference to `__accsimulatorclass_NMOD_destruct_accsimulator'
xmain-main.o(.text+0x28):Contrl/main.f90:12: undefined reference to `_xlfExit'
collect2: ld returned 1 exit status
make: *** [xmain] Error 1