| Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 2 | |
I have a project that I created under Windows that I want to migrate to
Fedora 8. I tried "importing" the project but two things are failing:
1) qmake insists on using uic.exe in the Makefiles on Linux (should be
uic with no extent)
Excerpt from the Makefile.Release:
---------------------------
ui_muslib.h: muslib.ui
/usr/local/Trolltech/Qt-4.3.4/bin/uic.exe muslib.ui -o ui_muslib.h
---------------------------
2) make cannot find the libtag.so library (the entry in the .pro file
has beed checked about 10 times)
---------------------------
The .pro file:
TEMPLATE = app
TARGET = MusLib
DEPENDPATH += .
INCLUDEPATH += . \
/usr/include/taglib
# Input
QT += core \
gui \
xml
HEADERS += cell.h \
id3tageditor.h \
QId3.h \
settingsdlg.h \
muslib.h \
/usr/include/taglib/tstring.h \
/usr/include/taglib/tag.h
SOURCES += cell.cpp \
id3tageditor.cpp \
QId3.cpp \
settingsdlg.cpp \
main.cpp \
muslib.cpp
FORMS += id3tageditor.ui \
settingsdlg.ui \
muslib.ui
RESOURCES += MusLib.qrc
LIBS += -L"/usr/lib" \
-llibtag
RC_FILE = icon.rc
---------------------------
I have verified that /usr/lib/libtag.so exists.
I am using a fresh compile of Qt-4.3.4 and the eclipse plugin. What am I
missing here? Is there any documentation on cross platform importing?
--
[ signature omitted ]
David A. Fuess wrote: > 1) qmake insists on using uic.exe in the Makefiles on Linux (should be > uic with no extent) Not sure about this one - that shouldn't be an effect of your .pro, that should be in the mkspec file for your platform. Are you sure that the QMAKESPEC env variable is set correctly (probably to "linux-g++"?) > 2) make cannot find the libtag.so library (the entry in the .pro file > has beed checked about 10 times) You want -ltag there, not -llibtag, just like GCC :) -- [ signature omitted ]
Thanks for the quick reply. I set the library using the gcc convention and rebuilt the program from the command line. That seemed to work. However, when I rebuild in eclipse I get make /usr/local/Trolltech/Qt-4.3.4/bin/qmake -unix CONFIG+=debug_and_release -o Makefile MusLib.pro make -f Makefile.Release make[1]: Entering directory `/home/dave/MusLib' /usr/local/Trolltech/Qt-4.3.4/bin/moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I"/usr/local/Trolltech/Qt-4.3.4/include/QtCore" -I"/usr/local/Trolltech/Qt-4.3.4/include/QtCore" -I"/usr/local/Trolltech/Qt-4.3.4/include/QtGui" -I"/usr/local/Trolltech/Qt-4.3.4/include/QtGui" -I"/usr/local/Trolltech/Qt-4.3.4/include/QtXml" -I"/usr/local/Trolltech/Qt-4.3.4/include/QtXml" -I"/usr/local/Trolltech/Qt-4.3.4/include" -I"." -I"/usr/include/taglib" -I"release" -I"." -I"/usr/local/Trolltech/Qt-4.3.4/mkspecs/win32-g++" -D__GNUC__ -DWIN32 id3tageditor.h -o release/moc_id3tageditor.cpp /bin/sh: /usr/local/Trolltech/Qt-4.3.4/bin/moc.exe: No such file or directory make[1]: *** [release/moc_id3tageditor.cpp] Error 127 make: *** [release] Error 2 make[1]: Leaving directory `/home/dave/MusLib' Gordon Schumacher wrote: > David A. Fuess wrote: >> 1) qmake insists on using uic.exe in the Makefiles on Linux (should >> be uic with no extent) > Not sure about this one - that shouldn't be an effect of your .pro, that > should be in the mkspec file for your platform. Are you sure that the > QMAKESPEC env variable is set correctly (probably to "linux-g++"?) >> 2) make cannot find the libtag.so library (the entry in the .pro file >> has beed checked about 10 times) > You want -ltag there, not -llibtag, just like GCC :) > > -- > To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with > "unsubscribe" in the subject or the body. > List archive and information: http://lists.trolltech.com/qt-interest/ > > > -- [ signature omitted ]
On Monday 10 March 2008, David A. Fuess wrote: > make > /usr/local/Trolltech/Qt-4.3.4/bin/qmake -unix > CONFIG+=debug_and_release I don't think this is possible. You have to chose either debug or release. > -o Makefile MusLib.pro Good. > make -f Makefile.Release Why are you calling Makefile.Release? The unix version does not generate this file, this is part of the Windows version. Try to delete all make files (rm [mM]akefile*) and then regenerate them from a shell: /usr/local/Trolltech/Qt-4.3.4/bin/qmake After that a simple "make" should work without problems. Konrad
Attachment:
Attachment:
pgpg5KxMPiDcH.pgp
Attachment:
Attachment:
pgpnIEuon1pjd.pgp
Attachment:
signature.asc
Attachment:
signature.asc
Description: PGP signature
Message 5 in thread
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
The make sequence is the one that Eclipse/Qt generated in response to a
"Project/Build All" I did not create these files or sequences. I did in
fact do exactly as you suggested, I deleted all of the Makefiles and
ran "qmake MusLib.pro" to regenerate them. Qmake generated Makefile,
Makefile.Release, and Makefile.Debug with .exe references in them! And
that is the essence of my question here. How can I import a project I
originated on Windows without dragging all of the Windows environment
junk with it? could it be the Eclipse/Qt integration?<br>
<br>
Konrad Rosenbaum wrote:
<blockquote cite="mid:200803101852.06142@xxxxxxxxxxxxxxxxxxxxxxx"
type="cite">
<pre wrap="">On Monday 10 March 2008, David A. Fuess wrote:
</pre>
<blockquote type="cite">
<pre wrap="">make
/usr/local/Trolltech/Qt-4.3.4/bin/qmake -unix
CONFIG+=debug_and_release
</pre>
</blockquote>
<pre wrap=""><!---->
I don't think this is possible. You have to chose either debug or release.
</pre>
<blockquote type="cite">
<pre wrap="">-o Makefile MusLib.pro
</pre>
</blockquote>
<pre wrap=""><!---->
Good.
</pre>
<blockquote type="cite">
<pre wrap="">make -f Makefile.Release
</pre>
</blockquote>
<pre wrap=""><!---->
Why are you calling Makefile.Release? The unix version does not generate
this file, this is part of the Windows version.
Try to delete all make files (rm [mM]akefile*) and then regenerate them from
a shell:
/usr/local/Trolltech/Qt-4.3.4/bin/qmake
After that a simple "make" should work without problems.
Konrad
</pre>
</blockquote>
<br>
</body>
</html>
--
[ signature omitted ]
Message 6 in thread
Hi,
first off, could you please NOT send HTML-only mails?
On Monday 10 March 2008, David A. Fuess wrote:
> The make sequence is the one that Eclipse/Qt generated in response to a
> "Project/Build All" I did not create these files or sequences. I did in
> fact do exactly as you suggested, I deleted all of the Makefiles and ran
> "qmake MusLib.pro" to regenerate them. Qmake generated Makefile,
> Makefile.Release, and Makefile.Debug with .exe references in them! And
> that is the essence of my question here. How can I import a project I
> originated on Windows without dragging all of the Windows environment
> junk with it? could it be the Eclipse/Qt integration?
It could be the integration, it could be you call the wrong qmake(1), it
could be a shell variable(2), you might have the MKSPEC set inside your
project file(3), the default mkspec might be set incorrectly.
(1) did you call qmake with full path? What does "which qmake" tell you?
-> it should point to the qmake of the installation that you are using
(2) What does "set | grep -i mkspec" say?
-> there should not be anything
(3) inside your source directory: grep -i mkspec $(find . -type f)
-> there should also not be anything
(4) ls -l /usr/local/Trolltech/Qt*/mkspecs/default
-> it should point to linux-g++ (or *-32 or *-64, depending on your exact
platform)
Of course I presume you installed the X11 version of Qt and you are not
attempting to cross compile for Windows.
Konrad
Description: PGP signature
Message 7 in thread
Konrad Rosenbaum wrote:
> Hi,
>
> first off, could you please NOT send HTML-only mails?
>
Sorry, didn't realize that was was an issue.
However, the main issue was resolved, thank you for your reply (in fact
I had already done everything you suggested so they were obviously great
suggestions) please see my previous post on this topic for the resolution.
--
[ signature omitted ]
Message 8 in thread
On 10.03.08 18:52:01, Konrad Rosenbaum wrote:
> On Monday 10 March 2008, David A. Fuess wrote:
> > make
> > /usr/local/Trolltech/Qt-4.3.4/bin/qmake -unix
> > CONFIG+=debug_and_release
>
> I don't think this is possible. You have to chose either debug or release.
It is, QMake 2.0 supports the debug_and_release config.
> > make -f Makefile.Release
>
> Why are you calling Makefile.Release? The unix version does not generate
> this file, this is part of the Windows version.
Thats correct if he uses debug_and_release as QMake generates
Makefile.Debug and Makefile.Release in that case (and a Makefile that
just calls those other two).
The real problem is that for some reason the generated makefiles use the
win32-g++ mkspec.
Andreas
--
[ signature omitted ]
Message 9 in thread
Andreas Pakulat wrote:
>> I don't think this is possible. You have to chose either debug or
>> release.
>
>It is, QMake 2.0 supports the debug_and_release config.
debug_and_release support for Unix (except MacOS X) was removed in Qt
4.2.0 because of soname issues.
--
[ signature omitted ]
Description: This is a digitally signed message part.
Message 10 in thread
On 10.03.08 21:10:47, Thiago Macieira wrote:
> Andreas Pakulat wrote:
> >> I don't think this is possible. You have to chose either debug or
> >> release.
> >
> >It is, QMake 2.0 supports the debug_and_release config.
>
> debug_and_release support for Unix (except MacOS X) was removed in Qt
> 4.2.0 because of soname issues.
Then I'd like to know why qmake doesn't print a warning or some such?
And why I get this when running qmake on the below .pro file:
andreas@morpheus:~/temp/testqmdbg>ls -l *Makefile*
-rw-r--r-- 1 andreas andreas 4817 10. Mär 23:46 Makefile
-rw-r--r-- 1 andreas andreas 4450 10. Mär 23:46 Makefile.Debug
-rw-r--r-- 1 andreas andreas 4498 10. Mär 23:46 Makefile.Release
andreas@morpheus:~/temp/testqmdbg>grep CXXFLAG Makefile*
Makefile.Debug:CXXFLAGS = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)
Makefile.Debug: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
Makefile.Debug: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
Makefile.Debug: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
Makefile.Debug: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
Makefile.Debug: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/main.o main.cpp
Makefile.Release:CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
Makefile.Release: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
Makefile.Release: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
Makefile.Release: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
Makefile.Release: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
Makefile.Release: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/main.o main.cpp
The .pro file is:
andreas@morpheus:~/temp/testqmdbg>cat *pro
######################################################################
# Automatically generated by qmake (2.01a) Mo Mrz 10 23:44:35 2008
######################################################################
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
CONFIG += debug_and_release
# Input
SOURCES += main.cpp
There's only one problem: Both makefiles produce the same binary, so
depending on their calling order in the Makefile you'll get either a
debug or release version.
Andreas
--
[ signature omitted ]
Message 11 in thread
Andreas Pakulat wrote:
>There's only one problem: Both makefiles produce the same binary, so
>depending on their calling order in the Makefile you'll get either a
>debug or release version.
That's why we disabled it for Qt. But, if you want to continue using it,
all you have to do is set two different targets, depending on which of
the two you are.
Remember: two different lib targets on Unix have different sonames. So
they are not exchangeable with each other.
--
[ signature omitted ]
Description: This is a digitally signed message part.
Message 12 in thread
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
I think I stumbled onto the answer to the second question. Right click
on the project in Eclipse and choose properties, then under "C/C++ Make
project" choose the Environment tab. QMAKESPEC is one of the variables,
it was set to win32-g++ I changed it to linux-g++. Then after a few
finagles to force the system to rebuild all of the Makefiles I was able
to get a successful compile. As usual, the solution is simple when you
know where to look ;)<br>
<br>
Thanks for the help.<br>
<br>
Thiago Macieira wrote:
<blockquote cite="mid:200803110053.20137.thiago.macieira@xxxxxxxxxxxxx"
type="cite">
<pre wrap="">Andreas Pakulat wrote:
</pre>
<blockquote type="cite">
<pre wrap="">There's only one problem: Both makefiles produce the same binary, so
depending on their calling order in the Makefile you'll get either a
debug or release version.
</pre>
</blockquote>
<pre wrap=""><!---->
That's why we disabled it for Qt. But, if you want to continue using it,
all you have to do is set two different targets, depending on which of
the two you are.
Remember: two different lib targets on Unix have different sonames. So
they are not exchangeable with each other.
</pre>
</blockquote>
<br>
</body>
</html>
--
[ signature omitted ]
Message 13 in thread
On 11.03.08 00:53:19, Thiago Macieira wrote:
> Andreas Pakulat wrote:
> >There's only one problem: Both makefiles produce the same binary, so
> >depending on their calling order in the Makefile you'll get either a
> >debug or release version.
>
> That's why we disabled it for Qt.
So debug_and_release isn't supported for building Qt, but still well
supported for building your own QMake project. At least thats how I see
the public documentation, its still advertised, though with a kind
warning about possible side-effects.
Andreas
--
[ signature omitted ]
Message 14 in thread
Andreas Pakulat wrote:
> So debug_and_release isn't supported for building Qt, but still well
> supported for building your own QMake project. At least thats how I see
> the public documentation, its still advertised, though with a kind
> warning about possible side-effects.
>
Indeed, we use it all of the time on both Win32, Qt/X11 and Qtopia-Core
with something like the attached .pro file. We found it necessary to add
in the build_pass{} scope to stop qmake creating the build directories
at the wrong level. It is also necessary to add the build_all option to
ensure that both the debug and release versions get built when you issue
a make.
We tend to setup a template .pro file for a project like the attached
and then use it quite happily qith bith kdevelop and Visual Studio 2005.
We had to bodge an install script for Win32 though since it doesn't
understand make install from Visual Studio.
Sean
HEADERS += abstractfitter2d.h \
abstractfunction.h \
circlefitter.h \
circlefunction.h \
constrainedcirclefitter.h \
domutility.h \
functor.h \
gaussjordan.h \
libmapsutilities.h \
linearlsfitter.h \
listutility.h \
mapsutilities.h \
mathutility.h \
matrix.h \
matrix2x2.h \
quaternion.h \
vector2.h \
vector3.h \
nonlinearlsfitter.h \
abstractlsfitter.h \
flexiblelsfitter.h
SOURCES += abstractfitter2d.cpp \
abstractfunction.cpp \
circlefitter.cpp \
circlefunction.cpp \
constrainedcirclefitter.cpp \
domutility.cpp \
listutility.cpp \
mathutility.cpp
CONFIG += debug_and_release \
warn_on \
qt \
dll \
build_all
VER_MAJ = 1
VER_MIN = 0
VER_PAT = 0
VERSION = $$sprintf( %1.%2.%3, $$VER_MAJ, $$VER_MIN, $$VER_PAT)
TEMPLATE = lib
QT += xml
DEFINES += MAPSUTILITIESDLL MAPSUTILITIESDLL_EXPORTS
TARGET = mapsutilities
UI_DIR = ../../build/ui
MOC_DIR = ../../build/moc
OBJECTS_DIR = ../../build/obj
#INCLUDEPATH +=
build_pass {
DESTDIR = ../../build/bin
CONFIG(debug, debug|release){
MOC_DIR = ../../build/moc/Debug
OBJECTS_DIR = ../../build/obj/Debug
TARGET = $$join(TARGET,,,d)
}
CONFIG(release, debug|release){
MOC_DIR = ../../build/moc/Release
OBJECTS_DIR = ../../build/obj/Release
}
win32 : QMAKE_POST_LINK = install.bat $$VER_MAJ
}
# install
target.path = $$(ESRDEVDIR)/lib
headers.path = $$sprintf( $$(ESRDEVDIR)/include/mapsutilities%1, $$VER_MAJ )
headers.files = abstractfitter2d.h \
abstractfunction.h \
circlefitter.h \
circlefunction.h \
constrainedcirclefitter.h \
domutility.h \
functor.h \
gaussjordan.h \
libmapsutilities.h \
linearlsfitter.h \
listutility.h \
mapsutilities.h \
mathutility.h \
matrix.h \
matrix2x2.h \
quaternion.h \
vector2.h \
vector3.h
unix {
INSTALLS += target headers
}
win32 {
# This is really a specifically msvc2005 option
QMAKE_POST_LINK = install.bat $$target.path $(TargetName) $$headers.path $$headers.files
}
Message 15 in thread
On 10.03.08 07:57:49, David A. Fuess wrote:
> Thanks for the quick reply. I set the library using the gcc convention
> and rebuilt the program from the command line. That seemed to work.
> However, when I rebuild in eclipse I get
>
> make
> /usr/local/Trolltech/Qt-4.3.4/bin/qmake -unix CONFIG+=debug_and_release
> -o Makefile MusLib.pro
> make -f Makefile.Release
> make[1]: Entering directory `/home/dave/MusLib'
> /usr/local/Trolltech/Qt-4.3.4/bin/moc.exe -DUNICODE
This looks totally wrong. I guess there's a setting somewhere in the
Eclipse/Qt support to set the QMAKESPEC variable and that seems to be
set to win32-g++ as can be seen here:
> -I"release" -I"." -I"/usr/local/Trolltech/Qt-4.3.4/mkspecs/win32-g++"
So I suggest to add something like
message("QMAKESPEC var (qmake): $${QMAKESPEC}")
message("QMAKESPEC var (qmake): $$(QMAKESPEC)")
to your MusLib.pro and see what it prints. If it doesn't print linux-g++
you need to find out where the variable can be changed (sorry I don't
know the eclipse integration).
Andreas
--
[ signature omitted ]