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.
If you open “worm.rkt” in DrRacket and click run, does it start correctly?
yes
Does ./work return? (i.e. does it keep running or do you get a prompt?)
yes, it returns. Yet, no error message, nothing.
Just checking: How did you decompress worm.tgz ?
I mean I get a prompt
ok
yes, I decompressed it
how
@diallo.ms when you run your program, do you have to then type (worm-main ...)
at the prompt in DrRacket?
With a right-click “Extract here” on worm within the file manager.
That ought to work.
@samth yes I type (worm-main A-GAME 0.2)
@diallo.ms the executable just has the file that’s in the definitions window
you need to put that call inside the definitions window before creating the executable
ok, I’ll try that
It works ! I didn’t know I had to put the call in the function definition. A BIG thaank you to both of you !
Great you got it working.