You need to make sure that you have the right macros defined. Here's a
Makefile that works for me :
TARGET=arm-mingw32ce
CC=     ${TARGET}-gcc ${CFLAGS}
CCC=    ${TARGET}-g++ ${CFLAGS}
CFLAGS= -D_WIN32_WCE=0x0500 -D_WIN32_IE=0x0500
WINDRES=        ${TARGET}-windres ${CFLAGS}

hellosp.exe:    hellosp.o hellosp.rsc
        ${CCC} -o hellosp.exe hellosp.o hellosp.rsc -lcommctrl
-laygshell
        
hellosp.o:      hellosp.cpp
        ${CCC} -c hellosp.cpp

hellosp.rsc:    hellosp.rc
        ${WINDRES} hellosp.rc hellosp.rsc


Also there's a couple of small changes to make to the sources, see these
diffs.

Note that this is an example from the (excellent) Boling book on
programming Windows CE.

        Danny

*** orig/hellosp.cpp    2008-12-16 17:21:52.000000000 +0100
--- hellosp.cpp 2008-12-16 17:15:29.000000000 +0100
***************
*** 14,19 ****
--- 14,23 ----
  const TCHAR szAppName[] = TEXT("HelloSP");
  HINSTANCE hInst;                      // Program instance handle
  
+ extern "C" {
+     void SHSetNavBarText(HWND, wchar_t *);
+ };
+ 
  // Message dispatch table for MainWindowProc
  const struct decodeUINT MainMessages[] = {
      WM_CREATE, DoCreateMain,
*** orig/hellosp.rc     2008-12-16 17:21:52.000000000 +0100
--- hellosp.rc  2008-12-16 17:20:36.000000000 +0100
***************
*** 6,12 ****
  //======================================================================
  #include "windows.h"                 // Windows stuff
  #include "aygshell.h"                // Pocket PC stuff
! #include "HelloSP.h"                 // Program-specific stuff
  
  //----------------------------------------------------------------------
  // Icons and bitmaps
--- 6,13 ----
  //======================================================================
  #include "windows.h"                 // Windows stuff
  #include "aygshell.h"                // Pocket PC stuff
! #include "hellosp.h"                 // Program-specific stuff
! #include "commctrl.h"
  
  //----------------------------------------------------------------------
  // Icons and bitmaps
***************
*** 18,24 ****
      0,
      1,
      I_IMAGENONE, IDM_EXIT, TBSTATE_ENABLED, 
!                   TBSTYLE_BUTTON | TBSTYLE_AUTOSIZE, IDS_OK, 0,
NOMENU,
  END
  
  STRINGTABLE DISCARDABLE
--- 19,25 ----
      0,
      1,
      I_IMAGENONE, IDM_EXIT, TBSTATE_ENABLED, 
!                   TBSTYLE_BUTTON | TBSTYLE_AUTOSIZE, IDS_OK, 0, NOMENU
  END
  
  STRINGTABLE DISCARDABLE

On Mon, 2008-12-15 at 13:46 -0600, Jared Waltzer wrote:
> I am trying to compile the example here with the mingw32ce compiler:
> http://msdn.microsoft.com/en-us/library/ms931632.aspx
> 
> I get a syntax error in the .rc file. Removing the rc file I get an
> undefined reference for SHCreateMenuBar. Am I doing something wrong,
> or is this not supported at this point? Any suggestions for creating a
> smartphone application with cegcc would be greatly appreciated.
> 
> jared
> ------------------------------------------------------------------------------
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
> The future of the web can't happen without you.  Join us at MIX09 to help
> pave the way to the Next Web now. Learn more and register at
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> _______________________________________________ Cegcc-devel mailing list 
> [email protected] 
> https://lists.sourceforge.net/lists/listinfo/cegcc-devel
-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info


------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Cegcc-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to