[answered] ../MAHeaders.h: No such file or directory

6 posts / 0 new
Last post
David Hoffmann
00091701's picture
Offline
Mobile Conjurer
Joined: 22 Oct 2011
Posts:
[answered] ../MAHeaders.h: No such file or directory

Hi,

im working on a test project.
I want to add an imagebutton. so I created a image in "resources/btn_test1.png", add a resource.lst file

.res IMG_BTN_TEST1
.image "resources/btn_test1.png"

If I add ../MAHeaders.h I get this error message:
D:\MoSync\workspace\DHHelloNativeUI\GUI\Overview.cpp:37:26: ../MAHeaders.h: No such file or directory
D:\MoSync\workspace\DHHelloNativeUI\GUI\Overview.cpp: In member function `void Overview::createUI()':
--> GCC PIPIL Compiler v2:11:50:55:Aug 26 2009 (O0)
d:\MoSync\bin\xgcc.exe -o D:\MoSync\workspace\DHHelloNativeUI\Output\Debug\DataStore.s -S -g -MMD -MF D:\MoSync\workspace\DHHelloNativeUI\Output\Debug\DataStore.s.deps -DMAPIP -O0 D:\MoSync\workspace\DHHelloNativeUI\BusLog\DataStore.cpp -Id:\MoSync\profiles\vendors\HTC\Desire HD -Id:\MoSync\include -ID:\MoSync\workspace\DHHelloNativeUI\Output\Debug
D:\MoSync\workspace\DHHelloNativeUI\GUI\Overview.cpp:153: error: `IMG_BTN_TEST1' was not declared in this scope
D:\MoSync\workspace\DHHelloNativeUI\GUI\Overview.cpp:158: error: invalid conversion from `NativeUI::Image*' to `MAHandle'
D:\MoSync\workspace\DHHelloNativeUI\GUI\Overview.cpp:158: error: initializing argument 1 of `virtual int NativeUI::ImageButton::setImage(MAHandle)'

Can anybody help me?
Regards,
David

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Sam Pickard
rival's picture
Offline
Mobile Archmage
Joined: 19 Mar 2009
Posts:

You should include it as "MAHeaders.h" without any file path. This will be included correctly at build time.

David Hoffmann
00091701's picture
Offline
Mobile Conjurer
Joined: 22 Oct 2011
Posts:

Thank you!
Regards, David

muzahed ahasan
muzaheed57's picture
Offline
Joined: 26 Jul 2011
Posts:

i am also having same problem.
i was trying to do this tutorial:
http://www.mosync.com/documentation/tutorials/discovering-devices-and-services-bluetooth

but it shows same error:
C:\MoSync\workspace\dd\/UIBuilder.h:33:23: MAHeaders.h: No such file or directory
C:\MoSync\workspace\dd\UIBuilder.cpp: In function `MAUI::Widget* createMainLayout(const char*, const char*)':
Build finished at 2/2/12 9:22:39 PM ALMT
C:\MoSync\workspace\dd\UIBuilder.cpp:74: error: `BACKGROUND_IMAGE' was not declared in this scope

so i tried to replace
#include "../MAHeaders.h"
with
#include "MAHeaders.h"

but still shows same error

David Hoffmann
00091701's picture
Offline
Mobile Conjurer
Joined: 22 Oct 2011
Posts:

You can find a working example in my project: https://github.com/AndNaviki/AndNaviki-MoSync

Chris Hughes
qlmhuge's picture
Offline
Mobile Archmage
Joined: 11 Jan 2010
Posts:

muzaheed57 wrote:

i am also having same problem. i was trying to do this tutorial: http://www.mosync.com/documentation/tutorials/discovering-devices-and-services-bluetooth but it shows same error: C:\MoSync\workspace\dd\/UIBuilder.h:33:23: MAHeaders.h: No such file or directory C:\MoSync\workspace\dd\UIBuilder.cpp: In function `MAUI::Widget* createMainLayout(const char*, const char*)': Build finished at 2/2/12 9:22:39 PM ALMT C:\MoSync\workspace\dd\UIBuilder.cpp:74: error: `BACKGROUND_IMAGE' was not declared in this scope so i tried to replace #include "../MAHeaders.h" with #include "MAHeaders.h" but still shows same error

To include the compiled resources, use the syntax:

#include <MAHeaders.h>