PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Compile Issues (evc)

Initially, I've had evc 3.0 for awhile and I just recently started making an app. Compiled, ran fine. Next, I wanted to create my own menu bar, took me *forever* to figure out that the lib needed to be included in the project settings. At this point, I was able to get a menu in my app, but it did nothing (doesn't respond to taps), it seems as if it were frozen. Confused, I went searching on the web, low and behold I found evc 4.0 was available, so I downloaded it. Now my program won't even compile, in either 3.0 or 4.0:

startup.cpp(209) : warning C4007: 'WinMain' : must be '__stdcall'

startup.cpp(209) : error C2373: 'WinMain' : redefinition; different type modifiers

C:\Program Files\Windows CE Tools\wce300\Pocket PC 2002\include\winbase.h(372) : see declaration of 'WinMain'
Error executing cl.exe.

startup.obj - 1 error(s), 1 warning(s)

I'm pretty sure that none of the include or library paths were changed for 3.0, and none of the actual files either, but that can't be true since it magically stopped working. I have no idea what needs to be configured for my project settings, or if this is even the problem... any ideas?
do you have two "main" functions in there ?
woot. I created a new project for the main cpp file and it started working again, perhaps I was just too frustrated last night to think of it. However, I'm still back to that issue of having a menu that doesn't really respond to taps.

static void create_menu_bar(HWND hWnd)
{
SHMENUBARINFO mbi;

memset (&mbi, 0, sizeof (SHMENUBARINFO));
mbi.cbSize = sizeof (SHMENUBARINFO);
mbi.hwndParent = hWnd;
mbi.nToolBarId = IDR_MENUBAR1;
mbi.dwFlags = SHCMBF_HMENU;;
mbi.hInstRes = g_hInst;

SHCreateMenuBar(&mbi);
}

The menubar was created with evc's built in menubar generator. Anyone ever have this problem?