![]() configure failed for gettext-runtimeĬommand failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_macports_release_tarballs_ports_devel_gettext/gettext/work/gettext-0.19.8.1" &. noĬonfigure: error: in `/opt/local/var/macports/build/_opt_local_var_macports_sources_macports_release_tarballs_ports_devel_gettext/gettext/work/gettext-0.19.8.1/gettext-runtime':Ĭonfigure: error: C compiler cannot create executablesĬonfigure: error. However, to solve the above issue, I tried installing netcdf-cxx4 with the command: sudo port -s -v install netcdf-cxx4 piler=macports-gcc-10 configure.cxx_stdlib=macports-libstdc++īut this ends with the error message: checking whether the C compiler works. If I abort, I can use the NetCDF4 library (and everything seems to work). If I type Y, netcdf-cxx4 is reinstalled (but again with clang - which does not help me). The following ports will be rebuilt: netcdf-cxx4 : You can always run 'port rev-upgrade' again to fix errors. > Found 1 broken port, determining rebuild order The installation ends with: netcdf-cxx4 is using libstdc++ (this installation is configured to use libc++) I therefore tried to install netcdf-cxx4 with the following command: sudo port -s -v install netcdf-cxx4 piler=macports-gcc-10 Update: I partially solved the problem: I realised that MacPorts uses clang to compile the port. I'm quite clueless how to solve this problem. Ld: symbol(s) not found for architecture x86_64Ĭollect2: error: ld returned 1 exit status "_ZNK6netCDF7NcGroup6addVarERKNSt7_cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_6NcTypeERKSt6vectorINS_5NcDimESaISD_EE", referenced from: ![]() "_ZNK6netCDF7NcGroup6addDimERKNSt7_cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm", referenced from: "_ZN6netCDF6NcFileC1ERKNSt7_cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_8FileModeE", referenced from: However, this results in the following error: Undefined symbols for architecture x86_64: I'm rather unfamiliar with setting linking options and I tried to compile/link the program with the following command: g++ SimpleXyWr.cpp -o SimpleXyWr.out -I/opt/local/include -L/opt/local/lib -lnetcdf -lnetcdf_c++4 ![]() I've installed netcdf-cxx4 via Macports and downloaded a C++ NetCDF4 example from here:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |