Re: eXene and openGL
brian <briand-/[email protected]>
| Newsgroups | gmane.comp.lang.sml.smlnj |
|---|---|
| Message-ID | <[email protected]> |
> > I'm writing a library (in my very limited spare time ATM) to help with > this. The current idea is to create/generate "fake" (but accurate > enough) libc headers to use with ml[-]nlffigen. Using the lib you'd > invoke ml[-]nlffigen with modified #include paths so that the fake > headers get included instead of the compiler/OS headers. The lib > would > also include a (practically) complete NLFFI interface to libc > including > C side stubs where necessary (the C standard allows for much variation > in implementation techniques (e.g. whether something is implemented as > a macro or not)). > That's an interesting approach. Unfortunately there are a lot of other includes which still break things. For example, MAC has an OSTYPE.h file which causes me problems all the time because it inlines actual function definitions. What I have found in practice is that application of gcc -E | grep | emacs "#if 0 ... #endif" actually gets you to a workable solution rather quickly. Depending on the how the file is set-up it can be portable. The fftw header file I created is portable because it only refers to doubles and the like. I was able to get 80+% of the sdl header done in about 1/2 hour. Interestigly almost all of the fallout is due to the stdio.h definition for FILE ! So I'm all set to experiment with it, except, of course, I can't successfully compile and SDL program on the MAC. :-( Brian ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV