Jeff Zaroyko wrote:
Andrew Coppin <andrewcoppin <at> btinternet.com> writes:

Jeff Zaroyko wrote:
In theory, you should be able to use mingw's windres tool to produce
an object file from the resource definition which you'd link with the rest of your program.

Yes, there's a cryptic comment burried away in the GHC manual that says GHC itself already uses windres to embed the manifest file into the compiled binary file. (And sure enough, if you crawl through with a hex editor you'll find the raw XML in there.) There's an option to tell GHC to not do this - however, I don't see any option anywhere to tell it to embed a *different* resource file instead.

All I meant by linking is including the object file when you invoke ghc.

windres foo.rc -o foores.o
ghc bar.hs foo.o

Not sure if that works when using ghc --make, but we'll see.

Actually no, we won't. Because I have just spent about 2 hours trying to get that first command to work. I am now exasperated beyond my powers of description. I made GHC print out all the commands it executes. I cut and pasted the windres command and changed the filenames. windres stubbornly *refuses* to work for me. It complains endlessly about "invalid arguments". (E.g., it claims that "-B" isn't a valid option.) And yet, this is the EXACT command that GHC executed, and it didn't complain for GHC. GRRR!!! >_< I even tried removing the arguments it doesn't like - but then it can't find any of the include files. Basically no matter what I do, I cannot make windres compile anything.

I literally cannot *believe* how hard it is to put a few little words into that version tab... Every other kind of resource seems to be completely trivial, but this just won't work for toffee!

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to