diallo.ms
2019-3-25 20:28:10

Hello!

I am trying to run an executable; in vain.

I created the file worm.rkt in DrRacket 7.2 on Linux Mint. I used the “Create Executable” item DrRacket’s “Racket” menu to turn worm.rkt into an executable. I got the archive worm.tgz. It contains the folders bin and lib. In the bin folder is the file worm; I checked: it is executable (in terms of permissions). In the bin folder, I typed ./worm. Nothing happens and there is no error message. I also double-clicked on the worm file. Nothing happens.

The main function is as follows:

(define (worm-main ws rate) (big-bang ws [on-tick tock rate] [to-draw render] [on-key ke-h] [state #true] [stop-when end? render-last-scene]))

I call worm-main like this: (worm-main A-GAME 0.2)

What am I doing wrong ?

Thank you.


soegaard2
2019-3-25 20:31:05

If you open “worm.rkt” in DrRacket and click run, does it start correctly?


diallo.ms
2019-3-25 20:34:42

yes


soegaard2
2019-3-25 20:35:26

Does ./work return? (i.e. does it keep running or do you get a prompt?)


diallo.ms
2019-3-25 20:36:08

yes, it returns. Yet, no error message, nothing.


soegaard2
2019-3-25 20:36:37

Just checking: How did you decompress worm.tgz ?


diallo.ms
2019-3-25 20:36:41

I mean I get a prompt


soegaard2
2019-3-25 20:36:48

ok


diallo.ms
2019-3-25 20:36:54

yes, I decompressed it


soegaard2
2019-3-25 20:36:57

how


samth
2019-3-25 20:38:09

@diallo.ms when you run your program, do you have to then type (worm-main ...) at the prompt in DrRacket?


diallo.ms
2019-3-25 20:38:17

With a right-click “Extract here” on worm within the file manager.


soegaard2
2019-3-25 20:38:30

That ought to work.


diallo.ms
2019-3-25 20:39:06

@samth yes I type (worm-main A-GAME 0.2)


samth
2019-3-25 20:39:28

@diallo.ms the executable just has the file that’s in the definitions window


samth
2019-3-25 20:39:43

you need to put that call inside the definitions window before creating the executable


diallo.ms
2019-3-25 20:40:09

ok, I’ll try that


diallo.ms
2019-3-25 20:43:51

It works ! I didn’t know I had to put the call in the function definition. A BIG thaank you to both of you !


soegaard2
2019-3-25 20:44:41

Great you got it working.