On 04/06/2015 13:56, Claude Frantz wrote: Hi Claude, comments below: > On 06/04/2015 11:05 AM, Bill Somerville wrote: > >>> The software does not more build on Revision: 5517, using Fedora 21: >>> >>> Linking CXX executable wsjtx >>> CMakeFiles/wsjtx.dir/WSPRBandHopping.cpp.o: In function >>> `WSPRBandHopping::next_hop()': >>> WSPRBandHopping.cpp:(.text._ZN15WSPRBandHopping8next_hopEv+0x1f3): >>> undefined reference to `FC_hopping' >>> collect2: error: ld returned 1 exit status >>> CMakeFiles/wsjtx.dir/build.make:852: recipe for target 'wsjtx' failed >>> make[2]: *** [wsjtx] Error 1 >>> make[2]: Target 'CMakeFiles/wsjtx.dir/build' not remade because of errors. >>> CMakeFiles/Makefile2:937: recipe for target 'CMakeFiles/wsjtx.dir/all' >>> failed >>> make[1]: *** [CMakeFiles/wsjtx.dir/all] Error 2 >> It is working for me in Fedora 20. The error is related to the CMake >> automatic Fortran/C/C++ linkage mechanism which I am using for the first >> time in checked in code. It is supposed to unify inter-language >> procedure calls without care for what compilers are used. >> >> Can you reply with the contents of the generated file FC.h which will be >> in the top level directory of your build tree please? >> >> Also which C++ and Fortran compiler are you using? > $ gfortran --version > GNU Fortran (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6) > > $ gcc --version > gcc (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6) > > $ g++ --version > g++ (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6) Ok. > > > > The contents of FC.h in the main directory is: > > > #ifndef FC_HEADER_INCLUDED > #define FC_HEADER_INCLUDED > > /* Mangling for Fortran global symbols without underscores. */ > #define FC_GLOBAL(name,NAME) name##_ > > /* Mangling for Fortran global symbols with underscores. */ > #define FC_GLOBAL_(name,NAME) name##_ > > /* Mangling for Fortran module symbols without underscores. */ > #define FC_MODULE(mod_name,name, mod_NAME,NAME) __##mod_name##_MOD_##name > > /* Mangling for Fortran module symbols with underscores. */ > #define FC_MODULE_(mod_name,name, mod_NAME,NAME) __##mod_name##_MOD_##name > > #endif OK, this is the problem. It should be like this:
#ifndef FC_HEADER_INCLUDED #define FC_HEADER_INCLUDED /* Mangling for Fortran global symbols without underscores. */ #define FC_GLOBAL(name,NAME) name##_ /* Mangling for Fortran global symbols with underscores. */ #define FC_GLOBAL_(name,NAME) name##_ /* Mangling for Fortran module symbols without underscores. */ #define FC_MODULE(mod_name,name, mod_NAME,NAME) __##mod_name##_MOD_##name /* Mangling for Fortran module symbols with underscores. */ #define FC_MODULE_(mod_name,name, mod_NAME,NAME) __##mod_name##_MOD_##name /*--------------------------------------------------------------------------*/ /* Mangle some symbols automatically. */ #define FC_hopping FC_GLOBAL(hopping, HOPPING) #endif Note the last define. This file is generated by CMake and the lines in CMakeLists.txt at line 623 should be as below., which is how the file is generated. Are you certain that all the files in your workspace are up to date? Please check you CMakeLists.txt at line 623 and compare with the fragment below. # # setup and test Fortran C/C++ interaction # include (FortranCInterface) FortranCInterface_VERIFY (CXX QUIET) FortranCInterface_HEADER (FC.h MACRO_NAMESPACE "FC_" SYMBOL_NAMESPACE "FC_" SYMBOLS hopping ) > > > Best 88 de Claude 73 Bill G4WJS. ------------------------------------------------------------------------------ _______________________________________________ wsjt-devel mailing list wsjt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wsjt-devel