1. Problem with compiling to C

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?

new topic     » topic index » view message » categorize

2. Re: Problem with compiling to C

Try compiling with the -con option with euc. That way when it closes it will leave the error on the console you're using.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Problem with compiling to C

No luck, same thing happens, even when I run from the command prompt.

Tried adding the -debug option, that didn't work either.

new topic     » goto parent     » topic index » view message » categorize

4. Re: Problem with compiling to C

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).

new topic     » goto parent     » topic index » view message » categorize

5. Re: Problem with compiling to C

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

new topic     » goto parent     » topic index » view message » categorize

6. Re: Problem with compiling to C

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

new topic     » goto parent     » topic index » view message » categorize

7. Re: Problem with compiling to C

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

new topic     » goto parent     » topic index » view message » categorize

8. Re: Problem with compiling to C

Jerome said...

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

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu