[racket] the program can't find image file

From: 김태윤 (kty1104 at gmail.com)
Date: Fri Oct 8 21:40:57 EDT 2010

I stuck at defining an image with relative path

when I define as (define image (bitmap "run.bmp")), it works only in my

because there is no run.bmp in other people's computer with exactly same
and the compiler does not seems to include the image in the distribution
but just refer to the absolute path

fortunately I receive an advice about this
but following code doesn't seems to work
could somebody let me know how to define image as relative path? or include
image in the distribution file?

(define-runtime-path hero ".")
(define hero
   (path->string (build-path 'same "run.bmp"))))

2010/10/9 Noel Welsh <noelwelsh at gmail.com>

> I made an error.
> This
> > (define hero (build-path hero "run.bmp"))
> should be
> (define hero
>  (bitmap
>    (path->string (build-path hero "run.bmp"))))
> HTH,
> N.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20101009/28ad2eff/attachment.html>

Posted on the users mailing list.