<div>Solutions:</div><div><br></div><div>Ensure you have the latest version of BH, there was a bug in c-define-type fixed 2 days ago.</div><br><div class="gmail_quote">2009/10/5 Martin DeMello <span dir="ltr"><<a href="mailto:martindemello@gmail.com">martindemello@gmail.com</a>></span><br>
<div><br></div><div>..<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Now I'm trying to convert just this one file to blackhole, loading<br>
sdl-interface and sdl-ttf as external dependencies. After going<br>
through the blackhole docs, I tried the following:<br>
<br>
(load "~~/lib/modules/build")<br></blockquote><div><br></div><div>Move this out of your module files.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

(compile-options force-compile: #t<br>
                 cc-options: "-I/usr/include/SDL/"<br>
                 ld-options: "-L/usr/lib -lSDL -lSDL_ttf")<br></blockquote><div><br></div><div>This is to be put in the headers in your module files, i.e. your sdl-interface.scm and sdl-ttf.scm.</div><div>force-compile: #t is, as I understand your case, superflouous - the c-ffi code you have will make BH flip force-compile to #t by itself.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
(import "../src/sdl-interface")<br>
(import "sdl-ttf")<br></blockquote><div><br></div><div>Drop the quotation marks. Also you can group the two into one. I.e.  (import ../src/sdl-interface sdl-ttf)</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
(define (main)<br>
  (SDL::initialize SDL::init-everything)<br>
  (TTF::init)<br>
  (SDL::set-window-caption "Hello World" "Hello World")<br>
  (let* ((screen (SDL::set-video-mode 640 480 32 SDL::swsurface))<br>
         (courier (TTF::open-font "/usr/share/fonts/TTF/cour.ttf" 10))<br>
         (stext (TTF::render-text-solid courier "Hello World" 0 0 255 0)))<br>
    (SDL::BLIT-surface stext 0 0 640 480 screen 0 0 640 480)<br>
    (SDL::flip screen)<br>
    (SDL::Delay 2000)<br>
    (TTF::quit)<br>
    ))<br>
(main) </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
and tried compiling it with<br>
  gsc -exe ttf-sdl.scm<br></blockquote><div><br></div><div>Producing resultant binaries using BH is not intended to be done this way.</div><div><br></div><div>Are you sure that currently, producing binaries is what you really want to do?</div>
<div><br></div><div>Anyhow, BH's functionality to produce binaries is basic currently. Read the "Export binaries" section in the documentation.</div><div><br></div><div>If I get your program right, you have three files: ../src/sdl-interface.scm , sdl-ttf.scm , and an unnamed sourcecode file, whose contents you pasted above. Drop the (load "~~/lib/modules/build") out of the unnamed file, and follow the other instructions above.</div>
<div><br></div><div>Refer to Per for your further questions on producing binaries, if this is what you actually want.</div><div><br></div><div><br></div><div><br></div></div>