×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Registered User
    Join Date
    Dec 2008
    Location
    Kazakhstan, Almaty
    Posts
    8

    MMP is derived. how to add library to the project?

    Hi!!!
    I have some problems with adding libraries to my project.
    I'm trying to add runtime.lib. But when i edit the MMP file in Carbide v2.0
    it says that mmp file derived and while building project, the file is rewritten and all changes lost.

    in QT properties i've disabled the (Run qmake when .pro file changes)
    but it changed nothing.

    i'm confused. is there any other way to add library?

  2. #2
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: MMP is derived. how to add library to the project?

    Hi,

    Yes, as it says you can't edit the MMP as it is generated, you need to make all changes to the project in the .pro file. At the moment the build re-runs qmake (and all the build steps) for Qt projects no matter what has or hasn't changed - hopefully the Carbide team will fix this in future but that isn't the real issue here.

    All you need to do is add:
    LIBS += -lruntime
    (for example) to your .pro file.

    Mark

  3. #3
    Registered User
    Join Date
    Dec 2008
    Location
    Kazakhstan, Almaty
    Posts
    8

    Thumbs up Re: MMP is derived. how to add library to the project?

    Thanks a lot for reply. It was really helpfull.

  4. #4
    Registered User
    Join Date
    Dec 2008
    Location
    Kazakhstan, Almaty
    Posts
    8

    Re: MMP is derived. how to add library to the project?

    BTW is there any manual showing how to configure .pro files. For example how to edit capabilities or exports. All the manuals here, shows how to do it in MMP files.

    .pro files editor in Carbide sux in my opinion. (for now)
    for dummies like me it's hard to figure out, how all this stuff works.

    Thanks again

  5. #5
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: MMP is derived. how to add library to the project?

    Hi,

    I completely agree the .pro file editor in Carbide.c++ is terrible at the moment. The Carbide team have inherited it and are going to work on it. In the mean time I'd recommend right clicking on the .pro file and choosing to open it with a text editor instead.

    The documentation you are looking for is here:
    http://library.forum.nokia.com/index...47A_cover.html
    Let me know if that URL doesn't work for you? It probably only goes to the Qt for S60 Developers Library. The actual page you want is under:
    Qt for S60 guide > Development process of Qt applications on S60 architecture > Symbian extensions to the project file

    Hope that helps,
    Mark

  6. #6
    Registered User
    Join Date
    Dec 2008
    Location
    Kazakhstan, Almaty
    Posts
    8

    Thumbs up Re: MMP is derived. how to add library to the project?

    yup.
    thanks a lot

  7. #7
    Registered User
    Join Date
    Jan 2004
    Posts
    44

    Re: MMP is derived. how to add library to the project?

    In your .pro-file, try:
    MMP_RULES += "LIBRARY LIBRARYNAME.lib"

  8. #8
    Registered User
    Join Date
    Jan 2009
    Posts
    2

    Re: MMP is derived. how to add library to the project?

    Funny enough, LIBS didn't work for me. But MMP_RULES did. It's important not to forget the quotation marks, though.

    Thanks mikaellaine. Made my day.

    Sebastian

  9. #9
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: MMP is derived. how to add library to the project?

    Odd, LIBS should work. MMP_RULES will always work because it just passes the quoted text straight through to the MMP file. It has the disadvantage of being platform specific, but most libraries are anyway.

  10. #10
    Registered User
    Join Date
    Jan 2010
    Posts
    24

    Re: MMP is derived. how to add library to the project?

    It is really very strange thing... I haven't find a single article which properly describe how to Link additional libraries...
    everywhere it is mentioned to edit MMP files only and that solution is totally not working

    and editin .pro file is not user friendly (if you double clicked on the file it will open in read only mode)

  11. #11
    Super Contributor
    Join Date
    Jul 2008
    Posts
    2,020

    Re: MMP is derived. how to add library to the project?

    Hi,
    edit the PRO file. E.g. like this:

    Code:
    TEMPLATE = app
    TARGET = QtBallZ
    QT += core \
        gui
    HEADERS += settingsform.h \
        engine/ApplicationPrefs.h \
        engine/fixedpoint.h \
        engine/BallZEngine.h \
        QtBallZ.h
    SOURCES += settingsform.cpp \
        engine/ApplicationPrefs.cpp \
        engine/BallZDrawStbar.cpp \
        engine/BallZDraw.cpp \
        engine/BallZMenu.cpp \
        engine/BallZState.cpp \
        engine/BallZPhys.cpp \
        engine/BallZLevels.cpp \
        engine/BallZGlobals.cpp \
        QtBallZ_reg.rss \
        main.cpp \
        QtBallZ.cpp
    FORMS += settingsform.ui \
        QtBallZ.ui
    RESOURCES += leveldata.qrc
    symbian:{ 
        TARGET.UID3 = 0x2002CAC7
        LIBS += -lcone -leikcore -lavkon
    }
    The lines above are the best I have to offer.If anyone of you is of more advanced knowledge, I ask for your patience and understanding! - unknown arab poet
    http://www.tamoggemon.com - Symbian blog - Windows Phone blog
    My other blogs:
    webOS blog iPhone blog BlackBerry blog Samsung bada blog Android blog

  12. #12
    Registered User
    Join Date
    Feb 2010
    Posts
    17

    Re: MMP is derived. how to add library to the project?

    Quote Originally Posted by mikaellaine View Post
    In your .pro-file, try:
    MMP_RULES += "LIBRARY LIBRARYNAME.lib"
    hello
    this work fine for me but only the name of the apllication is displayed on the emultor no message is send ,so i think i have to add the capability to it so how should i do that i am adding my mmp file along with it
    kindly reply me as soon as possible

    my mmp file looks like this kindly tell me

    TARGET RSendAs_SMS.exe
    TARGETTYPE EXE

    UID 0x100039CE 0xE26F5D92
    SECUREID 0xE26F5D92

    EPOCSTACKSIZE 0x14000
    EPOCHEAPSIZE 0x020000 0x800000

    SOURCEPATH .
    LANG SC
    START RESOURCE RSendAs_SMS.rss
    HEADER
    TARGETPATH /resource/apps
    END

    SOURCEPATH .
    START RESOURCE RSendAs_SMS_reg.rss
    TARGETPATH /private/10003a3f/import/apps
    END


    // Qt Macros
    MACRO UNICODE
    MACRO QT_KEYPAD_NAVIGATION
    MACRO QT_SOFTKEYS_ENABLED
    MACRO QT_GUI_LIB
    MACRO QT_CORE_LIB

    SYSTEMINCLUDE ../../../../Qt/4.6.0/include/QtCore
    SYSTEMINCLUDE ../../../../Qt/4.6.0/include/QtCore/tmp
    SYSTEMINCLUDE ../../../../Qt/4.6.0/include/QtGui
    SYSTEMINCLUDE ../../../../Qt/4.6.0/include/QtGui/tmp
    SYSTEMINCLUDE ../../../../Qt/4.6.0/include
    SYSTEMINCLUDE ../../../../Qt/4.6.0/include/tmp
    SYSTEMINCLUDE ../../../../Qt/4.6.0/mkspecs/common/symbian
    SYSTEMINCLUDE ../../../../Qt/4.6.0/mkspecs/common/symbian/tmp
    SYSTEMINCLUDE /epoc32/include
    SYSTEMINCLUDE .
    SYSTEMINCLUDE tmp
    SYSTEMINCLUDE /epoc32/include/stdapis
    SYSTEMINCLUDE /epoc32/include/stdapis/sys
    SYSTEMINCLUDE /epoc32/include/stdapis/stlport
    SYSTEMINCLUDE /epoc32/include/domain/middleware
    SYSTEMINCLUDE /epoc32/include/domain/middleware/loc

    SOURCEPATH .
    SOURCE main.cpp
    SOURCE RSendAs_SMS.cpp
    SOURCE moc_RSendAs_SMS.cpp


    LIBRARY libstdcpp.lib
    LIBRARY QtGui.lib
    LIBRARY QtCore.lib
    LIBRARY libc.lib
    LIBRARY libm.lib
    LIBRARY euser.lib
    LIBRARY libdl.lib
    STATICLIBRARY qtmain.lib

    CAPABILITY None

    OPTION CW -wchar_t on
    OPTION ARMCC --visibility_inlines_hidden --fpu softvfp

    VERSION 10.0

    PAGED

    OPTION_REPLACE ARMCC --export_all_vtbl // don't use --export_all_vtbl

    LIBRARY sendas2.lib




    thanks & regards
    pushpankar
    Last edited by PUSHPANKAR; 2010-03-08 at 11:53.

  13. #13
    Registered User
    Join Date
    Jan 2004
    Posts
    44

    Re: MMP is derived. how to add library to the project?

    PUSHPANKAR: You may find better answers for API-specific capability issues in "Development Platforms > General Symbian C++".

    To answer your question: Depending on the API you are using, you will be able to find which capabilities it needs from the SDK help.

    For example in the documentation for CTelephony, you will find a line like this on some functions:
    Capability: ReadDeviceData
    For this to work then, you need to add the line

    CAPABILITY ReadDeviceData to your MMP file. If this is a Qt-project, then the tricks in this thread can help you do that.

  14. #14
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: MMP is derived. how to add library to the project?

    I've worked out how to do libs to a degree. I'm doing staticlibs, but I think most of this stuff applies to DLLs as well.

    For creating a lib, use "TEMPLATE = lib", and if you want a staticlib add "CONFIG += staticlib". (I have seen some folks quote "TEMPLATE = dll" for DLLs. Never tried it, but that's not what I've read you're supposed to do.)

    To use a lib, you have different syntax depending on whether you're compiling to Windows or hardware/emulator. I use the following scheme:

    win32:LIBS += C:/QtProjects/ProjectA/debug/libProjectA.a \
    C:/QtProjects/ProjectB/debug/libProjectB.a
    !win32:LIBS += -lProjectA.lib \
    -lProjectB.lib

    If you're linking to DLLs you leave off the ".lib" in the LIBS statement. (I don't know what you do on the Windoze side.) If (&deity save you!) you have blanks in your Windoze path names, enclose them in quotes.

    The documentation is scarce at best. And it doesn't help that the links "into" the documentation more often than not take you to the index page -- apparently some quirk between browsers and the server.

  15. #15
    Registered User
    Join Date
    Feb 2010
    Posts
    17

    Smile Re: MMP is derived. how to add library to the project?

    Quote Originally Posted by mikaellaine View Post
    In your .pro-file, try:
    MMP_RULES += "LIBRARY LIBRARYNAME.lib"
    well it works well with me
    and thanks for providing me this help

Similar Threads

  1. Problem in mmp
    By manish.garg in forum Symbian
    Replies: 16
    Last Post: 2008-11-13, 05:53
  2. "Run Last Launched" did not complete normally !!
    By mockba in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 7
    Last Post: 2008-06-15, 13:15
  3. How many library I have to add in MMP ?
    By sameer.chaudhari in forum Symbian
    Replies: 4
    Last Post: 2007-12-14, 05:14
  4. Error with makesis.exe and creating the .pkg file
    By gramya87 in forum Symbian Tools & SDKs
    Replies: 7
    Last Post: 2007-10-10, 13:53
  5. Add new build configurations to existing project for new SDKs in Carbide.c++. How?
    By dschwabe in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2006-11-09, 04:32

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×