[OS X, gcc] не линкуется gettext

Wadim

При сборке одного приложения выдаёт такую ошибку:
Linking CXX shared library libctpp2.dylib
Undefined symbols for architecture x86_64:
"_libintl_dgettext", referenced from:
CTPP:: FnGetText ::Handler(CTPP::CDT*, unsigned int, CTPP::CDT&, CTPP::Logger&) in FnGetText.cpp.o
"_libintl_dngettext", referenced from:
CTPP:: FnGetText ::Handler(CTPP::CDT*, unsigned int, CTPP::CDT&, CTPP::Logger&) in FnGetText.cpp.o
"_libintl_gettext", referenced from:
CTPP:: FnGetText ::Handler(CTPP::CDT*, unsigned int, CTPP::CDT&, CTPP::Logger&) in FnGetText.cpp.o
"_libintl_ngettext", referenced from:
CTPP:: FnGetText ::Handler(CTPP::CDT*, unsigned int, CTPP::CDT&, CTPP::Logger&) in FnGetText.cpp.o
g++ такой:
g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin13/4.8.2/lto-wrapper
Target: x86_64-apple-darwin13
Configured with: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc48/gcc48/work/gcc-4.8.2/configure --prefix=/opt/local --build=x86_64-apple-darwin13 --enable-languages=c,c++,objc,obj-c++,lto,fortran,java --libdir=/opt/local/lib/gcc48 --includedir=/opt/local/include/gcc48 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-4.8 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-4.8 --with-gxx-include-dir=/opt/local/include/gcc48/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-cloog=/opt/local --enable-cloog-backend=isl --disable-cloog-version-check --enable-stage1-checking --enable-lto --enable-libstdcxx-time --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=http://trac.macports.org/newticket --with-pkgversion='MacPorts gcc48 4.8.2_0+universal'
Thread model: posix
gcc version 4.8.2 (MacPorts gcc48 4.8.2_0+universal)
в ~/.profile дополнительно прописано
export LDFLAGS="-L/opt/local/lib -lstdc++ -lgettextlib -lintl -lexpat"
гугление ничего не дало.
Кто-нибудь сталкивался с подобным? Помогите, пожалуйста.

okis

а gettext то у тебя установлен?

Werdna

Undefined symbols for architecture x86_64:
  "_libintl_dgettext", referenced from:
http://trac.macports.org/ticket/30597
 

When I manually added -lgettextlib to /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_neon/neon/work/neon-0.29.6/src/Makefile and ran install again, it went fine.
 

Попробуй вкрячить в CMakeLists.txt в ADD_LIBRARY cоотв gettextlib:
 
 TARGET_LINK_LIBRARIES(ctpp2 gettextlib) 

UPDATED!

Wadim

а gettext то у тебя установлен?
да, даже два почему-то
---> The following versions of gettext are currently installed:
---> gettext @0.18.3.1_2
---> gettext @0.18.3.1_2+universal (active)

Wadim

UPDATED!
добавил, cmake прошёл, но при make те же самые ошибки
Оставить комментарий
Имя или ник:
Комментарий: