[racket] create-embedding-executable
On Sun, Jun 27, 2010 at 15:19, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> Does your call to `create-embedding-executable' work if you disable
> debugging in DrRacket or if you run from command-line Racket?
>
It works, thank you!
Maybe it could be a good idea to add an example like this one in the docs,
because it took quite some time to find out (but not really understand) that
one.
>
> I think the problem is that DrRacket configures the compiler to add
> errortrace-debugging instrumentation and to use ".zo" files that are
> instrumented, and that is interfering with executable creation. See
> also
>
> http://lists.racket-lang.org/users/archive/2010-May/039505.html
>
> Offhand, I'm not sure whether to blame errortrace for failing to set up
> appropriate dependencies or `create-embedding-executable' for not
> setting up a separate enough environment when building an executable.
> We'll have to work on this more.
>
Maybe this is stupid, but could it be possible to disable debugging
dynamically to parameterize the call to `create-embedding-executable' ?
>
> At Sun, 27 Jun 2010 13:01:43 +0200, Laurent wrote:
> > Hi,
> >
> > I'm trying to use `create-embedding-executable' (DrRacket 5.0, WinXP and
> > Vista), with this little module:
> >
> > #lang racket/gui
> >
> > (define f (new frame% [label "Test"]))
> > (send f show #t)
> >
> >
> > But I don't know exactly how to set the arguments to produce the same
> result
> > as "raco exe --gui", which works fine.
> > Going through the collections I found little help.
> > The best I could do is this:
> >
> > (create-embedding-executable
> > "test.exe"
> > #:modules '((#f "test.rkt"))
> > #:configure-via-first-module? #t
> > #:literal-expression
> > (parameterize ([current-namespace (make-base-namespace)])
> > (compile `(namespace-require ''test)))
> > #:gracket? #t
> > #:collects-path (current-library-collection-paths)
> > #:verbose? #t
> > )
> >
> > which effectively creates test.exe, but running the latter fails on:
> >
> > link: namespace mismatch; reference (phase 0) to a module "M:\Program
> > Files\Rack
> > et\collects\errortrace\errortrace-key.rkt" that is not available (phase
> > level 0)
> > ; reference appears in module: 'test in: init-test-coverage
> >
> > === context ===
> > test: [running body]
> > loop
> >
> > I have absolutely no clue of what is going on here.
> > Can someone help me with this?
> >
> > Thanks,
> > Laurent
> > _________________________________________________
> > For list-related administrative tasks:
> > http://lists.racket-lang.org/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100627/63da7ac9/attachment.html>