QTcreator + libgdata

Iniciado por oPen syLar, 28 Agosto 2011, 04:10 AM

0 Miembros y 1 Visitante están viendo este tema.

oPen syLar

Buenas.. Estaba tratando de compilar un prj que tengo sobre QT y libgdata pero... No encuentro la forma... Se que debe ser un parametro que se le pasa a g++ .. Pero no doy con cual...


Actualmente tengo Qt Creator 2.2.1 (Qt 4.7.3 (64 bit)) y mi version libgdata es la 0.8.0-1

Normalmente en aplicaciones sin GUI QT compilo normal con...

g++ `pkg-config --libs --cflags libgdata` -l curl -l xml2 -l mysqlclient main.cpp;

Y esto es suficiente pero.. Con QTcreator parece que necesito de algo mas

Mi Makefile

#############################################################################
# Makefile for building: untitled3
# Generated by qmake (2.01a) (Qt 4.7.3) on: sáb ago 27 21:02:21 2011
# Project:  ../untitled3/untitled3.pro
# Template: app
# Command: /usr/bin/qmake -spec /usr/share/qt/mkspecs/linux-g++-64 -o Makefile ../untitled3/untitled3.pro
#############################################################################

####### Compiler, tools and options

CC            = gcc
CXX           = g++
DEFINES       = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
CFLAGS        = -m64 -pipe -march=x86-64 -mtune=generic -O2 -pipe -fno-strict-aliasing -Wall -W -D_REENTRANT $(DEFINES)
CXXFLAGS      = -m64 -pipe -march=x86-64 -mtune=generic -O2 -pipe -fno-strict-aliasing -Wall -W -D_REENTRANT $(DEFINES)
INCPATH       = -I/usr/share/qt/mkspecs/linux-g++-64 -I../untitled3 -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I. -I../untitled3 -I. -I/usr/include/libgdata -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
LINK          = g++
LFLAGS        = -m64 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-O1
LIBS          = $(SUBLIBS)  -L/usr/lib -lQtGui -lQtCore -lpthread -lgdata -lsoup-2.4 -lxml2 -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0
AR            = ar cqs
RANLIB        =
QMAKE         = /usr/bin/qmake
TAR           = tar -cf
COMPRESS      = gzip -9f
COPY          = cp -f
SED           = sed
COPY_FILE     = $(COPY)
COPY_DIR      = $(COPY) -r
STRIP         = strip
INSTALL_FILE  = install -m 644 -p
INSTALL_DIR   = $(COPY_DIR)
INSTALL_PROGRAM = install -m 755 -p
DEL_FILE      = rm -f
SYMLINK       = ln -f -s
DEL_DIR       = rmdir
MOVE          = mv -f
CHK_DIR_EXISTS= test -d
MKDIR         = mkdir -p

####### Output directory

OBJECTS_DIR   = ./

####### Files

SOURCES       = ../untitled3/main.cpp \
../untitled3/mainwindow.cpp \
../untitled3/dialog.cpp moc_mainwindow.cpp \
moc_dialog.cpp
OBJECTS       = main.o \
mainwindow.o \
dialog.o \
moc_mainwindow.o \
moc_dialog.o
DIST          = /usr/share/qt/mkspecs/common/g++.conf \
/usr/share/qt/mkspecs/common/unix.conf \
/usr/share/qt/mkspecs/common/linux.conf \
/usr/share/qt/mkspecs/qconfig.pri \
/usr/share/qt/mkspecs/modules/qt_phonon.pri \
/usr/share/qt/mkspecs/modules/qt_webkit_version.pri \
/usr/share/qt/mkspecs/features/qt_functions.prf \
/usr/share/qt/mkspecs/features/qt_config.prf \
/usr/share/qt/mkspecs/features/exclusive_builds.prf \
/usr/share/qt/mkspecs/features/default_pre.prf \
/usr/share/qt/mkspecs/features/release.prf \
/usr/share/qt/mkspecs/features/default_post.prf \
/usr/share/qt/mkspecs/features/warn_on.prf \
/usr/share/qt/mkspecs/features/qt.prf \
/usr/share/qt/mkspecs/features/unix/thread.prf \
/usr/share/qt/mkspecs/features/moc.prf \
/usr/share/qt/mkspecs/features/resources.prf \
/usr/share/qt/mkspecs/features/uic.prf \
/usr/share/qt/mkspecs/features/yacc.prf \
/usr/share/qt/mkspecs/features/lex.prf \
/usr/share/qt/mkspecs/features/include_source_dir.prf \
../untitled3/untitled3.pro
QMAKE_TARGET  = untitled3
DESTDIR       =
TARGET        = untitled3

first: all
####### Implicit rules

.SUFFIXES: .o .c .cpp .cc .cxx .C

.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

.cc.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

.cxx.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

.C.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

.c.o:
$(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"

####### Build rules

all: Makefile $(TARGET)

$(TARGET): ui_mainwindow.h ui_dialog.h $(OBJECTS)  
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)

Makefile: ../untitled3/untitled3.pro  /usr/share/qt/mkspecs/linux-g++-64/qmake.conf /usr/share/qt/mkspecs/common/g++.conf \
/usr/share/qt/mkspecs/common/unix.conf \
/usr/share/qt/mkspecs/common/linux.conf \
/usr/share/qt/mkspecs/qconfig.pri \
/usr/share/qt/mkspecs/modules/qt_phonon.pri \
/usr/share/qt/mkspecs/modules/qt_webkit_version.pri \
/usr/share/qt/mkspecs/features/qt_functions.prf \
/usr/share/qt/mkspecs/features/qt_config.prf \
/usr/share/qt/mkspecs/features/exclusive_builds.prf \
/usr/share/qt/mkspecs/features/default_pre.prf \
/usr/share/qt/mkspecs/features/release.prf \
/usr/share/qt/mkspecs/features/default_post.prf \
/usr/share/qt/mkspecs/features/warn_on.prf \
/usr/share/qt/mkspecs/features/qt.prf \
/usr/share/qt/mkspecs/features/unix/thread.prf \
/usr/share/qt/mkspecs/features/moc.prf \
/usr/share/qt/mkspecs/features/resources.prf \
/usr/share/qt/mkspecs/features/uic.prf \
/usr/share/qt/mkspecs/features/yacc.prf \
/usr/share/qt/mkspecs/features/lex.prf \
/usr/share/qt/mkspecs/features/include_source_dir.prf \
/usr/lib/libQtGui.prl \
/usr/lib/libQtCore.prl
$(QMAKE) -spec /usr/share/qt/mkspecs/linux-g++-64 -o Makefile ../untitled3/untitled3.pro
/usr/share/qt/mkspecs/common/g++.conf:
/usr/share/qt/mkspecs/common/unix.conf:
/usr/share/qt/mkspecs/common/linux.conf:
/usr/share/qt/mkspecs/qconfig.pri:
/usr/share/qt/mkspecs/modules/qt_phonon.pri:
/usr/share/qt/mkspecs/modules/qt_webkit_version.pri:
/usr/share/qt/mkspecs/features/qt_functions.prf:
/usr/share/qt/mkspecs/features/qt_config.prf:
/usr/share/qt/mkspecs/features/exclusive_builds.prf:
/usr/share/qt/mkspecs/features/default_pre.prf:
/usr/share/qt/mkspecs/features/release.prf:
/usr/share/qt/mkspecs/features/default_post.prf:
/usr/share/qt/mkspecs/features/warn_on.prf:
/usr/share/qt/mkspecs/features/qt.prf:
/usr/share/qt/mkspecs/features/unix/thread.prf:
/usr/share/qt/mkspecs/features/moc.prf:
/usr/share/qt/mkspecs/features/resources.prf:
/usr/share/qt/mkspecs/features/uic.prf:
/usr/share/qt/mkspecs/features/yacc.prf:
/usr/share/qt/mkspecs/features/lex.prf:
/usr/share/qt/mkspecs/features/include_source_dir.prf:
/usr/lib/libQtGui.prl:
/usr/lib/libQtCore.prl:
qmake:  FORCE
@$(QMAKE) -spec /usr/share/qt/mkspecs/linux-g++-64 -o Makefile ../untitled3/untitled3.pro

dist:
@$(CHK_DIR_EXISTS) ../untitled3/.tmp/untitled31.0.0 || $(MKDIR) ../untitled3/.tmp/untitled31.0.0
$(COPY_FILE) --parents $(SOURCES) $(DIST) ../untitled3/.tmp/untitled31.0.0/ && $(COPY_FILE) --parents ../untitled3/mainwindow.h ../untitled3/dialog.h ../untitled3/.tmp/untitled31.0.0/ && $(COPY_FILE) --parents ../untitled3/main.cpp ../untitled3/mainwindow.cpp ../untitled3/dialog.cpp ../untitled3/.tmp/untitled31.0.0/ && $(COPY_FILE) --parents ../untitled3/mainwindow.ui ../untitled3/dialog.ui ../untitled3/.tmp/untitled31.0.0/ && (cd `dirname ../untitled3/.tmp/untitled31.0.0` && $(TAR) untitled31.0.0.tar untitled31.0.0 && $(COMPRESS) untitled31.0.0.tar) && $(MOVE) `dirname ../untitled3/.tmp/untitled31.0.0`/untitled31.0.0.tar.gz . && $(DEL_FILE) -r ../untitled3/.tmp/untitled31.0.0


clean:compiler_clean
-$(DEL_FILE) $(OBJECTS)
-$(DEL_FILE) *~ core *.core


####### Sub-libraries

distclean: clean
-$(DEL_FILE) $(TARGET)
-$(DEL_FILE) Makefile


check: first

mocclean: compiler_moc_header_clean compiler_moc_source_clean

mocables: compiler_moc_header_make_all compiler_moc_source_make_all

compiler_moc_header_make_all: moc_mainwindow.cpp moc_dialog.cpp
compiler_moc_header_clean:
-$(DEL_FILE) moc_mainwindow.cpp moc_dialog.cpp
moc_mainwindow.cpp: ../untitled3/mainwindow.h
/usr/bin/moc $(DEFINES) $(INCPATH) ../untitled3/mainwindow.h -o moc_mainwindow.cpp

moc_dialog.cpp: ../untitled3/dialog.h
/usr/bin/moc $(DEFINES) $(INCPATH) ../untitled3/dialog.h -o moc_dialog.cpp

compiler_rcc_make_all:
compiler_rcc_clean:
compiler_image_collection_make_all: qmake_image_collection.cpp
compiler_image_collection_clean:
-$(DEL_FILE) qmake_image_collection.cpp
compiler_moc_source_make_all:
compiler_moc_source_clean:
compiler_uic_make_all: ui_mainwindow.h ui_dialog.h
compiler_uic_clean:
-$(DEL_FILE) ui_mainwindow.h ui_dialog.h
ui_mainwindow.h: ../untitled3/mainwindow.ui
/usr/bin/uic ../untitled3/mainwindow.ui -o ui_mainwindow.h

ui_dialog.h: ../untitled3/dialog.ui
/usr/bin/uic ../untitled3/dialog.ui -o ui_dialog.h

compiler_yacc_decl_make_all:
compiler_yacc_decl_clean:
compiler_yacc_impl_make_all:
compiler_yacc_impl_clean:
compiler_lex_make_all:
compiler_lex_clean:
compiler_clean: compiler_moc_header_clean compiler_uic_clean

####### Compile

main.o: ../untitled3/main.cpp ../untitled3/mainwindow.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o ../untitled3/main.cpp

mainwindow.o: ../untitled3/mainwindow.cpp ../untitled3/mainwindow.h \
ui_mainwindow.h \
../untitled3/dialog.h \
ui_dialog.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindow.o ../untitled3/mainwindow.cpp

dialog.o: ../untitled3/dialog.cpp ../untitled3/dialog.h \
ui_dialog.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o dialog.o ../untitled3/dialog.cpp

moc_mainwindow.o: moc_mainwindow.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindow.o moc_mainwindow.cpp

moc_dialog.o: moc_dialog.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_dialog.o moc_dialog.cpp

####### Install

install:   FORCE

uninstall:   FORCE

FORCE:



La salida despues del make

Running build steps for project untitled3...
Starting: "/usr/bin/make" clean -w
make: se ingresa al directorio `/home/open/prj/qt/untitled3-build-desktop'
rm -f moc_mainwindow.cpp moc_dialog.cpp
rm -f ui_mainwindow.h ui_dialog.h
rm -f main.o mainwindow.o dialog.o moc_mainwindow.o moc_dialog.o
rm -f *~ core *.core
make: se sale del directorio `/home/open/prj/qt/untitled3-build-desktop'
The process "/usr/bin/make" exited normally.
Configuration unchanged, skipping qmake step.
Starting: "/usr/bin/make" -w
make: se ingresa al directorio `/home/open/prj/qt/untitled3-build-desktop'
/usr/bin/uic ../untitled3/mainwindow.ui -o ui_mainwindow.h
/usr/bin/uic ../untitled3/dialog.ui -o ui_dialog.h
g++ -c -m64 -pipe -march=x86-64 -mtune=generic -O2 -pipe -fno-strict-aliasing -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt/mkspecs/linux-g++-64 -I../untitled3 -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I. -I../untitled3 -I. -I/usr/include/libgdata -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -o main.o ../untitled3/main.cpp
g++ -c -m64 -pipe -march=x86-64 -mtune=generic -O2 -pipe -fno-strict-aliasing -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt/mkspecs/linux-g++-64 -I../untitled3 -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I. -I../untitled3 -I. -I/usr/include/libgdata -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -o mainwindow.o ../untitled3/mainwindow.cpp
In file included from /usr/include/glib-2.0/gio/gio.h:54:0,
                from /usr/include/libsoup-2.4/libsoup/soup-types.h:9,
                from /usr/include/libsoup-2.4/libsoup/soup-portability.h:9,
                from /usr/include/libsoup-2.4/libsoup/soup-address.h:11,
                from /usr/include/libsoup-2.4/libsoup/soup.h:13,
                from /usr/include/libgdata/gdata/gdata-service.h:25,
                from /usr/include/libgdata/gdata/gdata.h:26,
                from /usr/include/oPen.h:1324,
                from ../untitled3/include/sms.h:1,
                from ../untitled3/mainwindow.cpp:7:
/usr/include/glib-2.0/gio/gdbusintrospection.h:151:25: error: expected unqualified-id before 'protected'
/usr/include/glib-2.0/gio/gdbusintrospection.h:151:24: error: se esperaba ';' al final de la declaración miembro
/usr/include/glib-2.0/gio/gdbusintrospection.h:151:32: error: expected ':' before ';' token
In file included from ../untitled3/mainwindow.cpp:7:0:
../untitled3/include/sms.h: En la función 'int smsOperador(char*, char*, char*)':
../untitled3/include/sms.h:60:32: aviso: la operación sobre 'prms.oPen::sCURL::maxCOOK' puede estar indefinida [-Wsequence-point]
../untitled3/include/sms.h:65:101: aviso: conversión obsoleta de una constante de cadena a 'char*' [-Wwrite-strings]
../untitled3/include/sms.h:85:102: aviso: conversión obsoleta de una constante de cadena a 'char*' [-Wwrite-strings]
../untitled3/include/sms.h:87:1: aviso: el control alcanza el final de una función que no es void [-Wreturn-type]
make: *** [mainwindow.o] Error 1
make: se sale del directorio `/home/open/prj/qt/untitled3-build-desktop'
The process "/usr/bin/make" exited with code 2.
Error while building project untitled3 (target: Desktop)
When executing build step 'Make'



Alguien tiene alguna idea de que pueda estar pasando.?
Siempre habra 2 verdades, la que quieres creer y la que no aceptaras

oPen syLar

#1
AutoRespuesta.. =)


La solucion es simple... "UNDEFinir" la constante "signals" donde se haga la inclusión de las libs de libgdata

#include <iostream>
#include <string.h>
#include <mysql/mysql.h>
#include <netdb.h>
#include <malloc.h>
#include <libgdata/gdata/gdata.h>
#include <libgdata/gdata/services/youtube/gdata-youtube-video.h>

#ifdef signals
   #undef signals
#endif


Saludos...
Siempre habra 2 verdades, la que quieres creer y la que no aceptaras