Added Mac OS X support

General discussion

Re: Added Mac OS X support

Postby chulai » Sun Aug 07, 2011 11:29 pm

@strannik

Finally I installed libiconv, libvorbis and libogg with MacPorts. I couldn't find libvorbisfile and libhunspell libraries there. For what I could understand hunspell is included in Snow Leopard.

I thought pkgconfig was needed for the compiler to find the libs but I guess if you indicate the lib path then it's superfluous.

BTW, I have Xcode 3.2.5 and I don't have an old PPC ;)

I'm going to switch to homebrew as you said and see what happens.


@ikm

Now, when I do a build all in Qt Creator I get:

Starting: "/usr/bin/qmake-4.7"
/Users/mac/Documents/goldendict/goldendict.pro -r -spec macx-g++
CONFIG+=release
Package hunspell was not found in the pkg-config search path.
Perhaps you should add the directory containing `hunspell.pc'
to the PKG_CONFIG_PATH environment variable
No package 'hunspell' found
Package hunspell was not found in the pkg-config search path.
Perhaps you should add the directory containing `hunspell.pc'
to the PKG_CONFIG_PATH environment variable
No package 'hunspell' found
Package hunspell was not found in the pkg-config search path.
Perhaps you should add the directory containing `hunspell.pc'
to the PKG_CONFIG_PATH environment variable
No package 'hunspell' found
The process "/usr/bin/qmake-4.7" exited normally.
- Show quoted text -
g++ -c -pipe -rdynamic -O2 -I/opt/local/include -I/opt/local/include
-I/opt/local/include -Wall -W
-DPROGRAM_DATA_DIR=\"/usr/local/share/apps/goldendict/\"
-DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB
-DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I.
-I/Library/Frameworks/QtCore.framework/Versions/4/Headers
-I/usr/include/QtCore
-I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
-I/usr/include/QtNetwork
-I/Library/Frameworks/QtGui.framework/Versions/4/Headers
-I/usr/include/QtGui
-I/Library/Frameworks/QtXml.framework/Versions/4/Headers
-I/usr/include/QtXml
-I/Library/Frameworks/phonon.framework/Versions/4/Headers
-I/usr/include/phonon
-I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
-I/usr/include/QtWebKit -I/usr/include -I. -Imaclibs/include
-Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild
-F/Library/Frameworks -o build/folding.o folding.cc
folding.cc: In function 'void Folding::normalizeWhitespace(std::wstring&)':
folding.cc:646: warning: suggest a space before ';' or explicit braces
around empty body in 'for' statement
g++ -c -pipe -rdynamic -O2 -I/opt/local/include -I/opt/local/include
-I/opt/local/include -Wall -W
-DPROGRAM_DATA_DIR=\"/usr/local/share/apps/goldendict/\"
-DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB
-DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I.
-I/Library/Frameworks/QtCore.framework/Versions/4/Headers
-I/usr/include/QtCore
-I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
-I/usr/include/QtNetwork
-I/Library/Frameworks/QtGui.framework/Versions/4/Headers
-I/usr/include/QtGui
-I/Library/Frameworks/QtXml.framework/Versions/4/Headers
-I/usr/include/QtXml
-I/Library/Frameworks/phonon.framework/Versions/4/Headers
-I/usr/include/phonon
-I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
-I/usr/include/QtWebKit -I/usr/include -I. -Imaclibs/include
-Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild
-F/Library/Frameworks -o build/main.o main.cc
In file included from mainwindow.hh:24,
from main.cc:7:
hotkeywrapper.hh:145: warning: unused parameter 'key'
hotkeywrapper.hh:145: warning: unused parameter 'key2'
hotkeywrapper.hh:145: warning: unused parameter 'modifier'
hotkeywrapper.hh:145: warning: unused parameter 'handle'
g++ -c -pipe -rdynamic -O2 -I/opt/local/include -I/opt/local/include
-I/opt/local/include -Wall -W
-DPROGRAM_DATA_DIR=\"/usr/local/share/apps/goldendict/\"
-DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB
-DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I.
-I/Library/Frameworks/QtCore.framework/Versions/4/Headers
-I/usr/include/QtCore
-I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
-I/usr/include/QtNetwork
-I/Library/Frameworks/QtGui.framework/Versions/4/Headers
-I/usr/include/QtGui
-I/Library/Frameworks/QtXml.framework/Versions/4/Headers
-I/usr/include/QtXml
-I/Library/Frameworks/phonon.framework/Versions/4/Headers
-I/usr/include/phonon
-I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
-I/usr/include/QtWebKit -I/usr/include -I. -Imaclibs/include
-Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild
-F/Library/Frameworks -o build/dictionary.o dictionary.cc
g++ -c -pipe -rdynamic -O2 -I/opt/local/include -I/opt/local/include
-I/opt/local/include -Wall -W
-DPROGRAM_DATA_DIR=\"/usr/local/share/apps/goldendict/\"
-DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB
-DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I.
-I/Library/Frameworks/QtCore.framework/Versions/4/Headers
-I/usr/include/QtCore
-I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
-I/usr/include/QtNetwork
-I/Library/Frameworks/QtGui.framework/Versions/4/Headers
-I/usr/include/QtGui
-I/Library/Frameworks/QtXml.framework/Versions/4/Headers
-I/usr/include/QtXml
-I/Library/Frameworks/phonon.framework/Versions/4/Headers
-I/usr/include/phonon
-I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
-I/usr/include/QtWebKit -I/usr/include -I. -Imaclibs/include
-Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild
-F/Library/Frameworks -o build/config.o config.cc
g++ -c -pipe -rdynamic -O2 -I/opt/local/include -I/opt/local/include
-I/opt/local/include -Wall -W
-DPROGRAM_DATA_DIR=\"/usr/local/share/apps/goldendict/\"
-DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB
-DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I.
-I/Library/Frameworks/QtCore.framework/Versions/4/Headers
-I/usr/include/QtCore
-I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
-I/usr/include/QtNetwork
-I/Library/Frameworks/QtGui.framework/Versions/4/Headers
-I/usr/include/QtGui
-I/Library/Frameworks/QtXml.framework/Versions/4/Headers
-I/usr/include/QtXml
-I/Library/Frameworks/phonon.framework/Versions/4/Headers
-I/usr/include/phonon
-I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
-I/usr/include/QtWebKit -I/usr/include -I. -Imaclibs/include
-Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild
-F/Library/Frameworks -o build/sources.o sources.cc
g++ -c -pipe -rdynamic -O2 -I/opt/local/include -I/opt/local/include
-I/opt/local/include -Wall -W
-DPROGRAM_DATA_DIR=\"/usr/local/share/apps/goldendict/\"
-DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB
-DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I.
-I/Library/Frameworks/QtCore.framework/Versions/4/Headers
-I/usr/include/QtCore
-I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
-I/usr/include/QtNetwork
-I/Library/Frameworks/QtGui.framework/Versions/4/Headers
-I/usr/include/QtGui
-I/Library/Frameworks/QtXml.framework/Versions/4/Headers
-I/usr/include/QtXml
-I/Library/Frameworks/phonon.framework/Versions/4/Headers
-I/usr/include/phonon
-I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
-I/usr/include/QtWebKit -I/usr/include -I. -Imaclibs/include
-Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild
-F/Library/Frameworks -o build/mainwindow.o mainwindow.cc
In file included from mainwindow.hh:24,
from mainwindow.cc:4:
hotkeywrapper.hh:145: warning: unused parameter 'key'
hotkeywrapper.hh:145: warning: unused parameter 'key2'
hotkeywrapper.hh:145: warning: unused parameter 'modifier'
hotkeywrapper.hh:145: warning: unused parameter 'handle'
g++ -c -pipe -rdynamic -O2 -I/opt/local/include -I/opt/local/include
-I/opt/local/include -Wall -W
-DPROGRAM_DATA_DIR=\"/usr/local/share/apps/goldendict/\"
-DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB
-DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I.
-I/Library/Frameworks/QtCore.framework/Versions/4/Headers
-I/usr/include/QtCore
-I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
-I/usr/include/QtNetwork
-I/Library/Frameworks/QtGui.framework/Versions/4/Headers
-I/usr/include/QtGui
-I/Library/Frameworks/QtXml.framework/Versions/4/Headers
-I/usr/include/QtXml
-I/Library/Frameworks/phonon.framework/Versions/4/Headers
-I/usr/include/phonon
-I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
-I/usr/include/QtWebKit -I/usr/include -I. -Imaclibs/include
-Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild
-F/Library/Frameworks -o build/utf8.o utf8.cc
g++ -c -pipe -rdynamic -O2 -I/opt/local/include -I/opt/local/include
-I/opt/local/include -Wall -W
-DPROGRAM_DATA_DIR=\"/usr/local/share/apps/goldendict/\"
-DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB
-DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I.
-I/Library/Frameworks/QtCore.framework/Versions/4/Headers
-I/usr/include/QtCore
-I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
-I/usr/include/QtNetwork
-I/Library/Frameworks/QtGui.framework/Versions/4/Headers
-I/usr/include/QtGui
-I/Library/Frameworks/QtXml.framework/Versions/4/Headers
-I/usr/include/QtXml
-I/Library/Frameworks/phonon.framework/Versions/4/Headers
-I/usr/include/phonon
-I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
-I/usr/include/QtWebKit -I/usr/include -I. -Imaclibs/include
-Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild
-F/Library/Frameworks -o build/file.o file.cc
g++ -c -pipe -rdynamic -O2 -I/opt/local/include -I/opt/local/include
-I/opt/local/include -Wall -W
-DPROGRAM_DATA_DIR=\"/usr/local/share/apps/goldendict/\"
-DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB
-DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I.
-I/Library/Frameworks/QtCore.framework/Versions/4/Headers
-I/usr/include/QtCore
-I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
-I/usr/include/QtNetwork
-I/Library/Frameworks/QtGui.framework/Versions/4/Headers
-I/usr/include/QtGui
-I/Library/Frameworks/QtXml.framework/Versions/4/Headers
-I/usr/include/QtXml
-I/Library/Frameworks/phonon.framework/Versions/4/Headers
-I/usr/include/phonon
-I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
-I/usr/include/QtWebKit -I/usr/include -I. -Imaclibs/include
-Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild
-F/Library/Frameworks -o build/bgl_babylon.o bgl_babylon.cc
g++ -c -pipe -rdynamic -O2 -I/opt/local/include -I/opt/local/include
-I/opt/local/include -Wall -W
-DPROGRAM_DATA_DIR=\"/usr/local/share/apps/goldendict/\"
-DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB
-DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I.
-I/Library/Frameworks/QtCore.framework/Versions/4/Headers
-I/usr/include/QtCore
-I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
-I/usr/include/QtNetwork
-I/Library/Frameworks/QtGui.framework/Versions/4/Headers
-I/usr/include/QtGui
-I/Library/Frameworks/QtXml.framework/Versions/4/Headers
-I/usr/include/QtXml
-I/Library/Frameworks/phonon.framework/Versions/4/Headers
-I/usr/include/phonon
-I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
-I/usr/include/QtWebKit -I/usr/include -I. -Imaclibs/include
-Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild
-F/Library/Frameworks -o build/bgl.o bgl.cc
g++ -c -pipe -rdynamic -O2 -I/opt/local/include -I/opt/local/include
-I/opt/local/include -Wall -W
-DPROGRAM_DATA_DIR=\"/usr/local/share/apps/goldendict/\"
-DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB
-DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I.
-I/Library/Frameworks/QtCore.framework/Versions/4/Headers
-I/usr/include/QtCore
-I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
-I/usr/include/QtNetwork
-I/Library/Frameworks/QtGui.framework/Versions/4/Headers
-I/usr/include/QtGui
-I/Library/Frameworks/QtXml.framework/Versions/4/Headers
-I/usr/include/QtXml
-I/Library/Frameworks/phonon.framework/Versions/4/Headers
-I/usr/include/phonon
-I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
-I/usr/include/QtWebKit -I/usr/include -I. -Imaclibs/include
-Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild
-F/Library/Frameworks -o build/initializing.o initializing.cc
g++ -c -pipe -rdynamic -O2 -I/opt/local/include -I/opt/local/include
-I/opt/local/include -Wall -W
-DPROGRAM_DATA_DIR=\"/usr/local/share/apps/goldendict/\"
-DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB
-DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I.
-I/Library/Frameworks/QtCore.framework/Versions/4/Headers
-I/usr/include/QtCore
-I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
-I/usr/include/QtNetwork
-I/Library/Frameworks/QtGui.framework/Versions/4/Headers
-I/usr/include/QtGui
-I/Library/Frameworks/QtXml.framework/Versions/4/Headers
-I/usr/include/QtXml
-I/Library/Frameworks/phonon.framework/Versions/4/Headers
-I/usr/include/phonon
-I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
-I/usr/include/QtWebKit -I/usr/include -I. -Imaclibs/include
-Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild
-F/Library/Frameworks -o build/article_netmgr.o article_netmgr.cc
gcc -c -pipe -O2 -I/opt/local/include -I/opt/local/include
-I/opt/local/include -Wall -W
-DPROGRAM_DATA_DIR=\"/usr/local/share/apps/goldendict/\"
-DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB
-DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I.
-I/Library/Frameworks/QtCore.framework/Versions/4/Headers
-I/usr/include/QtCore
-I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
-I/usr/include/QtNetwork
-I/Library/Frameworks/QtGui.framework/Versions/4/Headers
-I/usr/include/QtGui
-I/Library/Frameworks/QtXml.framework/Versions/4/Headers
-I/usr/include/QtXml
-I/Library/Frameworks/phonon.framework/Versions/4/Headers
-I/usr/include/phonon
-I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
-I/usr/include/QtWebKit -I/usr/include -I. -Imaclibs/include
-Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild
-F/Library/Frameworks -o build/dictzip.o dictzip.c
dictzip.c: In function 'dict_read_header':
dictzip.c:293: warning: pointer targets in passing argument 2 of
'crc32' differ in signedness
dictzip.c: In function 'dict_data_open':
dictzip.c:429: warning: unused variable 'sb'
dictzip.c: In function 'dict_data_read_':
dictzip.c:616: warning: pointer targets in assignment differ in signedness
dictzip.c:618: warning: pointer targets in assignment differ in signedness
dictzip.c:500: warning: unused parameter 'preFilter'
dictzip.c:500: warning: unused parameter 'postFilter'
g++ -c -pipe -rdynamic -O2 -I/opt/local/include -I/opt/local/include
-I/opt/local/include -Wall -W
-DPROGRAM_DATA_DIR=\"/usr/local/share/apps/goldendict/\"
-DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB
-DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I.
-I/Library/Frameworks/QtCore.framework/Versions/4/Headers
-I/usr/include/QtCore
-I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
-I/usr/include/QtNetwork
-I/Library/Frameworks/QtGui.framework/Versions/4/Headers
-I/usr/include/QtGui
-I/Library/Frameworks/QtXml.framework/Versions/4/Headers
-I/usr/include/QtXml
-I/Library/Frameworks/phonon.framework/Versions/4/Headers
-I/usr/include/phonon
-I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
-I/usr/include/QtWebKit -I/usr/include -I. -Imaclibs/include
-Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild
-F/Library/Frameworks -o build/btreeidx.o btreeidx.cc
btreeidx.cc: In function 'BtreeIndexing::IndexInfo
BtreeIndexing::buildIndex(const BtreeIndexing::IndexedWords&,
File::Class&)':
btreeidx.cc:1004: warning: format '%u' expects type 'unsigned int',
but argument 2 has type 'size_t'
g++ -c -pipe -rdynamic -O2 -I/opt/local/include -I/opt/local/include
-I/opt/local/include -Wall -W
-DPROGRAM_DATA_DIR=\"/usr/local/share/apps/goldendict/\"
-DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB
-DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I.
-I/Library/Frameworks/QtCore.framework/Versions/4/Headers
-I/usr/include/QtCore
-I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
-I/usr/include/QtNetwork
-I/Library/Frameworks/QtGui.framework/Versions/4/Headers
-I/usr/include/QtGui
-I/Library/Frameworks/QtXml.framework/Versions/4/Headers
-I/usr/include/QtXml
-I/Library/Frameworks/phonon.framework/Versions/4/Headers
-I/usr/include/phonon
-I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
-I/usr/include/QtWebKit -I/usr/include -I. -Imaclibs/include
-Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild
-F/Library/Frameworks -o build/stardict.o stardict.cc
stardict.cc: In function 'void Stardict::handleIdxSynFile(const
std::string&, BtreeIndexing::IndexedWords&, ChunkedStorage::Writer&,
std::vector<unsigned int, std::allocator<unsigned int> >*, bool)':
stardict.cc:1005: warning: format '%u' expects type 'unsigned int',
but argument 2 has type 'size_t'
g++ -c -pipe -rdynamic -O2 -I/opt/local/include -I/opt/local/include
-I/opt/local/include -Wall -W
-DPROGRAM_DATA_DIR=\"/usr/local/share/apps/goldendict/\"
-DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB
-DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I.
-I/Library/Frameworks/QtCore.framework/Versions/4/Headers
-I/usr/include/QtCore
-I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
-I/usr/include/QtNetwork
-I/Library/Frameworks/QtGui.framework/Versions/4/Headers
-I/usr/include/QtGui
-I/Library/Frameworks/QtXml.framework/Versions/4/Headers
-I/usr/include/QtXml
-I/Library/Frameworks/phonon.framework/Versions/4/Headers
-I/usr/include/phonon
-I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
-I/usr/include/QtWebKit -I/usr/include -I. -Imaclibs/include
-Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild
-F/Library/Frameworks -o build/chunkedstorage.o chunkedstorage.cc
g++ -c -pipe -rdynamic -O2 -I/opt/local/include -I/opt/local/include
-I/opt/local/include -Wall -W
-DPROGRAM_DATA_DIR=\"/usr/local/share/apps/goldendict/\"
-DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB
-DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I.
-I/Library/Frameworks/QtCore.framework/Versions/4/Headers
-I/usr/include/QtCore
-I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
-I/usr/include/QtNetwork
-I/Library/Frameworks/QtGui.framework/Versions/4/Headers
-I/usr/include/QtGui
-I/Library/Frameworks/QtXml.framework/Versions/4/Headers
-I/usr/include/QtXml
-I/Library/Frameworks/phonon.framework/Versions/4/Headers
-I/usr/include/phonon
-I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
-I/usr/include/QtWebKit -I/usr/include -I. -Imaclibs/include
-Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild
-F/Library/Frameworks -o build/xdxf2html.o xdxf2html.cc
g++ -c -pipe -rdynamic -O2 -I/opt/local/include -I/opt/local/include
-I/opt/local/include -Wall -W
-DPROGRAM_DATA_DIR=\"/usr/local/share/apps/goldendict/\"
-DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB
-DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I.
-I/Library/Frameworks/QtCore.framework/Versions/4/Headers
-I/usr/include/QtCore
-I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
-I/usr/include/QtNetwork
-I/Library/Frameworks/QtGui.framework/Versions/4/Headers
-I/usr/include/QtGui
-I/Library/Frameworks/QtXml.framework/Versions/4/Headers
-I/usr/include/QtXml
-I/Library/Frameworks/phonon.framework/Versions/4/Headers
-I/usr/include/phonon
-I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
-I/usr/include/QtWebKit -I/usr/include -I. -Imaclibs/include
-Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild
-F/Library/Frameworks -o build/iconv.o iconv.cc
g++ -c -pipe -rdynamic -O2 -I/opt/local/include -I/opt/local/include
-I/opt/local/include -Wall -W
-DPROGRAM_DATA_DIR=\"/usr/local/share/apps/goldendict/\"
-DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB
-DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I.
-I/Library/Frameworks/QtCore.framework/Versions/4/Headers
-I/usr/include/QtCore
-I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
-I/usr/include/QtNetwork
-I/Library/Frameworks/QtGui.framework/Versions/4/Headers
-I/usr/include/QtGui
-I/Library/Frameworks/QtXml.framework/Versions/4/Headers
-I/usr/include/QtXml
-I/Library/Frameworks/phonon.framework/Versions/4/Headers
-I/usr/include/phonon
-I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
-I/usr/include/QtWebKit -I/usr/include -I. -Imaclibs/include
-Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild
-F/Library/Frameworks -o build/lsa.o lsa.cc
/opt/local/include/vorbis/vorbisfile.h:75: warning:
'OV_CALLBACKS_DEFAULT' defined but not used
/opt/local/include/vorbis/vorbisfile.h:82: warning:
'OV_CALLBACKS_NOCLOSE' defined but not used
/opt/local/include/vorbis/vorbisfile.h:89: warning:
'OV_CALLBACKS_STREAMONLY' defined but not used
/opt/local/include/vorbis/vorbisfile.h:96: warning:
'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used
g++ -c -pipe -rdynamic -O2 -I/opt/local/include -I/opt/local/include
-I/opt/local/include -Wall -W
-DPROGRAM_DATA_DIR=\"/usr/local/share/apps/goldendict/\"
-DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB
-DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I.
-I/Library/Frameworks/QtCore.framework/Versions/4/Headers
-I/usr/include/QtCore
-I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
-I/usr/include/QtNetwork
-I/Library/Frameworks/QtGui.framework/Versions/4/Headers
-I/usr/include/QtGui
-I/Library/Frameworks/QtXml.framework/Versions/4/Headers
-I/usr/include/QtXml
-I/Library/Frameworks/phonon.framework/Versions/4/Headers
-I/usr/include/phonon
-I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
-I/usr/include/QtWebKit -I/usr/include -I. -Imaclibs/include
-Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild
-F/Library/Frameworks -o build/htmlescape.o htmlescape.cc
g++ -c -pipe -rdynamic -O2 -I/opt/local/include -I/opt/local/include
-I/opt/local/include -Wall -W
-DPROGRAM_DATA_DIR=\"/usr/local/share/apps/goldendict/\"
-DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB
-DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I.
-I/Library/Frameworks/QtCore.framework/Versions/4/Headers
-I/usr/include/QtCore
-I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
-I/usr/include/QtNetwork
-I/Library/Frameworks/QtGui.framework/Versions/4/Headers
-I/usr/include/QtGui
-I/Library/Frameworks/QtXml.framework/Versions/4/Headers
-I/usr/include/QtXml
-I/Library/Frameworks/phonon.framework/Versions/4/Headers
-I/usr/include/phonon
-I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
-I/usr/include/QtWebKit -I/usr/include -I. -Imaclibs/include
-Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild
-F/Library/Frameworks -o build/dsl.o dsl.cc
dsl.cc: In function 'std::vector<sptr<Dictionary::Class>,
std::allocator<sptr<Dictionary::Class> > > Dsl::makeDictionaries(const
std::vector<std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, std::allocator<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > > >&, const
std::string&, Dictionary::Initializing&)':
dsl.cc:1551: warning: format '%X' expects type 'unsigned int', but
argument 4 has type 'size_t'
g++ -c -pipe -rdynamic -O2 -I/opt/local/include -I/opt/local/include
-I/opt/local/include -Wall -W
-DPROGRAM_DATA_DIR=\"/usr/local/share/apps/goldendict/\"
-DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB
-DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I.
-I/Library/Frameworks/QtCore.framework/Versions/4/Headers
-I/usr/include/QtCore
-I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
-I/usr/include/QtNetwork
-I/Library/Frameworks/QtGui.framework/Versions/4/Headers
-I/usr/include/QtGui
-I/Library/Frameworks/QtXml.framework/Versions/4/Headers
-I/usr/include/QtXml
-I/Library/Frameworks/phonon.framework/Versions/4/Headers
-I/usr/include/phonon
-I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
-I/usr/include/QtWebKit -I/usr/include -I. -Imaclibs/include
-Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild
-F/Library/Frameworks -o build/dsl_details.o dsl_details.cc
dsl_details.cc: In constructor
'Dsl::Details::ArticleDom::ArticleDom(const std::wstring&)':
dsl_details.cc:383: warning: format '%u' expects type 'unsigned int',
but argument 3 has type 'size_t'
dsl_details.cc: In constructor
'Dsl::Details::DslScanner::DslScanner(const std::string&)':
dsl_details.cc:627: error: 'wcscasecmp' was not declared in this scope
dsl_details.cc: In function 'void
Dsl::Details::normalizeHeadword(std::wstring&)':
dsl_details.cc:991: warning: suggest a space before ';' or explicit
braces around empty body in 'for' statement
make: *** [build/dsl_details.o] Error 1
make: Leaving directory `/Users/chulai/Documents/goldendict'
The process "/usr/bin/make" exited with code 2.
Error while building project goldendict (target: Desktop)
When executing build step 'Make'


I googled this and it seems wcscasecmp does not exist in OS X? Check http://trac.osgeo.org/csmap/ticket/25

Chulai
chulai
 
Posts: 411
Joined: Sat Jan 08, 2011 10:11 pm

Re: Added Mac OS X support

Postby strannik » Sun Aug 07, 2011 11:40 pm

Actually, please don't bother. I'm creating 'fat' libraries for both 32 and 64 bit and will submit these changes to my git branch soon.
You won't need to compile anything manually, just build the project in Qt Creator.
strannik
 
Posts: 74
Joined: Mon Oct 19, 2009 12:05 pm

Re: Added Mac OS X support

Postby chulai » Mon Aug 08, 2011 12:12 am

Thanks, I followed your instructions and used homebrew to download the lib. I could find all of them but libvorbisfile. And I'm getting again the first compilation output errors. Talking about fat libraries, do you think is possible and make sense to create a Universal binary to support 32-bit and 64-bit systems? I''m looking at this table: http://doc.qt.nokia.com/latest/developing-on-mac.html

Hopefully I will be able to build GD under OS X with you changes

Chulai

strannik wrote:Actually, please don't bother. I'm creating 'fat' libraries for both 32 and 64 bit and will submit these changes to my git branch soon.
You won't need to compile anything manually, just build the project in Qt Creator.
chulai
 
Posts: 411
Joined: Sat Jan 08, 2011 10:11 pm

Re: Added Mac OS X support

Postby strannik » Mon Aug 08, 2011 1:09 am

do you think is possible and make sense to create a Universal binary to support 32-bit and 64-bit systems? I''m looking at this table: http://doc.qt.nokia.com/latest/developing-on-mac.html

I googled this and it seems wcscasecmp does not exist in OS X?

Ребят, по поводу wcscasecmp -- там же в dsl_details.cc в самом начале она реализована. Только там стоит ifdef __WIN32, добавьте еще и для OSX чтобы она использовалась.

That's good news, thanks! I introduced these changes and rebuilt the project with Cocoa: Mac binary package for Mac OS X 10.5 - 10.6 (32-bit and 64-bit) in Qt Creator Binary for Mac per your suggestion, it compiled and linked successfully! The final binary was indeed created for both architectures, since

Code: Select all
dinvlad:goldendict denis$ file goldendict.app/Contents/MacOS/goldendict
goldendict.app/Contents/MacOS/goldendict: Mach-O universal binary with 2 architectures
goldendict.app/Contents/MacOS/goldendict (for architecture x86_64):   Mach-O 64-bit executable x86_64
goldendict.app/Contents/MacOS/goldendict (for architecture i386):   Mach-O executable i386

Check it out..
Please test if the binary runs on your Mac, it does on mine in both 64- and 32-bit modes!

The only small annoyance that I found with Cocoa though is the speed of scrolling in the main window. With the latest 64-bit Qt SDK for Mac, it's fast. In Cocoa, it has a "draggy" feeling. Perhaps there's some weird difference in their implementation, not sure if Konstantin knows what it might be?
strannik
 
Posts: 74
Joined: Mon Oct 19, 2009 12:05 pm

Re: Added Mac OS X support

Postby chulai » Sun Aug 14, 2011 5:55 pm

Hi! Sorry for the long delay to reply. It's been a busy week...
I managed to build GoldenDict for 32-bit arch but still have some outstanding issues:

1) Compiler can't find time_t typedef:

gcc -c -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -arch i386 -I/usr/local/Cellar/libvorbis/1.3.2/include -I/usr/local/Cellar/libogg/1.2.2/include -I/usr/local/Cellar/libvorbis/1.3.2/include -I/usr/local/Cellar/libogg/1.2.2/include -I/usr/local/Cellar/libogg/1.2.2/include -I/usr/local/Cellar/hunspell/1.3.2/include/hunspell -Wall -W -DPROGRAM_DATA_DIR=\"/usr/local/share/apps/goldendict/\" -DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/usr/include/QtNetwork -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/Library/Frameworks/QtXml.framework/Versions/4/Headers -I/usr/include/QtXml -I/Library/Frameworks/phonon.framework/Versions/4/Headers -I/usr/include/phonon -I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers -I/usr/include/QtWebKit -I/usr/include -I. -Imaclibs/include -Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild -F/Library/Frameworks -o build/dictzip.o dictzip.c
In file included from dictzip.c:26:
dictzip.h:69: error: expected specifier-qualifier-list before 'time_t'

I do have in my filesystem:
    /usr/include/sys/types.h
    /usr/include/machine/types.h
    /usr/include/i386/types.h
    /usr/include/ppc/types.h

but I couldn't find where time_t is defined either!

Anyhow, I kind of resolved this by manually including in dictzip.h:

Code: Select all
#ifndef _TIME_T_DEFINED
typedef long    time_t;
#define _TIME_T_DEFINED
#endif


2) It seems Qt Creator cannot find (or use) the FAT libs and headers in maclibs folder:

g++ -c -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -arch i386 -Wall -W -DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/usr/include/QtNetwork -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/Library/Frameworks/QtXml.framework/Versions/4/Headers -I/usr/include/QtXml -I/Library/Frameworks/phonon.framework/Versions/4/Headers -I/usr/include/phonon -I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers -I/usr/include/QtWebKit -I/usr/include -I. -Imaclibs/include -Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild -F/Library/Frameworks -o build/qrc_flags.o build/qrc_flags.cpp
g++ -headerpad_max_install_names -arch x86_64 -arch i386 -Xarch_x86_64 -mmacosx-version-min=10.5 -o goldendict.app/Contents/MacOS/goldendict build/folding.o build/main.o build/dictionary.o build/config.o build/sources.o build/mainwindow.o build/utf8.o build/file.o build/bgl_babylon.o build/bgl.o build/initializing.o build/article_netmgr.o build/dictzip.o build/btreeidx.o build/stardict.o build/chunkedstorage.o build/xdxf2html.o build/iconv.o build/lsa.o build/htmlescape.o build/dsl.o build/dsl_details.o build/filetype.o build/fsencoding.o build/groups.o build/groups_widgets.o build/instances.o build/article_maker.o build/scanpopup.o build/articleview.o build/externalviewer.o build/wordfinder.o build/groupcombobox.o build/keyboardstate.o build/mouseover.o build/preferences.o build/mutex.o build/mediawiki.o build/sounddir.o build/hunspell.o build/dictdfiles.o build/audiolink.o build/wstring.o build/wstring_qt.o build/processwrapper.o build/hotkeywrapper.o build/hotkeyedit.o build/langcoder.o build/editdictionaries.o build/loaddictionaries.o build/transliteration.o build/romaji.o build/russiantranslit.o build/german.o build/website.o build/orderandprops.o build/language.o build/dictionarybar.o build/broken_xrecord.o build/history.o build/atomic_rename.o build/articlewebview.o build/zipfile.o build/indexedzip.o build/termination.o build/greektranslit.o build/webmultimediadownload.o build/forvo.o build/country.o build/about.o build/programs.o build/parsecmdline.o build/maintabwidget.o build/mainstatusbar.o build/gdappstyle.o build/qtsingleapplication.o build/qtlocalpeer.o build/moc_mainwindow.o build/moc_dictionary.o build/moc_config.o build/moc_sources.o build/moc_initializing.o build/moc_article_netmgr.o build/moc_groups.o build/moc_groups_widgets.o build/moc_article_maker.o build/moc_scanpopup.o build/moc_articleview.o build/moc_externalviewer.o build/moc_wordfinder.o build/moc_groupcombobox.o build/moc_mouseover.o build/moc_preferences.o build/moc_mediawiki.o build/moc_hotkeywrapper.o build/moc_hotkeyedit.o build/moc_editdictionaries.o build/moc_loaddictionaries.o build/moc_orderandprops.o build/moc_dictionarybar.o build/moc_history.o build/moc_articlewebview.o build/moc_webmultimediadownload.o build/moc_forvo.o build/moc_about.o build/moc_programs.o build/moc_maintabwidget.o build/moc_mainstatusbar.o build/moc_gdappstyle.o build/moc_qtsingleapplication.o build/moc_qtlocalpeer.o build/qrc_resources.o build/qrc_flags.o -F/Library/Frameworks -L/Library/Frameworks -lz -liconv -lvorbisfile -lvorbis -logg -lhunspell-1.3 -Lmaclibs/lib -L/usr/X11/lib -framework QtWebKit -framework phonon -framework QtDBus -framework QtXml -framework QtCore -framework QtGui -framework QtNetwork
ld: warning: in /usr/local/lib/libvorbisfile.dylib, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in /usr/local/lib/libvorbis.dylib, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in /usr/local/lib/libogg.dylib, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in /usr/local/lib/libhunspell-1.3.dylib, file was built for i386 which is not the architecture being linked (x86_64)
Undefined symbols for architecture x86_64:
"Hunspell::free_list(char***, int)", referenced from:
HunspellMorpho::(anonymous namespace)::HunspellHeadwordsRequest::suggest(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&)in hunspell.o
HunspellMorpho::(anonymous namespace)::HunspellArticleRequestRunnable::run()in hunspell.o
HunspellMorpho::(anonymous namespace)::HunspellArticleRequestRunnable::run()in hunspell.o
"Hunspell::analyze(char***, char const*)", referenced from:
HunspellMorpho::(anonymous namespace)::HunspellHeadwordsRequest::suggest(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&)in hunspell.o
"Hunspell::~Hunspell()", referenced from:
HunspellMorpho::(anonymous namespace)::HunspellDictionary::~HunspellDictionary()in hunspell.o
HunspellMorpho::(anonymous namespace)::HunspellDictionary::~HunspellDictionary()in hunspell.o
"Hunspell::spell(char const*, int*, char**)", referenced from:
HunspellMorpho::(anonymous namespace)::HunspellPrefixMatchRequestRunnable::run()in hunspell.o
HunspellMorpho::(anonymous namespace)::HunspellArticleRequestRunnable::run()in hunspell.o
"_ov_info", referenced from:
Lsa::(anonymous namespace)::LsaDictionary::getResource(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in lsa.o
"Hunspell::suggest(char***, char const*)", referenced from:
HunspellMorpho::(anonymous namespace)::HunspellArticleRequestRunnable::run()in hunspell.o
"_ov_read", referenced from:
Lsa::(anonymous namespace)::LsaDictionary::getResource(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in lsa.o
"_libiconv", referenced from:
Babylon::convertToUtf8(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int)in bgl_babylon.o
Babylon::convertToUtf8(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int)in bgl_babylon.o
Iconv::convert(void const*&, unsigned long&, void*&, unsigned long&)in iconv.o
"Hunspell::Hunspell(char const*, char const*, char const*)", referenced from:
HunspellMorpho::makeDictionaries(Config::Hunspell const&) in hunspell.o
"Hunspell::get_dic_encoding()", referenced from:
HunspellMorpho::(anonymous namespace)::decodeFromHunspell(Hunspell&, char const*)in hunspell.o
HunspellMorpho::(anonymous namespace)::encodeToHunspell(Hunspell&, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&)in hunspell.o
"_libiconv_open", referenced from:
Babylon::convertToUtf8(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int)in bgl_babylon.o
Iconv::reinit(char const*, char const*)in iconv.o
Iconv::Iconv(char const*, char const*)in iconv.o
"_ov_open_callbacks", referenced from:
Lsa::(anonymous namespace)::LsaDictionary::getResource(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in lsa.o
"_ov_pcm_seek", referenced from:
Lsa::(anonymous namespace)::LsaDictionary::getResource(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in lsa.o
"_libiconv_close", referenced from:
Babylon::convertToUtf8(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int)in bgl_babylon.o
Iconv::~Iconv()in iconv.o
Iconv::reinit(char const*, char const*)in iconv.o
"_ov_clear", referenced from:
Lsa::(anonymous namespace)::LsaDictionary::getResource(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in lsa.o
Lsa::(anonymous namespace)::LsaDictionary::getResource(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in lsa.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/7u/7uJ+y36XGnyfZ9WQYgmDFk+++TI/-Tmp-//ccvJU2gM.out (No such file or directory)
make: *** [goldendict.app/Contents/MacOS/goldendict] Error 1


I rechecked the FAT libs just in case and they are ok. For example:
Code: Select all
file libiconv.a
libiconv.a: Mach-O universal binary with 2 architectures
libiconv.a (for architecture i386):   current ar archive random library
libiconv.a (for architecture x86_64):   current ar archive random library


Finally, I resolved this issue by removing 64-bit arch from the goldendict.pro file. From:

Code: Select all
CONFIG += x86 x86_64


to:

Code: Select all
CONFIG += x86


After making both corrections I finally could build GD for 32-bit only (no Universal build here):

g++ -headerpad_max_install_names -rdynamic -arch i386 -o goldendict.app/Contents/MacOS/goldendict build/folding.o build/main.o build/dictionary.o build/config.o build/sources.o build/mainwindow.o build/utf8.o build/file.o build/bgl_babylon.o build/bgl.o build/initializing.o build/article_netmgr.o build/dictzip.o build/btreeidx.o build/stardict.o build/chunkedstorage.o build/xdxf2html.o build/iconv.o build/lsa.o build/htmlescape.o build/dsl.o build/dsl_details.o build/filetype.o build/fsencoding.o build/groups.o build/groups_widgets.o build/instances.o build/article_maker.o build/scanpopup.o build/articleview.o build/externalviewer.o build/wordfinder.o build/groupcombobox.o build/keyboardstate.o build/mouseover.o build/preferences.o build/mutex.o build/mediawiki.o build/sounddir.o build/hunspell.o build/dictdfiles.o build/audiolink.o build/wstring.o build/wstring_qt.o build/processwrapper.o build/hotkeywrapper.o build/hotkeyedit.o build/langcoder.o build/editdictionaries.o build/loaddictionaries.o build/transliteration.o build/romaji.o build/russiantranslit.o build/german.o build/website.o build/orderandprops.o build/language.o build/dictionarybar.o build/broken_xrecord.o build/history.o build/atomic_rename.o build/articlewebview.o build/zipfile.o build/indexedzip.o build/termination.o build/greektranslit.o build/webmultimediadownload.o build/forvo.o build/country.o build/about.o build/programs.o build/parsecmdline.o build/maintabwidget.o build/mainstatusbar.o build/gdappstyle.o build/qtsingleapplication.o build/qtlocalpeer.o build/moc_mainwindow.o build/moc_dictionary.o build/moc_config.o build/moc_sources.o build/moc_initializing.o build/moc_article_netmgr.o build/moc_groups.o build/moc_groups_widgets.o build/moc_article_maker.o build/moc_scanpopup.o build/moc_articleview.o build/moc_externalviewer.o build/moc_wordfinder.o build/moc_groupcombobox.o build/moc_mouseover.o build/moc_preferences.o build/moc_mediawiki.o build/moc_hotkeywrapper.o build/moc_hotkeyedit.o build/moc_editdictionaries.o build/moc_loaddictionaries.o build/moc_orderandprops.o build/moc_dictionarybar.o build/moc_history.o build/moc_articlewebview.o build/moc_webmultimediadownload.o build/moc_forvo.o build/moc_about.o build/moc_programs.o build/moc_maintabwidget.o build/moc_mainstatusbar.o build/moc_gdappstyle.o build/moc_qtsingleapplication.o build/moc_qtlocalpeer.o build/qrc_resources.o build/qrc_flags.o -F/Library/Frameworks -L/Library/Frameworks -lz -lX11 -lXtst -liconv -Lmaclibs/lib -L/usr/X11/lib -L/usr/local/Cellar/libvorbis/1.3.2/lib -L/usr/local/Cellar/libogg/1.2.2/lib -lvorbisfile -lvorbis -lm -logg -L/usr/local/Cellar/hunspell/1.3.2/lib -lhunspell-1.3 -framework QtWebKit -framework phonon -framework QtDBus -framework QtXml -framework QtCore -framework QtGui -framework QtNetwork
make: Leaving directory `/Users/mac/Documents/goldendict'
The process "/usr/bin/make" exited normally.


And the app is 32-bit only:

Code: Select all
file goldendict
goldendict: Mach-O executable i386


Other thing I tried was to change tool chain from GCC (x86 64bit) to GCC (x86 64bit) to no avail.

Also, I tried to run your Universal GD binary and got this:

Code: Select all
Process:         goldendict [10686]
Path:            /Users/chulai/Downloads/goldendict.app/Contents/MacOS/goldendict
Identifier:      com.yourcompany.goldendict
Version:         ??? (???)
Code Type:       X86 (Native)
Parent Process:  launchd [91]

Date/Time:       2011-08-14 12:28:47.359 -0300
OS Version:      Mac OS X 10.6.6 (10J567)
Report Version:  6

Interval Since Last Report:          81589 sec
Crashes Since Last Report:           9
Per-App Interval Since Last Report:  614 sec
Per-App Crashes Since Last Report:   8
Anonymous UUID:                      30E3231B-232F-427D-89F2-B492549614F1

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Crashed Thread:  0

Dyld Error Message:
  Library not loaded: /usr/X11/lib/libX11.6.dylib
  Referenced from: /Users/mac/Downloads/goldendict.app/Contents/MacOS/goldendict
  Reason: Incompatible library version: goldendict requires version 10.0.0 or later, but libX11.6.dylib provides version 9.0.0


After that, I installed XQuartz-2.6.3.dmg to replace the default X11.app but it seems I'm still using the default one after I restarted cause I'm still getting the same error. I'm going to try to research a bit more.

I don't have previous experience programming in OS X so if anyone could give me some help it would be great.

Thanks,

Chulai
chulai
 
Posts: 411
Joined: Sat Jan 08, 2011 10:11 pm

Re: Added Mac OS X support

Postby strannik » Sun Aug 14, 2011 7:41 pm

Hi Chulai,
1) glad you resolved this one! can you push it to your fork on github?
2) this one is perhaps due to Homebrew, which modified your PATH (adding /user/local/lib) so that linker first looks there, find the libs and of course refuses to use them as they are not FAT; I suggest to 'brew uninstall libvorbis libogg hunspell' :) EDIT: I've included the changes to goldendict.pro file so that it ignores any extra libs installed on the system via Brew/Macports/etc. Please, check it out.
3) my bad, I've compiled the 'universal' binary with support for dynamic X11 libraries installed on my system (Lion 10.7), which are obviously newer then the ones on Snow Leo; we need someone with 64-bit system AND Snow Leo so that they compile the universal binary themselves, then any system (>=10.6) will be able to use it. Unfortunately, static linking would be more complicated, as X11 takes a lot of libs with it. I can install 10.6 in VmWare and give it a shot sometime later. EDIT: 64bit Intel Mac with Leo (10.5) would be even nicer, but I don't have it.

P.S. I found an easy way to include support for hotkeys, just don't have time at the moment to implement it; I'll take a look later. Seems like there's also a ready-to-use cocoa API for pop-up functionality. Needs some work, but can definitely be included as well.
strannik
 
Posts: 74
Joined: Mon Oct 19, 2009 12:05 pm

Re: Added Mac OS X support

Postby ikm » Mon Aug 15, 2011 12:26 am

strannik wrote:'universal' binary with support for dynamic X11 libraries

Isn't Qt not using X11 under Mac any more?
ikm
Автор GoldenDict
 
Posts: 1578
Joined: Wed Feb 04, 2009 10:40 am

Re: Added Mac OS X support

Postby strannik » Mon Aug 15, 2011 12:57 am

ikm, you're right.
Here's the new universal binary that depends only on /usr/lib and 'maclibs':
Code: Select all
otool -L goldendict.app/Contents/MacOS/goldendict
goldendict.app/Contents/MacOS/goldendict:
   /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
   QtWebKit.framework/Versions/4/QtWebKit (compatibility version 4.7.0, current version 4.7.3)
   phonon.framework/Versions/4/phonon (compatibility version 4.4.0, current version 4.4.0)
   QtDBus.framework/Versions/4/QtDBus (compatibility version 4.7.0, current version 4.7.3)
   QtXml.framework/Versions/4/QtXml (compatibility version 4.7.0, current version 4.7.3)
   QtCore.framework/Versions/4/QtCore (compatibility version 4.7.0, current version 4.7.3)
   QtGui.framework/Versions/4/QtGui (compatibility version 4.7.0, current version 4.7.3)
   QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.7.0, current version 4.7.3)
   /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)
   /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1105.0.0)
   /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.0.0)
strannik
 
Posts: 74
Joined: Mon Oct 19, 2009 12:05 pm

Re: Added Mac OS X support

Postby strannik » Mon Aug 15, 2011 1:07 am

Hmm, it seems it still relies on the Qt libraries installed on the system within SDK..
Working on it.
strannik
 
Posts: 74
Joined: Mon Oct 19, 2009 12:05 pm

Re: Added Mac OS X support

Postby strannik » Mon Aug 15, 2011 1:44 am

Well, here's the bundle .dmg created with the help of
Code: Select all
/Applications/QtSDK/Desktop/Qt/473/gcc/bin/macdeployqt goldendict.app -dmg
The redistributable .dmg file is 45 MB :)
But at least, it should now work on any Intel Mac..
Code: Select all
otool -L /Volumes/goldendict/goldendict.app/Contents/MacOS/goldendict
/Volumes/goldendict/goldendict.app/Contents/MacOS/goldendict:
   /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
   @executable_path/../Frameworks/QtWebKit.framework/Versions/4/QtWebKit (compatibility version 4.7.0, current version 4.7.3)
   @executable_path/../Frameworks/phonon.framework/Versions/4/phonon (compatibility version 4.4.0, current version 4.4.0)
   @executable_path/../Frameworks/QtDBus.framework/Versions/4/QtDBus (compatibility version 4.7.0, current version 4.7.3)
   @executable_path/../Frameworks/QtXml.framework/Versions/4/QtXml (compatibility version 4.7.0, current version 4.7.3)
   @executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore (compatibility version 4.7.0, current version 4.7.3)
   @executable_path/../Frameworks/QtGui.framework/Versions/4/QtGui (compatibility version 4.7.0, current version 4.7.3)
   @executable_path/../Frameworks/QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.7.0, current version 4.7.3)
   /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)
   /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1105.0.0)
   /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.0.0)
strannik
 
Posts: 74
Joined: Mon Oct 19, 2009 12:05 pm

PreviousNext

Return to General

Who is online

Users browsing this forum: Bing [Bot] and 3 guests