does not work.. :s
So... I tryed a couple of things after
first, just seeting LDFLAGS -= m64, LDFLAGS += m32 on .pro didn did ANYTHING! then changing it by hand on the make file i got
emartini@emartini1984:~/Documents/Projects/QTPomodoro$ make
g++ -m32 -Wl,-rpath,/home/emartini/qtsdk-2010.01/qt/lib -o Pomodoro main.o mainwindow.o countdown.o moc_mainwindow.o moc_countdown.o -L/home/emartini/qtsdk-2010.01/qt/lib -lQtGui -L/home/emartini/qtsdk-2010.01/qt/lib -L/usr/X11R6/lib64 -lQtCore -lpthread
/usr/bin/ld: skipping incompatible /home/emartini/qtsdk-2010.01/qt/lib/libQtGui.so when searching for -lQtGui
/usr/bin/ld: skipping incompatible /home/emartini/qtsdk-2010.01/qt/lib/libQtGui.so when searching for -lQtGui
/usr/bin/ld: skipping incompatible /home/emartini/qtsdk-2010.01/qt/lib/libQtCore.so when searching for -lQtCore
/usr/bin/ld: skipping incompatible /home/emartini/qtsdk-2010.01/qt/lib/libQtCore.so when searching for -lQtCore
emartini@emartini1984:~/Documents/Projects/QTPomodoro$ ./Pomodoro
Segmentation fault
emartini@emartini1984:~/Documents/Projects/QTPomodoro$
emartini@emartini1984:~/Documents/Projects/QTPomodoro$ make
g++ -m32 -Wl,-rpath,/home/emartini/qtsdk-2010.01/qt/lib -o Pomodoro main.o mainwindow.o countdown.o moc_mainwindow.o moc_countdown.o -L/home/emartini/qtsdk-2010.01/qt/lib -lQtGui -L/home/emartini/qtsdk-2010.01/qt/lib -L/usr/X11R6/lib64 -lQtCore -lpthread
/usr/bin/ld: skipping incompatible /home/emartini/qtsdk-2010.01/qt/lib/libQtGui.so when searching for -lQtGui
/usr/bin/ld: skipping incompatible /home/emartini/qtsdk-2010.01/qt/lib/libQtGui.so when searching for -lQtGui
/usr/bin/ld: skipping incompatible /home/emartini/qtsdk-2010.01/qt/lib/libQtCore.so when searching for -lQtCore
/usr/bin/ld: skipping incompatible /home/emartini/qtsdk-2010.01/qt/lib/libQtCore.so when searching for -lQtCore
emartini@emartini1984:~/Documents/Projects/QTPomodoro$ ./Pomodoro
Segmentation fault
emartini@emartini1984:~/Documents/Projects/QTPomodoro$
To copy to clipboard, switch view to plain text mode
meaning, it compiles but not run (on any machine, neither 32 or 64)
then I went bananas and changed all 64's on Makefile to 32's (only 64 left is " INSTALL_FILE = install -m 644 -p", dont think it is related at all right?)
then I get :
emartini@emartini1984:~/Documents/Projects/QTPomodoro$ make
/home/emartini/qtsdk-2010.01/qt/bin/uic mainwindow.ui -o ui_mainwindow.h
g++ -c -pipe -m32 -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../qtsdk-2010.01/qt/mkspecs/linux-g++-32 -I. -I../../../../qtsdk-2010.01/qt/include/QtCore -I../../../../qtsdk-2010.01/qt/include/QtGui -I../../../../qtsdk-2010.01/qt/include -I. -I. -o main.o main.cpp
g++ -c -pipe -m32 -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../qtsdk-2010.01/qt/mkspecs/linux-g++-32 -I. -I../../../../qtsdk-2010.01/qt/include/QtCore -I../../../../qtsdk-2010.01/qt/include/QtGui -I../../../../qtsdk-2010.01/qt/include -I. -I. -o mainwindow.o mainwindow.cpp
mainwindow.cpp:35: warning: unused parameter ‘iconSize’
g++ -c -pipe -m32 -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../qtsdk-2010.01/qt/mkspecs/linux-g++-32 -I. -I../../../../qtsdk-2010.01/qt/include/QtCore -I../../../../qtsdk-2010.01/qt/include/QtGui -I../../../../qtsdk-2010.01/qt/include -I. -I. -o countdown.o countdown.cpp
/home/emartini/qtsdk-2010.01/qt/bin/moc -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../qtsdk-2010.01/qt/mkspecs/linux-g++-32 -I. -I../../../../qtsdk-2010.01/qt/include/QtCore -I../../../../qtsdk-2010.01/qt/include/QtGui -I../../../../qtsdk-2010.01/qt/include -I. -I. mainwindow.h -o moc_mainwindow.cpp
g++ -c -pipe -m32 -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../qtsdk-2010.01/qt/mkspecs/linux-g++-32 -I. -I../../../../qtsdk-2010.01/qt/include/QtCore -I../../../../qtsdk-2010.01/qt/include/QtGui -I../../../../qtsdk-2010.01/qt/include -I. -I. -o moc_mainwindow.o moc_mainwindow.cpp
/home/emartini/qtsdk-2010.01/qt/bin/moc -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../qtsdk-2010.01/qt/mkspecs/linux-g++-32 -I. -I../../../../qtsdk-2010.01/qt/include/QtCore -I../../../../qtsdk-2010.01/qt/include/QtGui -I../../../../qtsdk-2010.01/qt/include -I. -I. countdown.h -o moc_countdown.cpp
g++ -c -pipe -m32 -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../qtsdk-2010.01/qt/mkspecs/linux-g++-32 -I. -I../../../../qtsdk-2010.01/qt/include/QtCore -I../../../../qtsdk-2010.01/qt/include/QtGui -I../../../../qtsdk-2010.01/qt/include -I. -I. -o moc_countdown.o moc_countdown.cpp
g++ -m32 -Wl,-rpath,/home/emartini/qtsdk-2010.01/qt/lib -o Pomodoro main.o mainwindow.o countdown.o moc_mainwindow.o moc_countdown.o -L/home/emartini/qtsdk-2010.01/qt/lib -lQtGui -L/home/emartini/qtsdk-2010.01/qt/lib -L/usr/X11R6/lib32 -lQtCore -lpthread
/usr/bin/ld: skipping incompatible /home/emartini/qtsdk-2010.01/qt/lib/libQtGui.so when searching for -lQtGui
/usr/bin/ld: skipping incompatible /home/emartini/qtsdk-2010.01/qt/lib/libQtGui.so when searching for -lQtGui
/usr/bin/ld: skipping incompatible /home/emartini/qtsdk-2010.01/qt/lib/libQtCore.so when searching for -lQtCore
/usr/bin/ld: skipping incompatible /home/emartini/qtsdk-2010.01/qt/lib/libQtCore.so when searching for -lQtCore
emartini@emartini1984:~/Documents/Projects/QTPomodoro$ ./Pomodoro
Segmentation fault
emartini@emartini1984:~/Documents/Projects/QTPomodoro$
emartini@emartini1984:~/Documents/Projects/QTPomodoro$ make
/home/emartini/qtsdk-2010.01/qt/bin/uic mainwindow.ui -o ui_mainwindow.h
g++ -c -pipe -m32 -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../qtsdk-2010.01/qt/mkspecs/linux-g++-32 -I. -I../../../../qtsdk-2010.01/qt/include/QtCore -I../../../../qtsdk-2010.01/qt/include/QtGui -I../../../../qtsdk-2010.01/qt/include -I. -I. -o main.o main.cpp
g++ -c -pipe -m32 -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../qtsdk-2010.01/qt/mkspecs/linux-g++-32 -I. -I../../../../qtsdk-2010.01/qt/include/QtCore -I../../../../qtsdk-2010.01/qt/include/QtGui -I../../../../qtsdk-2010.01/qt/include -I. -I. -o mainwindow.o mainwindow.cpp
mainwindow.cpp:35: warning: unused parameter ‘iconSize’
g++ -c -pipe -m32 -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../qtsdk-2010.01/qt/mkspecs/linux-g++-32 -I. -I../../../../qtsdk-2010.01/qt/include/QtCore -I../../../../qtsdk-2010.01/qt/include/QtGui -I../../../../qtsdk-2010.01/qt/include -I. -I. -o countdown.o countdown.cpp
/home/emartini/qtsdk-2010.01/qt/bin/moc -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../qtsdk-2010.01/qt/mkspecs/linux-g++-32 -I. -I../../../../qtsdk-2010.01/qt/include/QtCore -I../../../../qtsdk-2010.01/qt/include/QtGui -I../../../../qtsdk-2010.01/qt/include -I. -I. mainwindow.h -o moc_mainwindow.cpp
g++ -c -pipe -m32 -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../qtsdk-2010.01/qt/mkspecs/linux-g++-32 -I. -I../../../../qtsdk-2010.01/qt/include/QtCore -I../../../../qtsdk-2010.01/qt/include/QtGui -I../../../../qtsdk-2010.01/qt/include -I. -I. -o moc_mainwindow.o moc_mainwindow.cpp
/home/emartini/qtsdk-2010.01/qt/bin/moc -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../qtsdk-2010.01/qt/mkspecs/linux-g++-32 -I. -I../../../../qtsdk-2010.01/qt/include/QtCore -I../../../../qtsdk-2010.01/qt/include/QtGui -I../../../../qtsdk-2010.01/qt/include -I. -I. countdown.h -o moc_countdown.cpp
g++ -c -pipe -m32 -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../qtsdk-2010.01/qt/mkspecs/linux-g++-32 -I. -I../../../../qtsdk-2010.01/qt/include/QtCore -I../../../../qtsdk-2010.01/qt/include/QtGui -I../../../../qtsdk-2010.01/qt/include -I. -I. -o moc_countdown.o moc_countdown.cpp
g++ -m32 -Wl,-rpath,/home/emartini/qtsdk-2010.01/qt/lib -o Pomodoro main.o mainwindow.o countdown.o moc_mainwindow.o moc_countdown.o -L/home/emartini/qtsdk-2010.01/qt/lib -lQtGui -L/home/emartini/qtsdk-2010.01/qt/lib -L/usr/X11R6/lib32 -lQtCore -lpthread
/usr/bin/ld: skipping incompatible /home/emartini/qtsdk-2010.01/qt/lib/libQtGui.so when searching for -lQtGui
/usr/bin/ld: skipping incompatible /home/emartini/qtsdk-2010.01/qt/lib/libQtGui.so when searching for -lQtGui
/usr/bin/ld: skipping incompatible /home/emartini/qtsdk-2010.01/qt/lib/libQtCore.so when searching for -lQtCore
/usr/bin/ld: skipping incompatible /home/emartini/qtsdk-2010.01/qt/lib/libQtCore.so when searching for -lQtCore
emartini@emartini1984:~/Documents/Projects/QTPomodoro$ ./Pomodoro
Segmentation fault
emartini@emartini1984:~/Documents/Projects/QTPomodoro$
To copy to clipboard, switch view to plain text mode
Then I added -L/usr/lib32 to LIBS (directly on Makefile also), I get the same as before, but without the "skipping incompatible " lines , but same Segmentation fault...
Then i changed strategy, instead of QtCreator getting my make file, I did my "own" , used "qmake -o Makefile Pomodoro.pro", and it came out really different (what surprised me!)
my make file now gets like that
CC = gcc
CXX = g++
DEFINES = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
CFLAGS = -pipe -m32 -O2 -Wall -W -D_REENTRANT $(DEFINES)
CXXFLAGS = -pipe -m32 -O2 -Wall -W -D_REENTRANT $(DEFINES)
INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I.
LINK = g++
LFLAGS = -Wl,-O1
LIBS = $(SUBLIBS) -L/usr/lib32 -lQtGui -lQtCore -lpthread
AR = ar cqs
RANLIB =
QMAKE = /usr/bin/qmake
TAR = tar -cf
COMPRESS = gzip -9f
COPY = cp -f
SED = sed
CC = gcc
CXX = g++
DEFINES = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
CFLAGS = -pipe -m32 -O2 -Wall -W -D_REENTRANT $(DEFINES)
CXXFLAGS = -pipe -m32 -O2 -Wall -W -D_REENTRANT $(DEFINES)
INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I.
LINK = g++
LFLAGS = -Wl,-O1
LIBS = $(SUBLIBS) -L/usr/lib32 -lQtGui -lQtCore -lpthread
AR = ar cqs
RANLIB =
QMAKE = /usr/bin/qmake
TAR = tar -cf
COMPRESS = gzip -9f
COPY = cp -f
SED = sed
To copy to clipboard, switch view to plain text mode
then I get, after make
/usr/bin/uic-qt4 mainwindow.ui -o ui_mainwindow.h
g++ -c -pipe -m32 -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/u
sr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o main.o main.cpp
g++ -c -pipe -m32 -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/u
sr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o mainwindow.o mainwindow.cpp
g++ -c -pipe -m32 -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/u
sr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o countdown.o countdown.cpp
/usr/bin/moc-qt4 -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/us
r/include/qt4/QtGui -I/usr/include/qt4 -I. -I. mainwindow.h -o moc_mainwindow.cpp
g++ -c -pipe -m32 -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/u
sr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o moc_mainwindow.o moc_mainwindow.cpp
/usr/bin/moc-qt4 -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/us
r/include/qt4/QtGui -I/usr/include/qt4 -I. -I. countdown.h -o moc_countdown.cpp
g++ -c -pipe -m32 -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/u
sr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o moc_countdown.o moc_countdown.cpp
g++ -Wl,-O1 -o Pomodoro main.o mainwindow.o countdown.o moc_mainwindow.o moc_countdown.o -L/usr/lib32 -lQtGui -lQtCore -lpthread
bla bla bla bla bla (a lot of the errors that are to come...
countdown.cpp:(.text+0xc7c): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)'
countdown.o: In function `countDown::~countDown()':
countdown.cpp:(.text+0xe5c): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)'
countdown.o:countdown.cpp:(.text+0x103c): more undefined references to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)' follow
moc_mainwindow.
o:(.
rodata._ZTV10MainWindow
[vtable
for MainWindow
]+0xf4
): undefined reference to `non
-virtual thunk to
QWidget::devType() const'moc_mainwindow.o:(.rodata._ZTV10MainWindow[vtable for MainWindow]+0xf8): undefined reference to `non-virtual thunk to QWidget::paintEngine() const'
moc_mainwindow.
o:(.
rodata._ZTV10MainWindow
[vtable
for MainWindow
]+0xfc
): undefined reference to `non
-virtual thunk to
QWidget::metric(QPaintDevice::PaintDeviceMetric) const'/usr/bin/ld: final link failed: Invalid operation
collect2: ld returned 1 exit status
make: *** [Pomodoro] Error 1
/usr/bin/uic-qt4 mainwindow.ui -o ui_mainwindow.h
g++ -c -pipe -m32 -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/u
sr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o main.o main.cpp
g++ -c -pipe -m32 -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/u
sr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o mainwindow.o mainwindow.cpp
g++ -c -pipe -m32 -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/u
sr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o countdown.o countdown.cpp
/usr/bin/moc-qt4 -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/us
r/include/qt4/QtGui -I/usr/include/qt4 -I. -I. mainwindow.h -o moc_mainwindow.cpp
g++ -c -pipe -m32 -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/u
sr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o moc_mainwindow.o moc_mainwindow.cpp
/usr/bin/moc-qt4 -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/us
r/include/qt4/QtGui -I/usr/include/qt4 -I. -I. countdown.h -o moc_countdown.cpp
g++ -c -pipe -m32 -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/u
sr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o moc_countdown.o moc_countdown.cpp
g++ -Wl,-O1 -o Pomodoro main.o mainwindow.o countdown.o moc_mainwindow.o moc_countdown.o -L/usr/lib32 -lQtGui -lQtCore -lpthread
bla bla bla bla bla (a lot of the errors that are to come...
countdown.cpp:(.text+0xc7c): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)'
countdown.o: In function `countDown::~countDown()':
countdown.cpp:(.text+0xe5c): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)'
countdown.o:countdown.cpp:(.text+0x103c): more undefined references to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)' follow
moc_mainwindow.o:(.rodata._ZTV10MainWindow[vtable for MainWindow]+0xf4): undefined reference to `non-virtual thunk to QWidget::devType() const'
moc_mainwindow.o:(.rodata._ZTV10MainWindow[vtable for MainWindow]+0xf8): undefined reference to `non-virtual thunk to QWidget::paintEngine() const'
moc_mainwindow.o:(.rodata._ZTV10MainWindow[vtable for MainWindow]+0xfc): undefined reference to `non-virtual thunk to QWidget::metric(QPaintDevice::PaintDeviceMetric) const'
/usr/bin/ld: final link failed: Invalid operation
collect2: ld returned 1 exit status
make: *** [Pomodoro] Error 1
To copy to clipboard, switch view to plain text mode
this approach seemed more promissing to me (I am beggining to get suspicious with QtCreator compilation )
but I could not figure this link failure, googling some people have this problem if they had .o files from different architecture, like if they generate them in a 64 and then try to link on a 32... but here this doesn't apply (I guess...)
Well, if anyone gets a clue what is the problem here I would really appreciate!
and sorry for the flooding!
Bookmarks