[Clam-devel] Missing qformlayout.h when compiling NE

David García Garzón dgarcia at iua.upf.edu
Mon Aug 11 00:40:23 PDT 2008


On Dilluns 11 Agost 2008, Han, Yushen wrote:
> David,
>
> Thanks for your new commit.
> I decided to follow the way you recommended and just used macport to
> install qt4.4.
> I have all (unmodified) pc files in my opt/local/lib/pkgconfig after
> the "port install".
> Also I just checked out rev. 11930 for NE.

perfect.

> But I am not sure how I should apply your new commit
> ("I just commited a modification on the qt4.py file that should work
> with the original macport .pc files.").

My commit is not guaranted to work as i was unable to test it. We'll need some 
refining. Sure. But it is the way to go.

> Even though I set the QTDIR variable and had the .py files in the right
> place, I still ran into the problem of not using the macports pkgconfig
> files: The error messages in compilation were like: ( I had hundreds of
> missing-qt errors)
> src/main.cxx:22:30: error: QtGui/QApplication: No such file or directory
> src/main.cxx:23:30: error: QtCore/QTranslator: No such file or directory
> src/main.cxx:24:26: error: QtCore/QLocale: No such file or directory

Yes, it seems like there is an include path missing. Normally Qt adds two 
include paths for each module: the QtGui one and the upper so that this 
should work. Let's see what macports pkgconfig does.

> For your information,
> /opt/local/var/macports/software/qt4-mac/4.4.0_3+dbus+docs/opt/local/lib/pk
>gconfig/QtGui.pc and
> /opt/local/lib/pkgconfig/QtGui.pc
> have the same content( see p.s.), 

I guess analog content. Changing at least the module name and maybe some few 
options :-)

> which seems to be correct to me. 
> Apparently scons did not pass the right flag
> "-I/opt/local/include/qt4-mac" to g++.
> I think this is the only thing that prevents me from compiling.
> I will appreciate if you can explain a little bit more on your new commit.

Of course. I just changed the scons to use the same code for mac than we used 
for linux. What it does is to populate the compilation options with the ones 
provided by the pkg-config files for each qt modules we enable. Previous code 
added such options by hand and had two codes we switched on and off depending 
on whether they used frameworks or not. By relying on pkg-config, we don't 
care.


> p.s. the content of /opt/local/lib/pkgconfig/QtGui.pc
>
> prefix=/opt/local
> exec_prefix=${prefix}
> libdir=${prefix}/Library/Frameworks
> includedir=${prefix}/include/qt4-mac/QtGui
> qt_config=lex yacc warn_on uic resources sdk rez release ReleaseBuild
> Release build_pass qt warn_on release app_bundle i
> ncremental global_init_link_order lib_version_first plugin_no_soname
> link_prl exceptions no_mocdepend stl qt_framework b
> uild_all shared dll largefile stl mmx 3dnow sse sse2
> absolute_library_soname dylib create_prl link_prl depend_includepat
> h QTDIR_build release ReleaseBuild Release build_pass qt warn_on
> depend_includepath qmake_cache target_qt debug_and_rele
> ase hide_symbols lib_bundle qt_no_framework_direct_includes
> qt_framework explicitlib create_libtool create_pc explicitli
> b release ReleaseBuild Release build_pass objective_c no_autoqmake moc
> thread shared dll
> moc_location=${prefix}/var/macports/build/_opt_local_var_macports_sources_r
>sync.macports.org_release_ports_aqua_qt4-mac/
> work/qt-mac-opensource-src-4.4.0/bin/moc
> uic_location=${prefix}/var/macports/build/_opt_local_var_macports_sources_r
>sync.macports.org_release_ports_aqua_qt4-mac/
> work/qt-mac-opensource-src-4.4.0/bin/uic
>
> Name: Qtgui
> Description: Qtgui Library
> Version: 4.4.0
> Libs: -F${libdir} -framework QtGui  -L/opt/local/Library/Frameworks
> -L/opt/local/lib -F/opt/local/Library/Frameworks -fr
> amework Carbon -framework AppKit -lpng -framework QtCore
> -L/opt/local/Library/Frameworks -L/opt/local/lib -lz -lm -frame
> work ApplicationServices
> Cflags: -DQT_SHARED -I/opt/local/include/qt4-mac -I${includedir}

Note this very last line it includes /opt/local/include/qt4-mac and 
${includedir} which is defined above as ${prefix}/include/qt4-mac/QtGui being 
prefix /opt/local.

So both -I/opt/local/include/qt4-mac and -I/opt/local/include/qt4-mac/QtGui 
options should be included and that should work.

To assure this point, please compile the NetworkEditor (or the qt app you are 
trying to compile) with a 'verbose=1' flag. This will display the command 
line options used to compile each file. Paste one of those lines to the list.

Just in case check: In order to use the new qt4.py tool you need to do an 
scons install of the CLAM libraries.

For a later phase check also that QtOpenGL.pc includes options to link with 
OpenGl framework. If not we should add them in qt4.py


-- 
David García Garzón
(Work) dgarcia at iua dot upf anotherdot es
http://www.iua.upf.edu/~dgarcia
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.clam-project.org/pipermail/clam-devel-clam-project.org/attachments/20080811/426f5809/attachment-0003.pgp>


More information about the clam-devel mailing list