1. Problem with compiling to C
- Posted by ietv Feb 10, 2011
- 1901 views
Never done that before, so here's what I did, and what happened.
Using Windows XP, with the default Watcom Eu 4.0 package.
Took the Skipper SDL program from RapidEuphoria. Tried it out, works perfectly under 4.0.
Ran "euc Skipper_sdl.exw".
It translated, compiled, linked, created an .exe
Run the .exe, get a screen flash - can't tell if it's console or the program - and then nothing.
Is this because of using the SDL.dlls? Or did I do something else wrong?
2. Re: Problem with compiling to C
- Posted by SDPringle Feb 10, 2011
- 1816 views
Try compiling with the -con option with euc. That way when it closes it will leave the error on the console you're using.
3. Re: Problem with compiling to C
- Posted by ietv Feb 11, 2011
- 1750 views
No luck, same thing happens, even when I run from the command prompt.
Tried adding the -debug option, that didn't work either.
4. Re: Problem with compiling to C
- Posted by ietv Feb 11, 2011
- 1697 views
The reason I was trying to do this was to see if I could - later - compile the program for ARM to run it on my Palm phone.
Apparently it doesn't take much to add the execution interruption required to run on the phone, so I thought I would try it even though I'm pretty sure it's beyond me (haven't looked at C in 25 years).
5. Re: Problem with compiling to C
- Posted by Jerome Feb 12, 2011
- 1648 views
I also could not get Skipper_sdl to work after compiling with c; I tried with Watcom and gcc. I'm on Windows 7 with EU 4, Revision Data: 2010-12-22.
I tried the following:
euc -con -verbose -wat -debug -keep Skipper_SDL.exw euc -con -verbose -gcc -debug -keep Skipper_SDL.exw
There weren't any compiler warnings and the resulting Skipper_SDL.exe just exits without any info.
- Ira
6. Re: Problem with compiling to C
- Posted by jaygade Feb 12, 2011
- 1617 views
Are there any constant declarations of floating-point values? If so, that's a known issue. It doesn't work. See (the unintuitively named) ticket:607
7. Re: Problem with compiling to C
- Posted by Jerome Feb 13, 2011
- 1607 views
Jaygade,
Thanks for the heads up! There were two lines with constant decelerations of floating-point values. After changing these, the compiled exe works. Here are the two spots I had to change in Skipper_SDL.exw:
587: constant surf_damage=.02,SHOT_SPEED=7,Token_Rotation=3 627: constant sin_lookup = temp[1], cos_lookup = temp[2]
Thanks,
Ira
8. Re: Problem with compiling to C
- Posted by mattlewis (admin) Feb 13, 2011
- 1544 views
Jaygade,
Thanks for the heads up! There were two lines with constant decelerations of floating-point values. After changing these, the compiled exe works. Here are the two spots I had to change in Skipper_SDL.exw:
587: constant surf_damage=.02,SHOT_SPEED=7,Token_Rotation=3 627: constant sin_lookup = temp[1], cos_lookup = temp[2]
This has been fixed now, FYI, in the repo, and will be fixed for the next release.
Matt