On 8/15/06, Austin Ziegler <halostatue / gmail.com> wrote:
> On 8/14/06, Max Muermann <ruby / muermann.org> wrote:
> > When compiling native extensions on windows using Visual Studio 2005,
> > loading the resulting library results in an ungly Runtime Error.
>
> How? You don't. Visual Studio 2005 does not produce extensions
> compatible with VC6 output.
>

Did you read the post? It wasn't a question... I am aware there are
incompatibilities,
however I have been able to compile some extensions quite successfully with
VS2005.

One of the problems (which is fixed by the mt.exe call in the OP) is
that the libraries produced by VS2005 are apparently missing some
metainformation.

Another problem I have found through tinkering with Ferret is that in
win32.h fclose() gets redefined to rb_w32_fclose(). rb_w32_fclose does
not work in vs2005-compiled code, it only seems to want to close files
that have been opened with the corresponding rb_open.

However, as Ferret makes extensive use of fseek(), for which there
seems to be no rb_* equivalent, the only way for me to fix this
currently appears to be by undefining fclose() before including
stdio.h. This works perfectly for compiling Ferret.

I tried compiling ruby-debug (works fine) and the rcov extension (no success).

I fact, the current win32 gem for ruby-debug was compiled with VS2005.

Max