From: Damir on
On Mon, 05 Feb 2007 19:19:41 -0000, hugh
<spam.egg.sausage(a)spamcafe.com> wrote:

>
>
>because i haven't managed to get hplua to run stand alone yet, you have to
>launch it from the ARMToolbox. have a look at the hplua/README.TXT how to
>install
>the toolbox. also there's more details in the ArmToolBox directory
>
>if you can run HPlua and get the initial message you are ready to go!
>Remember to exit with "exit" (no quotes) on a line of its own. this gets
>you
>back to the calculator normal.
>
>to load a sample, do (inside lua)
>
>dofile("sunset.lua")
>sunset()
>
>The keyboard is a bit weird in hplua and is something i want to improve.
>
>i strongly advise using a pc to write all the stuff to a SD card in the
>same directory. that's lua.hp and all the *.lua samples and then put
>the card into the calculator. use file FILES feature to get to the lua.hp
>binary, press RCL and PrRun (from the installed toolbox lib).
>
>hope this helps,

Thank you very much.
Damir
From: mm on
hugh schrieb:
>
>
> hmm..
>
> well, ifloor is coming from the number2int macro here.
>
> #define lua_2int(d) ifloor(d)
> #define lua_number2int(i,d) ((i)=lua_2int(d))
>
> and should be defined from bcd.h here,
>
>
> friend int4 ifloor(const BCD& a)
> { return BCDFloat::ifloor(&a._v); }
>
> if i change this "ifloor" to "imoose", i get the same error, so your
> system's
> not seeing it for some reason.
>
> ok, i have,
>
> arm-elf-g++ -v
> Using built-in specs.
> Target: arm-elf
> Configured with: ../gcc-4.0.2/configure --target=arm-elf
> --prefix=/g/gnuarm-4.0.2 --enable-interwork --enable-multilib
> --with-newlib --with-headers=../newlib-1.14.0/newlib/libc/include
> --enable-languages=c,c++
> Thread model: single
> gcc version 4.0.2
>
> and i got this version from www.gnuarm.com installation file,
>
> 27/01/2007 21:28 26,063,274
> bu-2.16.1_gcc-4.0.2-c-c++_nl-1.14.0_gi-6.4.exe
>
> can you check your compiler version?
>

Using built-in specs.
Target: arm-elf
Configured with: ../../gcc-4.1.1/configure --enable-languages=c,c++
--enable-interwork --enable-multilib --with-gcc --wi
th-gnu-ld --with-gnu-as --with-stabs --disable-shared --disable-threads
--disable-libssp --disable-libstdcxx-pch --disab
le-libmudflap --disable-win32-registry --disable-nls --disable-debug
--without-headers --with-newlib --target=arm-elf --
prefix=c:/WinARM -v
Thread model: single
gcc version 4.1.1 (WinARM)

That's the standard version, the recent HP-GCC 2.0 for native Windows is
bundled with.


> On Mon, 05 Feb 2007 13:58:49 -0000, Ingo Blank
> <ingo.news01REMOVE_UPPERCASE(a)hpgcc.org> wrote:
>
>>
>> hi,
>>
>> I checked out the recent version and tried to make:
>>
>> arm-elf-g++ -fno-rtti -fno-exceptions -mtune=arm920t -mcpu=arm920t
>> -DHPLUA -msoft-float -mlittle-endian -fomit-frame-poi
>> nter -Wall -Os -Istubs -Ibcd20 -I"C:\hpgcc-2.0-native-win32\include"
>> -L"C:\hpgcc-2.0-native-win32\lib" -mthumb-interwork -mthumb -x c++ -c
>> -o lcode.o lcode.c
>> lcode.c: In function 'int addk(FuncState*, TValue*, TValue*)':
>> lcode.c:232: error: 'ifloor' was not declared in this scope
>> make: *** [lcode.o] Error 1
>>
>>
>> --
>> Ingo Blank
>> http://hpgcc.org
>> http://blog.hpgcc.org
>>
>
From: hugh on


have they changed the language again?

try this option

-ffriend-injection






On Mon, 05 Feb 2007 19:36:19 -0000, mm <mm.news01INVALID(a)hpgcc.org> wrote:

> hugh schrieb:
>>
>>
>> hmm..
>>
>> well, ifloor is coming from the number2int macro here.
>>
>> #define lua_2int(d) ifloor(d)
>> #define lua_number2int(i,d) ((i)=lua_2int(d))
>>
>> and should be defined from bcd.h here,
>>
>>
>> friend int4 ifloor(const BCD& a)
>> { return BCDFloat::ifloor(&a._v); }
>>
>> if i change this "ifloor" to "imoose", i get the same error, so your
>> system's
>> not seeing it for some reason.
>>
>> ok, i have,
>>
>> arm-elf-g++ -v
>> Using built-in specs.
>> Target: arm-elf
>> Configured with: ../gcc-4.0.2/configure --target=arm-elf
>> --prefix=/g/gnuarm-4.0.2 --enable-interwork --enable-multilib
>> --with-newlib --with-headers=../newlib-1.14.0/newlib/libc/include
>> --enable-languages=c,c++
>> Thread model: single
>> gcc version 4.0.2
>>
>> and i got this version from www.gnuarm.com installation file,
>>
>> 27/01/2007 21:28 26,063,274
>> bu-2.16.1_gcc-4.0.2-c-c++_nl-1.14.0_gi-6.4.exe
>>
>> can you check your compiler version?
>>
>
> Using built-in specs.
> Target: arm-elf
> Configured with: ../../gcc-4.1.1/configure --enable-languages=c,c++
> --enable-interwork --enable-multilib --with-gcc --wi
> th-gnu-ld --with-gnu-as --with-stabs --disable-shared --disable-threads
> --disable-libssp --disable-libstdcxx-pch --disab
> le-libmudflap --disable-win32-registry --disable-nls --disable-debug
> --without-headers --with-newlib --target=arm-elf --
> prefix=c:/WinARM -v
> Thread model: single
> gcc version 4.1.1 (WinARM)
>
> That's the standard version, the recent HP-GCC 2.0 for native Windows is
> bundled with.
>
>
>> On Mon, 05 Feb 2007 13:58:49 -0000, Ingo Blank
>> <ingo.news01REMOVE_UPPERCASE(a)hpgcc.org> wrote:
>>
>>>
>>> hi,
>>>
>>> I checked out the recent version and tried to make:
>>>
>>> arm-elf-g++ -fno-rtti -fno-exceptions -mtune=arm920t -mcpu=arm920t
>>> -DHPLUA -msoft-float -mlittle-endian -fomit-frame-poi
>>> nter -Wall -Os -Istubs -Ibcd20 -I"C:\hpgcc-2.0-native-win32\include"
>>> -L"C:\hpgcc-2.0-native-win32\lib" -mthumb-interwork -mthumb -x c++ -c
>>> -o lcode.o lcode.c
>>> lcode.c: In function 'int addk(FuncState*, TValue*, TValue*)':
>>> lcode.c:232: error: 'ifloor' was not declared in this scope
>>> make: *** [lcode.o] Error 1
>>>
>>>
>>> --
>>> Ingo Blank
>>> http://hpgcc.org
>>> http://blog.hpgcc.org
>>>
>>

From: Ingo Blank on
hugh wrote:
>
>
> have they changed the language again?
>
> try this option
>
> -ffriend-injection
>

Yes!
That works...
I was always under the impression, that C++ is way too complicated.


--
Ingo Blank
http://hpgcc.org
http://blog.hpgcc.org