Active Topics

 


Reply
Thread Tools
omeriko9's Avatar
Posts: 385 | Thanked: 344 times | Joined on Jan 2010 @ Israel
#1
I'm trying to compile with madde a control panel plugin in c.

In the wiki it says:

MADDE works well for GTK+ development (in C). At minimum the lines 'pkg-config --cflags gtk+-2.0' (for source to object file compiling) and 'pkg-config --libs gtk+-2.0' (for linking) is needed in your Makefile
.
.
.
How about Hildon development (in C)?

Like the above; just replace 'gtk+-2.0' with 'hildon-1 libosso'
Well, where in the makefile I should put these lines??...

And another question - does the current madde version (for win) uses PR1.2 libraries? (Meaning: using libglib-2.0.so.1 instead of libglib-2.0.so.0)

Last edited by omeriko9; 2010-06-01 at 19:25.
 
Posts: 190 | Thanked: 129 times | Joined on Mar 2010 @ Bavaria, Germany
#2
If you're using qmake, add the following the the .pro file:
Code:
CONFIG += link_pkgconfig
PKGCONFIG += gtk+-2.0
If you're using plain Makefiles, someone with knowledge of that should answer

Edit: Yes, all MADDE versions above 0.6.14 support PR 1.2.

Edit #2: When using QtCreator, please also take a look at this bug report: http://bugreports.qt.nokia.com/brows...s:all-tabpanel

Last edited by gri; 2010-06-01 at 19:30.
 

The Following User Says Thank You to gri For This Useful Post:
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#3
In an "ordinary" Makefile, the following is common
Code:
CFLAGS += `pkg-config --cflags gtk+-2.0`
LDFLAGS += `pkg-config --libs gtk+-2.0`
Please note that backtick is used to make the shell expand the call to pkg-config.

Last edited by Joorin; 2010-06-01 at 19:44. Reason: Typo
 

The Following User Says Thank You to Joorin For This Useful Post:
omeriko9's Avatar
Posts: 385 | Thanked: 344 times | Joined on Jan 2010 @ Israel
#4
Originally Posted by Joorin View Post
Please note that backtick is used to make the shell expand the call to pkg-config.
I know this is how it works in linux, but I'm running madde from windows - will the backtick have the same results?
 
omeriko9's Avatar
Posts: 385 | Thanked: 344 times | Joined on Jan 2010 @ Israel
#5
Definately I miss something. These are the qmake results:

C:/MADDE/0.6.72/sysroots/fremantle-arm-sysroot-10.2010.19-1-slim/usr/lib/crt1.o:
In function `_start':
init.c.text+0x30): undefined reference to `main'
build/libcallnotify.o: In function `execute':
libcallnotify.c.text+0x28): undefined reference to `gtk_window_get_type'
libcallnotify.c.text+0x3c): undefined reference to `g_type_check_instance_cast
'
libcallnotify.c.text+0x70): undefined reference to `gtk_dialog_new_with_button
s'
libcallnotify.c.text+0x7c): undefined reference to `hildon_check_button_new'
libcallnotify.c.text+0x84): undefined reference to `gtk_button_get_type'
libcallnotify.c.text+0x94): undefined reference to `g_type_check_instance_cast
'
libcallnotify.c.text+0x9c): undefined reference to `gtk_button_set_label'
libcallnotify.c.text+0xa4): undefined reference to `hildon_check_button_new'
libcallnotify.c.text+0xb0): undefined reference to `g_type_check_instance_cast
'
libcallnotify.c.text+0xb8): undefined reference to `gtk_button_set_label'
libcallnotify.c.text+0xc0): undefined reference to `hildon_check_button_new'
libcallnotify.c.text+0xcc): undefined reference to `g_type_check_instance_cast
'
libcallnotify.c.text+0xd4): undefined reference to `gtk_button_set_label'
libcallnotify.c.text+0xdc): undefined reference to `gtk_label_new'
libcallnotify.c.text+0xf8): undefined reference to `gtk_hscale_new_with_range'

libcallnotify.c.text+0x1b0): undefined reference to `g_strtod'
libcallnotify.c.text+0x1bc): undefined reference to `gtk_range_get_type'
libcallnotify.c.text+0x1c8): undefined reference to `g_type_check_instance_cas
t'
libcallnotify.c.text+0x1cc): undefined reference to `gtk_range_get_adjustment'

libcallnotify.c.text+0x1dc): undefined reference to `gtk_adjustment_set_value'

libcallnotify.c.text+0x1e8): undefined reference to `gtk_dialog_get_type'
libcallnotify.c.text+0x1f8): undefined reference to `g_type_check_instance_cas
t'
libcallnotify.c.text+0x200): undefined reference to `gtk_container_get_type'
libcallnotify.c.text+0x210): undefined reference to `g_type_check_instance_cas
t'
libcallnotify.c.text+0x218): undefined reference to `gtk_container_add'
libcallnotify.c.text+0x224): undefined reference to `g_type_check_instance_cas
t'
libcallnotify.c.text+0x230): undefined reference to `g_type_check_instance_cas
t'
libcallnotify.c.text+0x238): undefined reference to `gtk_container_add'
libcallnotify.c.text+0x244): undefined reference to `g_type_check_instance_cas
t'
libcallnotify.c.text+0x250): undefined reference to `g_type_check_instance_cas
t'
libcallnotify.c.text+0x258): undefined reference to `gtk_container_add'
libcallnotify.c.text+0x264): undefined reference to `g_type_check_instance_cas
t'
libcallnotify.c.text+0x270): undefined reference to `g_type_check_instance_cas
t'
libcallnotify.c.text+0x278): undefined reference to `gtk_container_add'
libcallnotify.c.text+0x284): undefined reference to `g_type_check_instance_cas
t'
libcallnotify.c.text+0x290): undefined reference to `g_type_check_instance_cas
t'
libcallnotify.c.text+0x298): undefined reference to `gtk_container_add'
libcallnotify.c.text+0x2a0): undefined reference to `gtk_widget_show_all'
libcallnotify.c.text+0x2ac): undefined reference to `g_type_check_instance_cas
t'
libcallnotify.c.text+0x2b0): undefined reference to `gtk_dialog_run'
libcallnotify.c.text+0x2bc): undefined reference to `gtk_widget_get_type'
libcallnotify.c.text+0x2c8): undefined reference to `g_type_check_instance_cas
t'
libcallnotify.c.text+0x2cc): undefined reference to `gtk_widget_destroy'
libcallnotify.c.text+0x2f4): undefined reference to `g_type_check_instance_cas
t'
libcallnotify.c.text+0x2f8): undefined reference to `hildon_check_button_get_a
ctive'
libcallnotify.c.text+0x310): undefined reference to `g_type_check_instance_cas
t'
libcallnotify.c.text+0x314): undefined reference to `hildon_check_button_get_a
ctive'
libcallnotify.c.text+0x32c): undefined reference to `g_type_check_instance_cas
t'
libcallnotify.c.text+0x330): undefined reference to `hildon_check_button_get_a
ctive'
libcallnotify.c.text+0x344): undefined reference to `gtk_adjustment_get_value'

libcallnotify.c.text+0x378): undefined reference to `g_type_check_instance_cas
t'
libcallnotify.c.text+0x380): undefined reference to `hildon_check_button_set_a
ctive'
libcallnotify.c.text+0x390): undefined reference to `g_type_check_instance_cas
t'
libcallnotify.c.text+0x398): undefined reference to `hildon_check_button_set_a
ctive'
libcallnotify.c.text+0x3a8): undefined reference to `g_type_check_instance_cas
t'
libcallnotify.c.text+0x3b0): undefined reference to `hildon_check_button_set_a
ctive'
collect2: ld returned 1 exit status
make: *** [build/helloworld] Error 1
indeed...
 
Posts: 190 | Thanked: 129 times | Joined on Mar 2010 @ Bavaria, Germany
#6
Did you also add "PKGCONFIG += hildon-1" or whatever the commandline in the Makefile would be as you said in your first post?
Do you have a main function? (the first error)
What is your "TEMPLATE" when using qmake? lib, app?
Do you compile using QtCreator or the MADDE commandline? (Very important!)

You can also take a look at this example project of the bug report:
http://bugreports.qt.nokia.com/secur...estproject.zip
 

The Following User Says Thank You to gri For This Useful Post:
omeriko9's Avatar
Posts: 385 | Thanked: 344 times | Joined on Jan 2010 @ Israel
#7
Originally Posted by gri View Post
Did you also add "PKGCONFIG += hildon-1" or whatever the commandline in the Makefile would be as you said in your first post?
Do you have a main function? (the first error)
What is your "TEMPLATE" when using qmake? lib, app?
Do you compile using QtCreator or the MADDE commandline? (Very important!)

You can also take a look at this example project of the bug report:
http://bugreports.qt.nokia.com/secur...estproject.zip
Thanks!!!

I used the "lib" template and it worked!
I'm not using QtCreator but copied a .c file from esbox in scratchbox because I can't compile there against PR1.2 libraries (esbox won't update for some reason...).
 
Venemo's Avatar
Posts: 1,296 | Thanked: 1,773 times | Joined on Aug 2009 @ Budapest, Hungary
#8
It was not working for me, either.

For me, adding the directories of the required libraries to my project file's include paths and then adding the libraries to the LIBS made it work with Qt Creator.

This is how I did it: here is my example project file
 
Posts: 190 | Thanked: 129 times | Joined on Mar 2010 @ Bavaria, Germany
#9
Originally Posted by Venemo View Post
It was not working for me, either.

For me, adding the directories of the required libraries to my project file's include paths and then adding the libraries to the LIBS made it work with Qt Creator.

This is how I did it: here is my example project file
Should be working in the QtCreator snapshot of tomorrow (or one day more).

Take a look at the bug report I mentioned in my first post:
http://bugreports.qt.nokia.com/brows...s:all-tabpanel

It has been fixed today:
Code:
Karsten Heimrich added a comment - 01/Jun/10 05:48 PM
Hi, I've fixed the problem in Creator trunk, still it does not work properly on windows because of a bug in MADDE. To make it work, just edit in your MADDE install dir (Path/To/Madde/madbin\pkg-config.cmd), replace the line with @env.exe PERL5LIB=/madlib/perl5 pkg-config %*
 

The Following 2 Users Say Thank You to gri For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 10:13.