[neutron-mc] making shared object from mcstas-r.c, under WinXP

Timur Elzhov Timur.Elzhov at jinr.ru
Wed Mar 17 14:30:07 CET 2004


On Wed, Mar 17, 2004 at 10:38:13AM +0100, Kristian Nielsen wrote:

>>  right? But MinGW does build DLL successfully from this test!
>>  Or, you mean something else?
> 
> Well, it could be that the compiler is optimizing away the reference to
> i. That could be settled by trying this code as a DLL instead:
> 
>     #include <stdio.h>
>     extern int i;
>     void f(void) {
>         printf("%d\n", i);
>     }
> 
> If that compiles, then my guess about Windows DLL restrictions is plain
> wrong (I am no expert in Windows anyway).

It couldn't compile that, it complied about linking error, too. Thank you! :)

--
WBR,
Timur.




More information about the mcstas-users mailing list