Hi Egan and Happy New Year to everyone.
This is an awesome tutorial on getting started with hpgcc! For anyone interested in C development on the 50g, I urge you to download Egan’s tar and work through the examples. This is the clearest introduction yet and everything you need is in the one download. Excellent work!
I really like the idea of packaging functions into libs that become extensions to the base system. There’s great scope here for a user community extension library that would contain a whole bunch of handy advanced and useful new functions. The concept of UserRPL wrappers means there’s a natural trade off between RPL and C. The RPL can add flexibility and the C performance. Such a library could thus contain either/or at various levels of C vs RPL encoding.
I wanted to work through the whole article before posting, but there’s quite a lot of stuff here and some very interesting articles in their own right, eg, pie shootout! But I must post anyway.
I had a few problems, firstly the hpgcc toolchain didn’t work under vista. XP is fine. Also, you need all the X11 cygwin bits to link the _local versions. Also, the X server won’t start unless you’ve installed cygwin in unix line endings mode (not sure why this is).
I’m currently battling another mystery problem where the compiler bails. “make agm_local” not inside an xterm gives me, “fatal error – couldn’t allocate heap, win32 error 487 ...”. This works inside an xterm, incidentally. So, i continue in an xterm to get, “make –f Makefile.hpgcc” inside complex/c9x-complex. This gives “This application has requested the Runtime to terminate in an unusual way.” Some googling thinks this is something to do with bogus version 7, msvcrt.dll around. Haven’t resolved this yet, so im stuck.
One question; Is there a cut-and-paste way to install the wrappers. Eg. Something like create a text file on the SD card with the UserRPL and then do something to load it? Also, what is this mystery text; %%HP: T(3)A(R)F(.); I know im missing something obvious here.
Great stuff!