×

Discussion Board

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

    .mbm file points to the wrong images

    Hello all. This is my first post here, be gentle

    I'm developing an application for both the n97 and n95. I'm using preprocessor directives

    Code:
    #ifdef __S60_50__
    #elif __SERIES60_3X__
    #endif
    and different build configurations in order to have the same source code files work for both versions, emulator debug (WINSCW) for Nokia_N97_SDK_v1.0 and emulator debug (WINSCW) for [S60_3rd_MR].

    Most of the time this works perfectly but I reached a tight spot when it came to images. In my application.mmp file I'm building two separate mbm files:

    Code:
    #ifdef __S60_50__
    START BITMAP	Application.mbm
    	TARGETPATH	resource\apps
    	HEADER
    	SOURCEPATH	..\data\bitmaps
    
    	/* images */
    
    #elif __SERIES60_3X__
    
    START BITMAP	Application.mbm
    	TARGETPATH	resource\apps
    	HEADER
    	SOURCEPATH	..\data\bitmapsN95
    
    	/* images */
    #endif
    And to start developing the N95 application I simply duplicated the bitmaps folder and renamed it bitmapsN95. That worked fine, I could change/resize images with minimal impact to the code. My problem is I cannot add any more images to the N95 project! Here's what happens.

    The .mbm for n97 is described as such:
    Code:
    START BITMAP	Application.mbm
    	TARGETPATH	resource\apps
    	HEADER
    	SOURCEPATH	..\data\bitmaps
    	SOURCE c24 image_small_1.bmp
    	SOURCE c24 image_small_2.bmp
    
    	SOURCE c24 image_large_1.bmp
    	SOURCE c24 image_large_2.bmp
    	/* etc */
    If I add a third small image file and a third large image file for my n95 application, like this,

    Code:
    START BITMAP	Application.mbm
    	TARGETPATH	resource\apps
    	HEADER
    	SOURCEPATH	..\data\bitmapsN95
    	
    	SOURCE c24 image_small_1.bmp
    	SOURCE c24 image_small_2.bmp
    	SOURCE c24 image_small_3.bmp
    
    	SOURCE c24 image_large_1.bmp
    	SOURCE c24 image_large_2.bmp
    	SOURCE c24 image_large_3.bmp
    	/* etc */
    whenever I try to use EMbmApplicationImage_small_3 in my code, it will print out image_large_1.bmp. What's worse, if I try to use EMbmApplicationImage_large_3, the program will crash. It seems that even though I'm cleaning everything in the project and building for the right target, the .mmp to .mbm mapping is not being created properly. Is there anything I can do to make sure the .mmp file creates the proper enum TMbmApplication to bitmap file association? I've tried a bunch of different possible solutions without any success.

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,567

    Re: .mbm file points to the wrong images

    You could do a simple test using #error directives, just to see which branch is picked - at least that is what I do when experimenting with conditional magics.
    Generally the .mmp file might not get all symbols you can rely on in .cpp, and in particular "#elif __SERIES60_3X__" might better look as "#elif defined(__SERIES60_3X__)"

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

    Re: .mbm file points to the wrong images

    Thanks for the quick answer, but I really don't think the directives are the problem. I commented out the code for the n97, I straight up deleted any mention of the /bitmap folder, leaving only the reference to /bitmap95 folder in the mmp. I tried generating the MBM code by adding the image I want by right clicking the Application.mmp file in Carbide's project explorer, selecting "Add MBM entry..." instead of manually inserting the line for the bitmap... I tried a lot of different angles, many of them didn't include #ifdefs, #elsifs, #endifs at all.

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

    Re: .mbm file points to the wrong images

    By the way, for future reference, those preprocessor directives do work in the .mmp file

    Thanks for the #error tip.

Similar Threads

  1. how to convert .bmp files to .mbm file?
    By jignasha in forum Symbian Tools & SDKs
    Replies: 8
    Last Post: 2009-01-11, 10:45
  2. PED and signing.
    By IX in forum Python
    Replies: 11
    Last Post: 2008-04-21, 01:15
  3. Error in creating .mbm file
    By A.Vogel in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 2
    Last Post: 2007-08-16, 06:33
  4. Replies: 1
    Last Post: 2005-05-26, 14:22
  5. Replies: 0
    Last Post: 2002-06-10, 12: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
  •