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

Timur Elzhov Timur.Elzhov at jinr.ru
Wed Mar 17 10:20:59 CET 2004


Hello, Kristian.

--
On Tue, Mar 16, 2004 at 09:31:41PM +0100, you wrote:

> I am not 100% sure, but I think you may have run into a Windows
> limitation.
> 
> In Linux, when you load a shared object into a program, the program can
> refer to symbols in the shared object, but the shared object can also
> refer to symbols in the program. I believe you are using this on Linux.
> 
> As far as I know, when a Windows program loads a DLL, the DLL cannot
> refer directly to symbols in the program. Thus when you link the shared
> object, it complains about missing symbols at link time; at this point
> the symbols are not available, since they are not defined until the
> instrument code is compiled and linked.

Well, if I understand you, I could not build shared obbject from the
following code (under Win32):

  exiern int i;
  void f(void)
  {
      i;
  }

right? But MinGW does build DLL successfully from this test!
Or, you mean something else?

> Anyway, perhaps this brings you further. In any case I found it amusing
> to see that soneone is finally finding a use for --no-runtime, a feature
> I have never before seen used but put in originally many years ago just
> because it felt like the rigth thing to do.

Hm, I found this feature very useful, it seems to save a lot of compiling
time, no? :)

--
WBR,
Timur.




More information about the mcstas-users mailing list