![]() |
undefined reference mafw_shared_init
Hello,
I tried to run the example with qt madde in windows with nokia n900. Example is here: http://wiki.maemo.org/Documentation/...browse_example Source browse example is the example i am trying to run and I get undefined reference mafw_shared_init error. I incuded mafw and mafw-shared libs but I still have this error. How do I fix this problem. Thank you for your help. |
Re: undefined reference mafw_shared_init
You included or you linked? How about some quotations of your .pro-file? Please provide some more information.
Edit: Oops, this is not a Qt project ... So you get the errors when running the application or when linking? What's the "ldd" output? |
Re: undefined reference mafw_shared_init
In my .pro file ther is only
LIBS += -lmafw -lmafw-shared that I added. Everything else was already there... |
Re: undefined reference mafw_shared_init
Could you please supply all the output from the compiling stage?
|
Re: undefined reference mafw_shared_init
Here is the compile output
Quote:
|
Re: undefined reference mafw_shared_init
One interesting thing I see directly is the following:
-L=/usr/sysroots/fremantle-arm-sysroot-2.2009-51-1-qt453/usr/lib This instructs the linker to look for dynamically linkable libraries in a path that differs greatly from the rest given as arguments to -L. Is the sysroot prefix properly defined? Have a look for where this value is added. Secondly, do a search in the system for a file matching "libmafw-shared*". This directory has to be added as an argument for an -L flag for this to work. My guess is that the special -L above is the cause for all this or that the directory is just missing in the list. Perhaps it's even a bug in MADDE... |
Re: undefined reference mafw_shared_init
I have everything linked correctly...
Could somebody try to build this example http://wiki.maemo.org/Documentation/...browse_example ? I tried this in windows qt madde developer and on linux and i cant get it to work. |
Re: undefined reference mafw_shared_init
Did you find the libmafw-shared.so.* file in your MADDE installation?
Per definition you have not everything linked correctly. As a side note, the example is C code and you compile it with g++. Perhaps not too important but it might cause you problems since the library you're linking against most likely was compiled from C code. |
Re: undefined reference mafw_shared_init
You should also not add the linker lines directly.
Please use in your .pro file: CONFIG += link_pkgconfig PKGCONFIG += mafw-shared Note for the Nokia Qt SDK: Using pkg-config works when compiling with the commandline. Don't use QtCreator (results in compiler errors). Bugfix for MADDE 0.6.14 (MADDE standalone): In "sysroots\fremantle-arm-sysroot-2.2009-51-1-qt453\usr\share\qt4\mkspecs\features\link_pkgconfi g.prf" you have to change the system() calls to run "mad pkg-config" instead of just "pkg-config" Edit: I have tested the example from your link an it works well for me: http://gri.not-censored.com/mafwtest.png You can download the example sources here. |
Re: undefined reference mafw_shared_init
thank you gri and Joorin. I compiled it and it works. How do I run it now when i compiled example in madde terminal?
|
All times are GMT. The time now is 12:09. |
vBulletin® Version 3.8.8