×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Jan 2011
    Posts
    192

    Question Resource problem

    Hi all,

    I am facing a problem when adding images to my resources file.
    my resource file is about 27.1 Kb, and everything is working fine.But when I add a new image to the resources, the following errors occurs :
    ":-1: error: Recipe linkandpostlink failed with exit code 1"
    ":-1: error: The make-engine exited with errors."

    Note that If I run the project on the simulator, it works.
    Any suggestion concerning this issue ?

    Best Regards,
    Lipos123

  2. #2
    Nokia Developer Expert
    Join Date
    Oct 2007
    Posts
    441

    Re: Resource problem

    Hi lipos123

    You might reached resource compiler limits. You can split your application resources into several parts and implement dynamic resource loading --- maybe such way you reach memory consumption optimization also

    To start , just split your application resource in two and check the build error is gone. If the build error persists thus something wrong with your resource file, my assumption about reaching resource compiler limits is incorrect and you have to fix the resource itself. Please let me know of the result

    Regards,
    izinin

  3. #3
    Registered User
    Join Date
    Jan 2011
    Posts
    192

    Re: Resource problem

    Quote Originally Posted by izinin View Post
    Hi lipos123

    You might reached resource compiler limits. You can split your application resources into several parts and implement dynamic resource loading --- maybe such way you reach memory consumption optimization also

    To start , just split your application resource in two and check the build error is gone. If the build error persists thus something wrong with your resource file, my assumption about reaching resource compiler limits is incorrect and you have to fix the resource itself. Please let me know of the result

    Regards,
    izinin
    Dear izinin,

    I have tried to add 2 and 3 resources (.qrc) to my application and split the images, but the error still appear when running the project on Symbian Device. So it's not a matter of resource capacity.
    Any idea ?

    Best Regards,
    Lipos123

  4. #4
    Nokia Developer Expert
    Join Date
    Oct 2007
    Posts
    441

    Re: Resource problem

    Hi Lipos123

    Just to be sure your project config is valid and the problem is in Qt build system, create with project creation master dummy "Hello World" project with your resources included. If the problem is gone, examine your project config against dummy, otherwise try to find problematic resource item that troubles your project by excluding one-by-one items from the resources.

    Except that i don't have any more ideas. Perhaps you will need to avoid resource use --- not big loss i think. What is the advantages in resource use --- is it just to see your project is nice structured?

    Regards,
    izinin

  5. #5
    Registered User
    Join Date
    Jan 2011
    Posts
    192

    Re: Resource problem

    Quote Originally Posted by izinin View Post
    Hi Lipos123

    Just to be sure your project config is valid and the problem is in Qt build system, create with project creation master dummy "Hello World" project with your resources included. If the problem is gone, examine your project config against dummy, otherwise try to find problematic resource item that troubles your project by excluding one-by-one items from the resources.

    Except that i don't have any more ideas. Perhaps you will need to avoid resource use --- not big loss i think. What is the advantages in resource use --- is it just to see your project is nice structured?

    Regards,
    izinin
    Hey izinin,

    I've tried the dummy text project and it works fine :S weird??? and what do you mean by checking the project config ? you mean ".pro" ????

    Best Regards,
    Lipos123

  6. #6
    Nokia Developer Expert
    Join Date
    Oct 2007
    Posts
    441

    Re: Resource problem

    Hi,

    yes , i meant comparing *.pro files in dummy project and yours -- i don't have any special ideas about it -- that is just generic advise. What about not using resources? is it possible for your application

  7. #7
    Registered User
    Join Date
    Jan 2011
    Posts
    192

    Re: Resource problem

    Hi,
    Yes it is possible, but i don't know how to use pictures from outside the resources.
    Can you advice me please.

    Best Regards,

  8. #8
    Registered User
    Join Date
    Oct 2010
    Posts
    256

    Re: Resource problem

    I had the same problem and solved it by using the method described on this page:

    http://www.developer.nokia.com/Commu...t_package_file

  9. #9
    Nokia Developer Expert
    Join Date
    Oct 2007
    Posts
    441

    Re: Resource problem

    Hi lipos123

    in addition to information about how to deploy images on device posted by jetrix74, here is a bit about how to find the resources in your application:
    here notready.png is stored in gfx_resources project directory and deployed on device into application private directory under qml/gfx subdirectory. The application private directory can be obtained by QApplication::applicationDirPath() call
    Code:
    the project structure :
    /
        gfx_resources/
                       notready.png
    
    project.pro:
            gfxres.source = gfx_resources            # by this rule, everything stored in gfx_resources project catalog will be deployed to target
            gfxres.target = qml/gfx
            DEPLOYMENTFOLDERS += gfxres
    
    module.cpp:
            #define QMLICONRESOURCE_NOTREADY "/qml/gfx/notready.png"
            QImage icon = new QImage(QApplication::applicationDirPath() + QMLICONRESOURCE_NOTREADY);
    you can check your deployment rules are correct if you examine *.pkg files generated by qmake command

    application project example you can check here MotoTrialRacer

  10. #10
    Registered User
    Join Date
    Jan 2011
    Posts
    192

    Re: Resource problem

    Hi,
    I will use this solution in order to load my images.
    Thanks a lot for your support

Similar Threads

  1. problem with svg resource
    By IT_Man in forum Symbian C++
    Replies: 2
    Last Post: 2010-08-13, 11:01
  2. Resource problem
    By max_gudluck in forum Symbian C++
    Replies: 9
    Last Post: 2009-01-08, 03:13
  3. problem in using dialog resource
    By ayman09 in forum Symbian C++
    Replies: 2
    Last Post: 2008-05-18, 12:05
  4. Problem with resource
    By Mich2424 in forum Symbian C++
    Replies: 8
    Last Post: 2006-02-08, 00:53
  5. mapping of AVKON Resource enumation -> class name -> resource name
    By tdonau in forum Symbian User Interface
    Replies: 1
    Last Post: 2005-09-08, 18:24

Posting Permissions

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