×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Registered User
    Join Date
    Mar 2010
    Posts
    49

    QtCreator: Building symbian DLL

    I am going to develop a DLL (Qt for Symbian) using QtCreator. I'm following instructions given in:
    http://developer.symbian.org/wiki/in...Qt_for_Symbian

    As already mentioned in the source freezing the DLL API is not possible directly via QtCreator. Is there currently any fix related to this feature?

    If not, is anyone able to provide short instructions how to compile the DLL?

  2. #2
    Registered User
    Join Date
    May 2009
    Location
    Greece
    Posts
    191

    Re: QtCreator: Building symbian DLL

    Why not using Carbide C++ instead for Qt Creator?
    At least that's what i did to create a DLL and Carbide has the option to freeze the project.

    If you need instuctions on that I would be glad to provide them for you.

  3. #3
    Registered User
    Join Date
    Jun 2010
    Location
    bangalore
    Posts
    23

    Re: QtCreator: Building symbian DLL

    while creating the project select the option which states " create for symbian device" and then build the project...it will show an error as no device connected... but the sis file which is needed for symbian devices to install will be generated....

  4. #4
    Registered User
    Join Date
    Mar 2010
    Posts
    49

    Re: QtCreator: Building symbian DLL

    Quote Originally Posted by favoritas37 View Post
    Why not using Carbide C++ instead for Qt Creator?
    At least that's what i did to create a DLL and Carbide has the option to freeze the project.

    If you need instuctions on that I would be glad to provide them for you.
    I'm using Qt Creator for multiple reasons (version control, I have been using it for all my Qt projects etc.). I think Nokia also recommends it as a Qt development IDE?

    Currently it looks like that freezing is not possible via Qt Creator. I tried to freeze the project via command line but got some errors (ran abld freeze as mentioned in my original source). I think I have like 3 options:

    1. Somehow run abld freeze via Qt Creator (not possible?)
    2. Compile / freeze project completely via command line (how?)
    3. Move to Carbide when compiling the project (last change)

    Quote Originally Posted by sathyanarayanan.se View Post
    while creating the project select the option which states " create for symbian device" and then build the project...it will show an error as no device connected... but the sis file which is needed for symbian devices to install will be generated....
    I did't really understand how does this help with freezing the API? Maybe wrong thread?

  5. #5
    Registered User
    Join Date
    May 2009
    Location
    Greece
    Posts
    191

    Re: QtCreator: Building symbian DLL

    1. If freezing is successful through command line then you could easily add this command as a Build Step to the Qt Creator. Go "Projects->Build Settings" and add the command to the "Build Steps" after "qmake" and before "Make". I think this might work.

  6. #6
    Registered User
    Join Date
    Mar 2010
    Posts
    49

    Re: QtCreator: Building symbian DLL

    So nobody is developing Qt for Symbian DLLs using Qt Creator?

    I'll answer to my question. I'm currently freezing the API using the Qt for Prompt and running "abld freeze". However, it would be nice to have this feature built in Qt Creator like it is in carbide.
    Last edited by Tuomo; 2010-07-21 at 09:12.

  7. #7
    Registered User
    Join Date
    Sep 2010
    Posts
    22

    Re: QtCreator: Building symbian DLL

    I can build the .SIS file that (theoretically) contains my DLL. I need help placing the library and its header files where QtCreator can find them when I build an application that uses the library. It shouldn't be that hard. There aren't any comprehensive instructions that I can find. I'll be grateful if someone would write them for me on drool proof paper.

  8. #8
    Registered User
    Join Date
    Sep 2010
    Posts
    22

    Re: QtCreator: Building symbian DLL

    A little over a year after Tuomo's first post, the link is broken but there are instructions for building DLLs at http://www.developer.nokia.com/Commu...Qt_for_Symbian. I'm followed them up to the invocation of abld freeze. There is no abld as far as I can tell.

    There used to be no way to freeze libraries using qmake/make on symbian. This has been fixed and now one can freeze a library with make freeze-release-gcce.
    Last edited by talmage; 2011-08-23 at 22:21. Reason: Changed "last post" to "first post". Was confused by reverse chronological order.

  9. #9
    Registered User
    Join Date
    May 2009
    Location
    Greece
    Posts
    191

    Re: QtCreator: Building symbian DLL

    Have you successfully freezed the project with make freeze-release-gcce?

    If not, take a look at this wiki article. It describes how you can invocate the abld freeze. Normally it is not recognized because it needs first some Environment variables to be set. That is why the article says you must open the command line from: Start" -> "All programs" -> "Qt SDK" -> "Symbian^3 Qt 4.7.3" and open Qt 4.7.3 for Symbian^3 Command Prompt.

    Regarding how to use the generated library, before doing so you have to make sure you have placed the header files of the library (that will be needed by the dll) somewhere visible to the Qt Creator.
    My suggestion is: in the .pro file of your project create add all the headers that will be exposed by the dll to the PUBLIC_HEADERS tag. For instance:
    Code:
    PUBLIC_HEADERS += header1.h \
        header2.h \
        header3.h \
    Then in the symbian scope add the following lines:

    Code:
    deploy.path = $$EPOCROOT
    exportheaders.sources = $$PUBLIC_HEADERS
    exportheaders.path = epoc32/include
    
    for(header, exportheaders.sources):BLD_INF_RULES.prj_exports += "$$header $$deploy.path$$exportheaders.path/LibraryName/$$basename(header)"
    This code copies all the headers that will be needed to use the dll in the epoc32/include folder (which is visible) to the folder LibraryName.

    Also it is important to place the generated file .sis file somewhere that will be visible. In my case i placed it in the epoc32/InstallToDevice folder that i created.

    So in the client application for you add the following:
    Code:
    symbian {
        INCLUDEPATH += /epoc32/include/LibraryName
        LIBS += -lLibraryName
       
        customrules.pkg_prerules  = \
    	";LibraryName" \
            "@\"$$(EPOCROOT)Epoc32/InstallToDevice/LibraryName0.sis\",(0xA003328D)"\
    	" "	
    	
    	DEPLOYMENT += customrules
    }
    This code first makes visible the header files needed to the Qt Creator and then adds the library to the linker. The command customrules.pkg_prerules is used to embed the .sis file of the library to the .sis file of the project.

    NOTE: in this line: "@\"$$(EPOCROOT)Epoc32/InstallToDevice/LibraryName0.sis\",(0xA003328D)"\ is expected from you to use the UUID your library had at the time of it's compilation.

    Hope it's clear enough.

  10. #10
    Registered User
    Join Date
    Sep 2010
    Posts
    22

    Re: QtCreator: Building symbian DLL

    I'll answer my own question. QtCreator does the right thing if you let it. In the Projects pane you can identify the dependencies. I loaded my library project into QtCreator, then loaded my application project, selected the Projects pane and its dependencies page, then checked the box next to the name of my library project.

    Load time on the phone was the embarrassingly hard problem. You have to give the library at least the same capabilities as the application so that neither one leaks information the wrong way. Without that, you get KErrPermissionDenied (-46). Gdb showed me that. It was crazy hard finding an explanation. Searches here give too many answers.

  11. #11
    Registered User
    Join Date
    Sep 2010
    Posts
    22

    Re: QtCreator: Building symbian DLL

    Quote Originally Posted by favoritas37 View Post
    Have you successfully freezed the project with make freeze-release-gcce?

    If not, take a look at this wiki article. It describes how you can invocate the abld freeze. Normally it is not recognized because it needs first some Environment variables to be set. That is why the article says you must open the command line from: Start" -> "All programs" -> "Qt SDK" -> "Symbian^3 Qt 4.7.3" and open Qt 4.7.3 for Symbian^3 Command Prompt.
    Thanks! I'll look into your instructions for installing the headers and DLL in my development environment. It seems clear enough.

    Yes, make freeze-release-gcce appears to be working. With QtCreator, I do the make release-gcce first, then the freeze-release-gcce. This is a new feature of QtCreator, I think, but I don't know when it arrived. It's in 2.2.1.

    I'd found that Wiki article and followed it up to the abld freeze instruction. There is no abld on my system.

    I'm now able to compile both my DLL and my application, to install them both on my phone via WIFI using CODA, and to run the app on my phone.

    What I need is a good Symbian+Qt tutor for a couple of hours to guide me through common platform mistakes and pitfalls. I'm an experienced developer but a total noob with Symbian.

Similar Threads

  1. Where to find the dll once building is done?
    By anand_trex in forum Symbian
    Replies: 4
    Last Post: 2009-11-10, 14:30
  2. Building lib or building dll?
    By baumannpan in forum Symbian
    Replies: 1
    Last Post: 2007-04-03, 12:59
  3. Problem building a dll for target device
    By rushj in forum Symbian
    Replies: 1
    Last Post: 2005-08-09, 14:19

Posting Permissions

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