Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined reference error with enchant 1.6.1 #2

Closed
eighttails opened this issue Sep 30, 2017 · 1 comment
Closed

undefined reference error with enchant 1.6.1 #2

eighttails opened this issue Sep 30, 2017 · 1 comment

Comments

@eighttails
Copy link

OS:Windows10
Environment:Mingw64 in MSYS2 environment

When QtSpell is built with enchant 1.6.1, build fails due to undefined reference to 'libintl_*'.

[ 1%] Linking CXX shared library libqtspell-qt5-0.dll
/C/msys64/mingw64/bin/cmake.exe -E remove -f CMakeFiles/qtspell.dir/objects.a
/C/msys64/mingw64/bin/ar.exe cr CMakeFiles/qtspell.dir/objects.a "CMakeFiles/qtspell.dir/src/Checker.cpp.obj" "CMakeFiles/qtspell.dir/src/Codetable.cpp.obj" "CMakeFiles/qtspell.dir/src/TextEditChecker.cpp.obj" "CMakeFiles/qtspell.dir/src/UndoRedoStack.cpp.obj" "CMakeFiles/qtspell.dir/src/moc_QtSpell.cpp.obj" "CMakeFiles/qtspell.dir/src/moc_UndoRedoStack.cpp.obj"
/C/msys64/mingw64/bin/g++.exe -shared -o libqtspell-qt5-0.dll -Wl,--out-implib,libqtspell-qt5.dll.a -Wl,--major-image-version,0,--minor-image-version,3 -Wl,--whole-archive CMakeFiles/qtspell.dir/objects.a -Wl,--no-whole-archive /C/msys64/mingw64/local/qt5-shared/lib/libQt5Widgets.a -LC:/msys64/mingw64/lib -lenchant /C/msys64/mingw64/local/qt5-shared/lib/libQt5Gui.a /C/msys64/mingw64/local/qt5-shared/lib/libQt5Core.a -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
CMakeFiles/qtspell.dir/objects.a(Codetable.cpp.obj):Codetable.cpp:(.text+0x1c): undefined reference to libintl_dgettext' CMakeFiles/qtspell.dir/objects.a(Codetable.cpp.obj):Codetable.cpp:(.text+0x42): undefined reference to libintl_bindtextdomain'
CMakeFiles/qtspell.dir/objects.a(Codetable.cpp.obj):Codetable.cpp:(.text+0x68): undefined reference to `libintl_bind_textdomain_codeset'
collect2.exe: error: ld returned 1 exit status

In the past, problem did not occur because libintl is included in enchant's dependency.
enchant dropped that dependency in 1.6.1 so now nobody is looking for linintl.

Here is a part of build log with enchant 1.6.0.

[ 97%] Linking CXX shared library libqtspell-qt5-0.dll
/C/msys64/mingw64/bin/cmake.exe -E remove -f CMakeFiles/qtspell.dir/objects.a
/C/msys64/mingw64/bin/ar.exe cr CMakeFiles/qtspell.dir/objects.a "CMakeFiles/qtspell.dir/src/Checker.cpp.obj" "CMakeFiles/qtspell.dir/src/Codetable.cpp.obj" "CMakeFiles/qtspell.dir/src/TextEditChecker.cpp.obj" "CMakeFiles/qtspell.dir/src/UndoRedoStack.cpp.obj" "CMakeFiles/qtspell.dir/src/moc_QtSpell.cpp.obj" "CMakeFiles/qtspell.dir/src/moc_UndoRedoStack.cpp.obj"
/C/msys64/mingw64/bin/g++.exe -shared -o libqtspell-qt5-0.dll -Wl,--out-implib,libqtspell-qt5.dll.a -Wl,--major-image-version,0,--minor-image-version,3 -Wl,--whole-archive CMakeFiles/qtspell.dir/objects.a -Wl,--no-whole-archive /C/msys64/mingw64/local/qt5-shared/lib/libQt5Widgets.a -LC:/msys64/mingw64/lib -lenchant -lgmodule-2.0 -pthread -lglib-2.0 -lintl /C/msys64/mingw64/local/qt5-shared/lib/libQt5Gui.a /C/msys64/mingw64/local/qt5-shared/lib/libQt5Core.a -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32

QtSpell directly calls libintl so it should be explicitly linked in QtSpell's CMakeFiles.

manisandro added a commit that referenced this issue Sep 30, 2017
@manisandro
Copy link
Owner

Should be fixed in 32be9aa, thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants