[Kde-pim] Fwd: How to reference to kde api in qt creator

Michaël Parchet mparchet at sunrise.ch
Wed Nov 7 15:45:10 GMT 2012


Hello,

I need to use the kdepim amd the kdelib package in my qt creator proje. II have download kdepim source code from kde-git and try to compile it with cmake but I got this error message.

CMake Error: Internal CMake error, TryCompile configure of cmake failed

CMake Error at /opt/local/share/apps/cmake/modules/FindKDE4Internal.cmake:1295 (message):
Qt compiled without support for -fvisibility=hidden. This will break
plugins and linking of some applications. Please fix your Qt installation
(try passing --reduce-exports to configure).
Call Stack (most recent call first):
/opt/local/share/cmake-2.8/Modules/FindKDE4.cmake:95 (FIND_PACKAGE)
CMakeLists.txt:124 (find_package)


CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
QT_QT_INCLUDE_DIR
used as include directory in directory /Users/rparchet/physiomanager/kdepim-build/CMakeFiles/CMakeTmp

-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /opt/local/bin/gcc
-- Check for working C compiler: /opt/local/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /opt/local/bin/c++
-- Check for working CXX compiler: /opt/local/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found git: /usr/bin/git
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - not found.
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found.
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found.
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - found
-- Looking for QT_MAC_USE_COCOA
-- Looking for QT_MAC_USE_COCOA - found
-- Found Qt-Version 4.8.3
-- -> QT_QMAKE_EXECUTABLE is /opt/local/bin/qmake
-- -> QT_INCLUDE_DIR is /opt/local/include
-- -> QT_QTCORE_INCLUDE_DIR is /opt/local/include/QtCore
-- -> QT_BINARY_DIR is /opt/local/bin
-- -> QT_LIBRARY_DIR is /opt/local/lib
-- -> QT_PLUGINS_DIR is /opt/local/share/qt4/plugins
-- -> QT_MKSPECS_DIR is /opt/local/share/qt4/mkspecs
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Found OpenSSL: /usr/lib/libssl.dylib
-- Found Automoc4: /opt/local/bin/automoc4
-- Found Perl: /opt/local/bin/perl (found version "5.12.4")
-- Looking for Phonon
-- -> KDE4_INCLUDE_INSTALL_DIR is /opt/local/include
-- -> KDE4_LIB_INSTALL_DIR is /opt/local/lib
-- -> INCLUDE_INSTALL_DIR is
-- -> QT_LIBRARY_DIR is /opt/local/lib
-- -> QT_INCLUDE_DIR is /opt/local/include
-- Results of Search for Phonon
-- -> PHONON_VERSION is 4.6.0
-- -> PHONON_INCLUDE_DIR is /opt/local/include
-- -> PHONON_LIBRARY is /opt/local/lib/libphonon.dylib
-- Found Phonon: /opt/local/include
-- Performing Test _OFFT_IS_64BIT
-- Performing Test _OFFT_IS_64BIT - Success
-- Performing Test HAVE_FPIE_SUPPORT
-- Performing Test HAVE_FPIE_SUPPORT - Success
-- Performing Test __KDE_HAVE_W_OVERLOADED_VIRTUAL
-- Performing Test __KDE_HAVE_W_OVERLOADED_VIRTUAL - Success
-- Performing Test __KDE_HAVE_GCC_VISIBILITY
-- Performing Test __KDE_HAVE_GCC_VISIBILITY - Success
-- Configuring incomplete, errors occurred!

Sould I download the macpart package ?


Can you help me please ?

Best regards

mparchet


Début du message réexpédié :

> De : Kevin Krammer <krammer at kde.org>
> Objet : Rép : [Kde-pim] How to reference to kde api in qt creator
> Date : 6 novembre 2012 22:15:45 UTC+01:00
> À : kde-pim at kde.org
> Répondre à : krammer at kde.org, KDE PIM <kde-pim at kde.org>
> 
> On Tuesday, 2012-11-06, Martin Klapetek wrote:
> 
>>> When I try to include and compile, I get this error
>>> 
>>> 'KXmlGuiWindow' file not found
>>> 
>>> I found this documentation.
>>> 
>>> http://www.purinchu.net/kdelibs-apidocs/kdeui/html/classKXmlGuiWindow.htm
>>> l
>> 
>> This is a part of kdelibs, so you need kdelibs compiled and installed too.
>> Then you just do
>> 
>> #include <kxmlguiwindow.h>
>> 
>> in your source code as the doc says and then you need to link against the
>> proper library, which is ${KDE4_KDEUI_LIBS} for CMake, but I don't know
>> what variable you need to use for QMake (when using qt creator), that might
>> need some googling :)
> 
> Using Qt Creator doesn't mean you can't make use of the way more advanced 
> CMake build system :)
> If, however, suffering with qmake is part of the exercise, then the best way is 
> probably to build and install all KDE libraries into a common prefix and 
> reference that via environment variable. qmake has support for those.
> 
>>> I develop with a mac with mac os 10.8.2. I have macport that contain a
>>> kde version.
>> 
>> I'm not familiar with developing on mac, so hopefully someone else will
>> give you more specific info if my response won't be enough :)
> 
> If macport has KDE libraries installed somewhere, you should be able to 
> reference that location either in a hard coded way or through an environment 
> variable that is set before qmake runs.
> 
> But, as Martin said, people who actually do use Mac for development might have 
> even better ways of doing it.
> 
> Cheers,
> Kevin
> 
> -- 
> Kevin Krammer, KDE developer, xdg-utils developer
> KDE user support, developer mentoring
> _______________________________________________
> KDE PIM mailing list kde-pim at kde.org
> https://mail.kde.org/mailman/listinfo/kde-pim
> KDE PIM home page at http://pim.kde.org/

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list