Need a c/c++ compiler ! - Windows Mobile Development and Hacking General

hello guys,
i have been trying to figure out a way to do some c or c+ programming on the go, i have a desktop replacement laptop and i dont wanna have to carry it with me with all of my other books to school everyday. i am tryin to find a c++ compiler (hopefully gui)
i have tried
pocket gcc (installed but doesnt work)
pocketc (needs a translator to work)
evc++ (apparantly either i downloaded the desktop version or this is not what i was looking for)
i am just looking to do some c or c++ coding without a laptop at school.
thanks in advance.
joe

gcc works maybe you just set it up wrong
if you can do with c# then there is a c# compiler that runs on pocketpc
it dont have a gui though but any notepad'ish program can edit those files
otherwise there is this
http://www.pocketgear.com/software_detail.asp?id=5723
but it's not a fullblown compiler imho
never seen other real compilers or development envioments for pocketpc's
think the demand is TINY!

Yeah, Pocket GCC has worked successfully for me in the past.
However, I used Mamaich's version, and this was on a WM2003 device. You need to find a compatible Console output first for WM5 (you're using the Hermes right?). I can't remember if we found a good one for >= WM5.
There's various Basic type programming languages as well for native device development, and PocketC, but that's very very old.
V

How about C#....
Hi,
Ig you can bare using C# instead, I've just posted above about a free tool I created called "C# IDE Mobile" which allows writing/executing C# compact framework applications directly on the PPC.... But if you need C, then this won't help.
Harvey

Actually i have updated to wm6 and i am not sure if that is the reason cmd program from gcc wont work in it. I cant even find any sort of manual for it either.
and yes i do need a c compiler because from next semester i am startin to take unix courses and its mostly c programming. and if i get an idea in the middle of history class i might want to try it out on the phone instead of lappy.
so does anyone else have any ideas about a non translating program for c or c++
i was wondering if evc++ was only for PC and not PPC's cause i couldnt find a non xp version.

so i guess no compiler's huh?

evc++ is a IDE for windows which enable people to make pocketpc applications
not to run on the ppc
for the most parts the syntax of c# even java too is the same as
with c
so if all you need to do is make different algoritmes then you can use those
or the vi editor i linked too
if wm6 have the same issue with cmd as wm5 then this thread may help
http://forum.xda-developers.com/showthread.php?t=255114

does someone have a success with Tiny C compiler for ARM (tcc-arm) ?
IMHO, it would be quite handy for on-pocket development

I'm not sure if you can develop PocketPC-Applications with this, but I think its possible.
Try Visual Studio Express (C++-Edition) combined with the Windows Mobile SDK and the Windows Mobile Emulator Images.
All free, all available @ Microsoft Download Center. It's not tiny, but it's GUI and you can extend the pure C++-Development Environment with the ability to develop mobile applications and even to test them on Emulator.
Personally I'm developin mobile .NET Applications with Visual Studio Professional + Windows Mobile SDK and Windows Mobile Emulator. Works fine.

DennisMoore,
TCC is great due to its small size. And the reason why I'm interested in TCC is ability to cross-compile it to make it usable not only for ppc development, but for development on ppc. GCC is too huge application

try searching Bloodshed Dev-C++

I tried PocketDOS and TurboC++
Some time ago I was looking for this same thing and as I was just trying to do small DOS application (educational) then my best option was TurboC++ running in Pocket DOS. It can be changed to other pocket pc DOS emulator (there is a freeware one)/DOS C compiler.

pgcc should work
vijay555 said:
Yeah, Pocket GCC has worked successfully for me in the past.
However, I used Mamaich's version, and this was on a WM2003 device. You need to find a compatible Console output first for WM5 (you're using the Hermes right?). I can't remember if we found a good one for >= WM5.
There's various Basic type programming languages as well for native device development, and PocketC, but that's very very old.
V
Click to expand...
Click to collapse
I have this installed on my WM6 device and it works fine. In order to make the console work, you have to make a change in the registry.
see
http://forum.xda-developers.com/showthread.php?t=275019&highlight=console

Is this thread still active?
I use PGCC on my T-mobile Dash. I basically have to use batch files named without the following keys: W, E, R, S, D, F, X, C, V, which correspond to 1-9 on the dial pad. For example a file named run.bat would show up as 3un.bat so I would have to name it as such. I was attempting at one time to remap the keyboard to the HTC Excalibur like PocketDOS but, it was out of my experience level. I created a console pack from several different files that I modified. I had to jump through some hoops to discover this but, it's half the fun.

vijay555 said:
Yeah, Pocket GCC has worked successfully for me in the past.
However, I used Mamaich's version, and this was on a WM2003 device. You need to find a compatible Console output first for WM5 (you're using the Hermes right?). I can't remember if we found a good one for >= WM5.
There's various Basic type programming languages as well for native device development, and PocketC, but that's very very old.
V
Click to expand...
Click to collapse
Here's another console, tried it on WM6.1 and works like a charm.
http://forum.xda-developers.com/showpost.php?p=1854003&postcount=28
As for pocket GCC, i remember that it had some problems if file paths passed to it contained any spaces, so "/storage card" was a bit of a problem, and obviously, putting it in device's memory isn't even possible on many current pda's. The solution i came up with was renaming "/Storage card" to something wothout spaces (like "/SD").
You can do it by a simple registry edit the key:
Code:
HKLM/System/Storage Manager/Profiles/SDMemory/Folder
or
HKLM/System/Storage Manager/Profiles/SDMMC/Folder
(i don't remember which one it was, so you'll have to do some experimenting)
to anything you would like. After a soft reset you'll see the storage card mounted to a different folder.

Related

New Programmer (Maybe)

Hi to all,
i'm new in xda\xda2 world...and i would like to develop under it? What i need for developing? What cpu type\model it have?
Well.. The About and Device Information screens in the System Settings menu should take care of your questions..
But if you're lazy, the XDA typically runs PocketPC 2002 on a StrongArm CPU, and the XDA II PocketPC 2003 (Windows Mobile Edition) on an Intel XScale (which is backwards compatible with ARM).
If you simply visit www.pocketpc.com and click on developers you'll end up at http://www.microsoft.com/windowsmobile/information/devprograms/default.mspx
Where you can even order a free DVD-Rom with the PocketPC SDKs, compilers etc (they will charge shipping and handling, at a freakishly high rate). You can also download that stuff.
However, you will need Visual Studio .NET as well, which is not a free download (in fact, even the academic version will set you back more than EUR 100).
I've not ventured into it myself yet, so it's quite possible you can actually do without Visual Studio (as the compilers themselves can be downloaded). Also, there's a version of gcc for pocketpc.
Any one developing for pocketpc who wants to chip in here? (I'd like to toy around with programming a bit on PPC - regretably it doesn't have a built-in scripting language like epoc32 has/had).
You only need Visual Studio .NET if you want to create .NET applications. If you are just programming in C++, I'd highly recommend downloading Embedded Visual Studios 3 and 4 and get the appropriate SDKs (all of which are free). At least, that's what I use.
What about Java Midlets?
I am thinking on writing a couple of apps for PPC, but going into VS.NET might be too deep for me. I also want to extend those later for palm and maybe desktop. No hardware specific stuff so I thought I might get away with Java which I am pretty good at.
Does anyone have anything to say - pros / cons? How midlets are on O2 in general - fast / slow, too much memory or processing power? Please share.
Why don't you get down to c++? Fast, small, general support...
--------------
У нас сегодня день вежливости, так что вы просто идите за мной и никуда не сворачивайте!
Some day
Good old C++. Too many years with Java - softened my mind... Undoubtedly C++ is the best way to go in terms of speed and size. Lets see what people say. :idea:
I've been programming in Visual .NET (VB.NET more specifically), but even after installing the SDK I have no idea where to start? When creating a project, I don't see any new project type for Pocket PC applications ? In fact, what else do I need to do if I want to program in VB.NET ?
i read that visualstudio .net 2005 will be able to make pocketpc applications in all languages not just .net applications like 2003
not sure about how you get started with vb.net since vb is very evil and nasty
but with c++ mfc and c# .net you start out with a form and there you can place components on it and program what functions they have
but if you want to make games and stuff which dont use normal windows stuff then you are better off programming them in c++ directly for the arm platform
I use Embedded VC++ and MFC as it's far tighter/smaller than .net. Purists can go completely Win32(ce) native and avoid MFC altogether but MFC does make development a good deal easier without the bloat of .net (not to mention how slow it is..).
Same thing for me. C++ with EVC tools. No mfc for me (a little purist and feel it gives a clearer code )
Best way to have samller and optimize applications
I've been programming in Visual .NET (VB.NET more specifically), but even after installing the SDK I have no idea where to start? When creating a project, I don't see any new project type for Pocket PC applications ? In fact, what else do I need to do if I want to program in VB.NET ?
Click to expand...
Click to collapse
If you have VS.NET 2003 you don't even need the SDK.
just File-> New->Project
on the left column "Project Types" choose your language and on the right click the "Smart Device Application"
Basically is like any windows application but less possibilities and if you want to create any serious application you'll have to do a lot of optimization and native coding.
Good luck
Books?
I'm also interested in programming with Embedded VC++...and was wondering if anyone know of books out there I can pick up that will help my learning process a little quicker. Its been a long time since i coded in C++ and need to refresh.
The part I'm really need help is the basic parts ...like how to get things started.
I'm confident that once I get started i'll start to remember my C++ coding.
I'm downloading the Embedded VC++ from Microsoft as I type this post ...hope it wont be too hard to understand how to create a simple "hello world" program for PPC devices
Also if anyone knows a good web sites with code samples ...please PM or post the URL, I'v seen some but not all that great
Thank You
Sometimes less is more.......
zendrui said:
Same thing for me. C++ with EVC tools. No mfc for me (a little purist and feel it gives a clearer code )
Best way to have samller and optimize applications
Click to expand...
Click to collapse
As mentioned above, if you drop ATL, MFC .NET and all the implied baggage they have to bring with them to work, you are left with the old WIN32 programming model. This is now considered very 'old hat', but if all your program uses are API's in WIN32's kernel.dll, user.dll, gdi.dll etc...... i.e. the very primative windows stuff, then it is possible to write an application that will run on any version of Windows Mobile. This application will be pretty simple, but the compiled .EXE file targetted at an ARM4xx model will run on almost any Pocket PC, without any other files. (i.e. The single APP.EXE file will run on any upwardly compatable system, no fancy implementation project to create or run, just copy the release '.exe' file to the target machine, and it will run!). These days 99%+ mobile PDA's run ARM class processors. The manufacturers call them by their own processor IDs but under the hood they are all the same.
To create an app that will run on the Mobile 5/6 platform without looking like previous Mobile 2002/3/SE apps, limit the Main menu items to two. This will make sure they appear either side of the input icon, as menu items. More than two and the Mobile 5/6 menu items appear as 2002/3/SE apps in the old control bar style.
wfberg said:
(I'd like to toy around with programming a bit on PPC - regretably it doesn't have a built-in scripting language like epoc32 has/had).
Click to expand...
Click to collapse
As far as scripting goes... I'm a big fan of Mortscript. It's so simple... I guess I'm a little purist myself
Basic 4PPC
Basic for Pocket PC, has anyone tried this. I went to the site and it only cost around 40.00 US. I've worked with "basic" before and the progs were usually bloated and sluggish. Wonder if this would be the same.
i have started developing in ppl language the program name is PIDE from ariana soft..its very easy..it also lets u make games
ive created my first clock in it

Reading the registry with Visual Studio 2003

I'm developing a small application for my HTC Wizard, which I'm programming with Visual Studio 2003.
I need to open the shell application for M3U files, which I've tracked down to HKCR\M3UFile\Shell\Open\Command... but now I can't figure out how to either read that key to open the relevant player, or to execute the m3u file directly.
Because I'm using VS2003, I don't have access to system.win32 with the compact framework, so what techniques have others of you used to read or write to the registry?
Also, just as a side note, how do you find the current path?
Thanks,
Jon
There is no real concept of current path in CE. If you want to know the path your EXE is in, use GetModuleHandle(NULL) -- it'll return the fully-qualified path name of that process's EXE, from which you can parse out a path.
I'd advise against using the compact framework; .Net is a loser on PPCs as it just slows things down, taking up extra memory & cycles on a platform where both are in short supply. Use the real Windows APIs instead -- i.e. call RegCreateKeyEx/RegSetValueEx.
And if you choose to use Win32 API you can just call ShellExecuteEx()
and not mess with the registry.
RegQueryValueEx is what you need. Just set the appropriate type and buffer.
V
I'm always willing to learn new stuff... are there any good resources on programming for PPC without using .net?
I know there's EVC++, but I've installed it, and now I don't know what to do with it!
Regards,
Jon
JonTheNiceGuy said:
I'm always willing to learn new stuff... are there any good resources on programming for PPC without using .net?
I know there's EVC++, but I've installed it, and now I don't know what to do with it!
Regards,
Jon
Click to expand...
Click to collapse
You can either use EVC++4, which is free but has an aged, not-so-standard C++ compiler (since it based on VC++6...but it only means a few quirks), or you can use Visual Studio 2005 which is supposed to replace EVC.
Jon, not to state the obvious, but there are many c++ tutorials for the PPC on the interweb.
What kind of experience do you have?
V
I have no prior experience with C++ - I bought the C++ For Dummies book in a charity shop a month or so ago, but it seems to refer to software that isn't available any more!
My core experience is with PHP, and recently I've been more interested in VB.NET for small apps at work, but most of what I want to do is with Windows Mobile - for which, all I have is Visual Studio 2003, and my co. won't fund me buying VS2005 as I got it for an old project that I still maintain, and anything new I need to write for work I can do with VS2005 Express...
That said, I'm not afraid of learning a new language, especially something as powerful as C++.
C++ for dummies is excellent, the best I've come across so far.
Have a read through this:
http://forum.xda-developers.com/viewtopic.php?p=209136#209136
I'm currently unlearning and then relearning my c++ - one thing I've learnt coming from other languages - c++ requires discipline. It's not about shortcuts, you build up from the basics and keep going steadily. But you need to be logical, and prepared to put in the effort. So discipline - it's been a long time since I've had to think about that!
V

eVC4 with sp4 - How to begin?

OK, I have absolutely no programming experience beyond creating some batch files in DOS, way back in the day, and some even earlier experience trying to learn BASIC (on an ADAM computer, no less....).
I've dl'd eVC4 with sp4, opened it up, and begun reading the help files....
Unfortunately, this is about as foreign to me as trying to read a Mandarin Chinese primer written in Russian....
My initial goal is to gain an understanding of .CAB files, and write a few of my own.
Any suggestions on how to find a good starting point? I have a brain, but I also need a good reference point.
Any help would be greatly appreciated!
If you just want to create cab files I'd recommend you use WinCE Cab Manager instead. It's much more easy to use, and provides way better understanding on how cab files work than eVC4
If you really just want to pack a few things then as nomad suggested you should get the Cab Manager.
Though there is not much to learn about cabs as they are made by cabwiz.exe (a file which comes with the Pocket PC SDK you also need for eVC).
It reads a inf file that lists files to include in installation, shortcuts, and registry setting. All of it is documented here.
If you want to get in to writing apps, you should first get a good book on C/C++ or on another programing language should you choose it.
Currently WM development supports C/C++, VB .NET, C# and JAVA (in somewhat awkward way)
Once you learn basics of the programing language you can move on to Win32 programing which is the base for both desktop and pocket PC OS.
It's a bit of a long way, but there isn't much choice if you want to really understand what you are doing / can do.
I started with an excellent book called "complete guide to C" (it was a translated version so name may vary, black cover big C on it) then moved on to a 1000+ page Visual C++ and MFC book from MS.
Is this link the latest eVC version available?
http://www.microsoft.com/downloads/...3D-50D1-41B2-A107-FA75AE960856&displaylang=en
It looks like you install eVC then the latest SP for it which appears to be SP4
http://www.microsoft.com/downloads/...F4-91D3-4DBE-986E-A812984318E5&displaylang=en
If you have Visual Studio 2005 and the WM5 sdk is there any reason to install eVC or is it included or obsoleted?
Not that I'm one to speak, I'm very much a learner, but I posted way back about some of my pains in learning to program in c++.
http://forum.xda-developers.com/showthread.php?t=253443&highlight=brain
V

Beginner's pointers?

Hi chaps,
I've just got myself an O2 XDA Orbit - great device, and now I'm looking for developing for it - just simple things at first, like a Blackjack game, or a simple Today feature with the sun and moon times on it; this sort of thing.
I've got Visual Studio .NET 2003, but I see that in order to program the latest devices, you need VS 2005 (?). So, I've downloaded Embedded Visual Studio C++ v4 with all the SDK's and I'm hoping to develop for an earlier version of Windows Mobile, and hope that it works.
So while I've got all that, I'm now stuck as to where to start! Can anyone point me to a good book, or something online which will help me through a simple CE application? How you do get the Today screen working, for example? I realise that this might be asking a lot, but a couple of pointers would be great - if you could!
Many thanks,
MrP.
I'm just starting out myself with windows mobile programming. You can find a lot of info from msdn. Here is an example Hello app.
http://msdn2.microsoft.com/en-us/library/ms912017.aspx
You can find a lot of good stuff at the code project site also.
http://www.codeproject.com/ce/
eVC has wizards that will get you going. One thing I found out about using eVC is that you won't be able to debug your programs on a WM5/6 device since the SDK's are not compatible with them. It can be a bit of a challenge to fix bugs without a debugger. I can't get the debugger to work with the emulator either for some reason.
A question for other eVC developers out there. Is it possible to use the emulator to debug programs or do you all have an old PPC2003 device that you use to do your debugging? Or have you all moved on to VS2005?
I've bought visual studio 2005 standard and it is great - it fully supports WM5/6 (with sdk) and runtime debugging - for .exe it works well but I have problems with .dll - I can't debug dll files - does anyone know how to make it?
Pleas look up threads started by vijay555.
He wrote a comprehensive article on the tools and possibilities to begin developing for these devices.
Just as a quick side note:
There is no need what so ever to pay M$ money for VS 2005 if you want to develop in C / C++.
Apps written in eVC++ 4 will work perfectly with WM 5 and 6 and if you need any missing API (not many of those) you have 2 choices:
1) Manually unpack the SDK and link to it.
2) Use implicit linking (that LoadLibrary and GetProcAdress).
levenum said:
Pleas look up threads started by vijay555.
He wrote a comprehensive article on the tools and possibilities to begin developing for these devices.
Just as a quick side note:
There is no need what so ever to pay M$ money for VS 2005 if you want to develop in C / C++.
Apps written in eVC++ 4 will work perfectly with WM 5 and 6 and if you need any missing API (not many of those) you have 2 choices:
1) Manually unpack the SDK and link to it.
2) Use implicit linking (that LoadLibrary and GetProcAdress).
Click to expand...
Click to collapse
Sorry about the delay in replying...
Many thanks for the pointers.. Just a matter of starting now!

WM6 compiler

I'm looking at developing a biomonitoring application, the setup to consist of a 24 bit ADC with an Atmel AVR microcontroller sending data via Bluetooth to the mobile phone for display. I don't have a large budget so am looking for freeware or something a lot cheaper than Visual Studio to develop the application to run under WM5/6. It has to be compiled due to the amount of processing needed.
I prefer to write in C/C++ . Pascal would be a 2nd choice then anything else except Basic.
For Windows development I use Borland C++ Builder and have used Delphi. On the embedded side I use Codevision AVR C compiler.
I'd appreciate recommendations for development software. TIA.
I got this C compiler to work a while ago (managed to recompile a few of my desktop PC SDL projects to ppc):
http://sourceforge.net/projects/wince-xcompile
[EDIT]
Sorry, ceGCC is what i was using, not xcompile:
http://cegcc.sourceforge.net/
[/EDIT]
It's free, but it's for linux (if you don't have linux, that might be a good reason to give it a try ). Also, the problem is that it doesn't have an IDE of its own, and no graphical interface editor.
There's also pgcc, allowing you to compile applications directly on your pocketPC, but i wasn't able to make it compile any GUI application, only console ones (but i didn't really spend much time trying). There's a working link and a short info on how to use it here:
http://www.aximsite.com/boards/business-development/135816-pocket-c.html#post1187340 (sorry for linking to other forum, but i didn't want to post someone's tutorial as mine).
Anyway, i'd love to hear about any other free alternatives as well
you could try embedded visual c++.
it is free but you can not debug on devices powered wm5 or higher. you will need the ppc 2003 sdk and win xp prof or 2000.

Categories

Resources