Hi everyone,
I’m trying to use EGSnrc but i’m having issue during compile process.
when i try to compile the “myapp” following tutorial, it brings me the following error: undefined reference to `quadmath_snprintf’
i do have the same issue compiling “cavity” but no error ie. on “cavrznrc”.
the full error:
g++ -I. -IC:EGSnrcEGSnrcHEN_HOUSElibwin6432 -IC:EGSnrcEGSnrcHEN_HOUSEegs++ -IC:EGSnrcEGSnrcHEN_HOUSEinterface -DWIN32 -O3 -ffast-math -DWIN32 -c -o cavity_win6432.o cavity.cpp
g++ -I. -IC:EGSnrcEGSnrcHEN_HOUSElibwin6432 -IC:EGSnrcEGSnrcHEN_HOUSEegs++ -IC:EGSnrcEGSnrcHEN_HOUSEinterface -DWIN32 -O3 -ffast-math -DWIN32 -c -o egs_advanced_application_win6432.o C:EGSnrcEGSnrcHEN_HOUSEegs++egs_advanced_application.cpp
“Mortran compiling EGSnrc sources …”
x86_64-w64-mingw32-gfortran -O3 -ffast-math -lquadmath -c -o egsnrc_win6432.o egsnrc_win6432.F
g++ -I. -IC:EGSnrcEGSnrcHEN_HOUSElibwin6432 -IC:EGSnrcEGSnrcHEN_HOUSEegs++ -IC:EGSnrcEGSnrcHEN_HOUSEinterface -DWIN32 -O3 -ffast-math -DWIN32 -c -o egs_interface2_win6432.o C:EGSnrcEGSnrcHEN_HOUSEinterfaceegs_interface2.c
g++ -O3 -ffast-math -DWIN32 -o C:EGSnrcTestbinwin6432cavity.exe cavity_win6432.o egs_advanced_application_win6432.o egsnrc_win6432.o egs_interface2_win6432.o -LC:EGSnrcEGSnrcHEN_HOUSEegs++dsowin6432 -legspp -lgfortran
C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/libgfortran.a(write.o):(.text$get_precision+0x160): undefined reference to `quadmath_snprintf’
C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/libgfortran.a(write.o):(.text$get_float_string+0x16b): undefined reference to `quadmath_snprintf’
C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/libgfortran.a(write.o):(.text$get_float_string+0xa2f): undefined reference to `quadmath_snprintf’
C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/libgfortran.a(write.o):(.text$get_float_string+0x162c): undefined reference to `quadmath_snprintf’
C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/libgfortran.a(write.o):(.text$get_float_string+0x170a): undefined reference to `quadmath_snprintf’
collect2.exe: error: ld returned 1 exit status
mingw32-make: * [C:EGSnrcEGSnrcHEN_HOUSEmakefilescpp_makefile:44: C:EGSnrcTestbinwin6432cavity.exe] Error 1
ExitCode = 2
*********************** finished ***************************
my pc specs:
-windows 10 pro version 1803
-64bit OS
-x64 processor architecture
software specs:
gfortran –version
GNU Fortran (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../../../src/gcc-8.1.0/configure –host=x86_64-w64-mingw32 –build=x86_64-w64-mingw32 –target=x86_64-w64-mingw32 –prefix=/mingw64 –with-sysroot=/c/mingw810/x86_64-810-posix-seh-rt_v6-rev0/mingw64 –enable-shared –enable-static –disable-multilib –enable-languages=c,c++,fortran,lto –enable-libstdcxx-time=yes –enable-threads=posix –enable-libgomp –enable-libatomic –enable-lto –enable-graphite –enable-checking=release –enable-fully-dynamic-string –enable-version-specific-runtime-libs –disable-libstdcxx-pch –disable-libstdcxx-debug –enable-bootstrap –disable-rpath –disable-win32-registry –disable-nls –disable-werror –disable-symvers –with-gnu-as –with-gnu-ld –with-arch=nocona –with-tune=core2 –with-libiconv –with-system-zlib –with-gmp=/c/mingw810/prerequisites/x86_64-w64-mingw32-static –with-mpfr=/c/mingw810/prerequisites/x86_64-w64-mingw32-static –with-mpc=/c/mingw810/prerequisites/x86_64-w64-mingw32-static –with-isl=/c/mingw810/prerequisites/x86_64-w64-mingw32-static –with-pkgversion=’x86_64-posix-seh-rev0, Built by MinGW-W64 project’ –with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS=’-O2 -pipe -fno-ident -I/c/mingw810/x86_64-810-posix-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include’ CXXFLAGS=’-O2 -pipe -fno-ident -I/c/mingw810/x86_64-810-posix-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include’ CPPFLAGS=’ -I/c/mingw810/x86_64-810-posix-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include’ LDFLAGS=’-pipe -fno-ident -L/c/mingw810/x86_64-810-posix-seh-rt_v6-rev0/mingw64/opt/lib -L/c/mingw810/prerequisites/x86_64-zlib-static/lib -L/c/mingw810/prerequisites/x86_64-w64-mingw32-static/lib ‘
Thread model: posix
gcc version 8.1.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project)
g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../../../src/gcc-8.1.0/configure –host=x86_64-w64-mingw32 –build=x86_64-w64-mingw32 –target=x86_64-w64-mingw32 –prefix=/mingw64 –with-sysroot=/c/mingw810/x86_64-810-posix-seh-rt_v6-rev0/mingw64 –enable-shared –enable-static –disable-multilib –enable-languages=c,c++,fortran,lto –enable-libstdcxx-time=yes –enable-threads=posix –enable-libgomp –enable-libatomic –enable-lto –enable-graphite –enable-checking=release –enable-fully-dynamic-string –enable-version-specific-runtime-libs –disable-libstdcxx-pch –disable-libstdcxx-debug –enable-bootstrap –disable-rpath –disable-win32-registry –disable-nls –disable-werror –disable-symvers –with-gnu-as –with-gnu-ld –with-arch=nocona –with-tune=core2 –with-libiconv –with-system-zlib –with-gmp=/c/mingw810/prerequisites/x86_64-w64-mingw32-static –with-mpfr=/c/mingw810/prerequisites/x86_64-w64-mingw32-static –with-mpc=/c/mingw810/prerequisites/x86_64-w64-mingw32-static –with-isl=/c/mingw810/prerequisites/x86_64-w64-mingw32-static –with-pkgversion=’x86_64-posix-seh-rev0, Built by MinGW-W64 project’ –with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS=’-O2 -pipe -fno-ident -I/c/mingw810/x86_64-810-posix-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include’ CXXFLAGS=’-O2 -pipe -fno-ident -I/c/mingw810/x86_64-810-posix-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include’ CPPFLAGS=’ -I/c/mingw810/x86_64-810-posix-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include’ LDFLAGS=’-pipe -fno-ident -L/c/mingw810/x86_64-810-posix-seh-rt_v6-rev0/mingw64/opt/lib -L/c/mingw810/prerequisites/x86_64-zlib-static/lib -L/c/mingw810/prerequisites/x86_64-w64-mingw32-static/lib ‘
Thread model: posix
gcc version 8.1.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project)
mingw32-make –version
GNU Make 4.2.1
Built for x86_64-w64-mingw32
attached there is my EGSnrc configuration file.
TY for your work and support!
Cosimo
https://drive.google.com/a/imaginalis.it/file/d/1JSUPIYqMvhbEjUxKaUpWS1lS7erUIiv3/view?usp=drive_web//cdn.embedly.com/widgets/platform.js