maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Technology Preview: MADDE (https://talk.maemo.org/showthread.php?t=38075)

calvin_42 2010-02-19 01:46

Re: Technology Preview: MADDE
 
Nope that's correct.

Can't help you on this one. Sorry :(

pta0007 2010-02-19 02:14

Re: Technology Preview: MADDE
 
thx anyway. I just want to write a program using the n900 camera to capture picture. any idea for this? best to have a solution on Windows, or I have to use Ubuntu Maemo5 SDK...

nochnoy 2010-02-19 06:06

Re: Technology Preview: MADDE
 
I installed madde on windows 7. If the directory with project sources is not under /home/<username> qmake generates absolute paths for include dirs, like this:

-Id:/prog/MADDE/0.6.14/sysroots/fremantle-arm-sysroot-2.2009-51-1-qt453/usr/include/qt4/QtCore

then g++ doesn't find the header files:

error: QApplication: No such file or directory

If the source is under /home/username/somename qmake generates relative paths for include dirs:

-I../../../sysroots/fremantle-arm-sysroot-2.2009-51-1-qt453/usr/include/qt4/QtCore

and everything compiles fine.

How does qmake decide whether to generate relative or absolute paths? I guess if it had QT_INSTALL_HEADERS builtin set to
/d/prog/MADDE/0.6.14/sysroots/fremantle-arm-sysroot-2.2009-51-1-qt453/usr/include/qt4
instead of
d:/prog/MADDE/0.6.14/sysroots/fremantle-arm-sysroot-2.2009-51-1-qt453/usr/include/qt4
everything would work regardless of where the sources are located.

Does anyone have any suggestions how to solve this problem?

too 2010-02-19 07:46

Re: Technology Preview: MADDE
 
nochnoy:

Absolute paths should work. We'll investigate the issue.

calvin_42 2010-02-19 08:17

Re: Technology Preview: MADDE
 
Till then, a temporary solution would to create a symbolic link using the mklink command on Windows :

/home/username/project <--> D:\Work\dev\maemo\project

Open dos command :

- goto the home repertory where you install MADDE
- run the mklink command, it will create a new directory for you linking to your target (eq ls -s on Unix)
- you can now put your files in your target rep

Ex :

Code:

cd C:\Logiciels\MADDE\0.6.14\home\Calvin
mklink /J project D:\Work\dev\maemo\project


too 2010-02-19 08:26

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by pta0007 (Post 535064)
I got some problems when trying to use GTK+ in Qt/MADDE. First, I created the project with Qt Creator, where Gtk+ is used. In order to inform qmake the project is using GTK..., I added
unix {
CONFIG += link_pkgconfig
PKGCONFIG += gtk+-2.0 hildon-1 gstreamer-0.10
}
to the .pro file.
Then I tried to build the project with MADDE, using mad qmake. I got
'pkg-config' is not recognized as an internal or external command,
operable program or batch file.

I have asked the question at Nokia forum, but it seems I still can't get the solution. Any one help?

Cheers.

I think I know what is the problem (making solution may take some time)

In windows, most of the madde commands are run inside MSYS environment, but for tools not compiled for MSYS the environment is lost. qmake is such a tool.

MADDE pkg-config is perl program; outside MSYS the system does not regognize it as such (and if did, would not have the expected environment set up).

The solution is to make wrappers for commands that should
be accessible outside MSYS. Currently we have 2 of these:
mad.cmd and mad-admin.cmd.

FIrst try could be as follows:

Copy MADDE/0.6.14/wbin/mad.cmd as MADDE/0.6.14/madbin/pkg-config.cmd and edit it to run pkg-config perl program in MSYS environment. I'll try this.

For more robust and efficient implementations (or ideas of those)
are gladly accepted :)

EDIT: pta0007: you could try editing MADDE\0.6.14\sysroots\fremantle-arm-sysroot-2.2009-51-1-qt453\usr\share\qt4\mkspecs/features/link_pkgconfig.prf and add 'mad' in front of 'pkg-config' command and see what happens. Naturally, this voids your warranty as we do not like hassling inside sysroot ;(

rontti 2010-02-19 12:46

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by pta0007 (Post 535692)
Here is my .pro file
Code:

TARGET = MadCamera
TEMPLATE = app
SOURCES += main.cpp \
    mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
unix {
    CONFIG += link_pkgconfig
    PKGCONFIG += gtk+-2.0 hildon-1 gstreamer-0.10
}


Another workaround. Change you .pro file like this

Code:

TARGET = MadCamera
TEMPLATE = app
SOURCES += main.cpp \
    mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
unix {
QMAKE_CXXFLAGS += $$system(mad pkg-config --cflags gtk+-2.0 hildon-1 gstreamer-0.10)
QMAKE_CFLAGS  += $$system(mad pkg-config --cflags gtk+-2.0 hildon-1 gstreamer-0.10)
LIBS  += $$system(mad pkg-config --libs gtk+-2.0 hildon-1 gstreamer-0.10)
}


nochnoy 2010-02-19 16:57

Re: Technology Preview: MADDE
 
Thanks. mklink helps. Just a note, replacing d:/prog with /d/prog in qmake generated makefile doesn't solve the problem, so it wouldn't help if QT_INSTALL_HEADERS builtin were set to /d/prog/MADDE/0.6.14/sysroots/... as I thought it might help. Absolute paths are problematic for gcc/g++ either way

too 2010-02-19 19:26

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by nochnoy (Post 536022)
I installed madde on windows 7. If the directory with project sources is not under /home/<username> qmake generates absolute paths for include dirs, like this:

-Id:/prog/MADDE/0.6.14/sysroots/fremantle-arm-sysroot-2.2009-51-1-qt453/usr/include/qt4/QtCore

then g++ doesn't find the header files:

error: QApplication: No such file or directory

Verified. This needs to be fixed soon (by me). Thanks.

too 2010-02-19 19:29

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by nochnoy (Post 536857)
Thanks. mklink helps. Just a note, replacing d:/prog with /d/prog in qmake generated makefile doesn't solve the problem, so it wouldn't help if QT_INSTALL_HEADERS builtin were set to /d/prog/MADDE/0.6.14/sysroots/... as I thought it might help. Absolute paths are problematic for gcc/g++ either way

D:Prog/MADDE/... might work... ;)

(i.e. without the first slash) (some chars capitalized to avoid smiley conversion)


All times are GMT. The time now is 11:43.

vBulletin® Version 3.8.8