[neutron-mc] making shared object from mcstas-r.c, under WinXP
Timur Elzhov
Timur.Elzhov at jinr.ru
Tue Mar 16 16:01:57 CET 2004
Dear McStas experts,
I successfully compiled shared object libmcstas-r.so from mcstas-r.c
file, so now I'm able to compile instruments with --no-runtime option,
and link it with that library. That is all under _Linux_. But, when
I try to do the same under WindowsXP, I get linking error (MinGW compiler
was used):
mcstas> gcc -Wno-unused -fPIC -O2 -c mcstas-r.c
mcstas> gcc --shared -o libmcstas-r.dll mcstas-r.o
C:\WINDOWS\TEMP/ccwVaaaa.o(.text+0x498d):mcstas-r.c: undefined reference to `mcinstrument_source'
C:\WINDOWS\TEMP/ccwVaaaa.o(.text+0x4992):mcstas-r.c: undefined reference to `mcinstrument_name'
C:\WINDOWS\TEMP/ccwVaaaa.o(.text+0x49a1):mcstas-r.c: undefined reference to `mcinputtable'
C:\WINDOWS\TEMP/ccwVaaaa.o(.text+0x49ba):mcstas-r.c: undefined reference to `mcinputtable'
C:\WINDOWS\TEMP/ccwVaaaa.o(.text+0x49d0):mcstas-r.c: undefined reference to `mcinputtable'
C:\WINDOWS\TEMP/ccwVaaaa.o(.text+0x49d9):mcstas-r.c: undefined reference to `mcinputtable'
C:\WINDOWS\TEMP/ccwVaaaa.o(.text+0x49ea):mcstas-r.c: undefined reference to `mcinputtable'
C:\WINDOWS\TEMP/ccwVaaaa.o(.text+0x4a91):mcstas-r.c: more undefined references to `mcinputtable' follow
C:\WINDOWS\TEMP/ccwVaaaa.o(.text+0x4bea):mcstas-r.c: undefined reference to `mcnx'
...
and so on, about 90 lines. Why?
Tnanks a lot,
Timur.
More information about the mcstas-users
mailing list