<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hello Timur,
<p>you have to compile mcstas-r.c with its mcstas-r.h header file, where
the undefined symbols are defined as 'extern'. Indeed thier value is to
be set in the instrument itself, not in the run-time library.
<br>If the problem persists, send us the full error output so that we see
what undefined symbols should be added as 'extern'.
<p>Emmanuel.
<p>Timur Elzhov wrote:
<blockquote TYPE=CITE>Dear McStas experts,
<p>I successfully compiled shared object libmcstas-r.so from mcstas-r.c
<br>file, so now I'm able to compile instruments with --no-runtime option,
<br>and link it with that library. That is all under _Linux_. But, when
<br>I try to do the same under WindowsXP, I get linking error (MinGW compiler
<br>was used):
<br> mcstas> gcc -Wno-unused -fPIC -O2 -c mcstas-r.c
<br> mcstas> gcc --shared -o libmcstas-r.dll mcstas-r.o
<br> C:\WINDOWS\TEMP/ccwVaaaa.o(.text+0x498d):mcstas-r.c: undefined
reference to `mcinstrument_source'
<br> C:\WINDOWS\TEMP/ccwVaaaa.o(.text+0x4992):mcstas-r.c: undefined
reference to `mcinstrument_name'
<br> C:\WINDOWS\TEMP/ccwVaaaa.o(.text+0x49a1):mcstas-r.c: undefined
reference to `mcinputtable'
<br> C:\WINDOWS\TEMP/ccwVaaaa.o(.text+0x49ba):mcstas-r.c: undefined
reference to `mcinputtable'
<br> C:\WINDOWS\TEMP/ccwVaaaa.o(.text+0x49d0):mcstas-r.c: undefined
reference to `mcinputtable'
<br> C:\WINDOWS\TEMP/ccwVaaaa.o(.text+0x49d9):mcstas-r.c: undefined
reference to `mcinputtable'
<br> C:\WINDOWS\TEMP/ccwVaaaa.o(.text+0x49ea):mcstas-r.c: undefined
reference to `mcinputtable'
<br> C:\WINDOWS\TEMP/ccwVaaaa.o(.text+0x4a91):mcstas-r.c: more undefined
references to `mcinputtable' follow
<br> C:\WINDOWS\TEMP/ccwVaaaa.o(.text+0x4bea):mcstas-r.c: undefined
reference to `mcnx'
<br> ...
<p>and so on, about 90 lines. Why?
<p>Tnanks a lot,
<br>Timur.
<p>_______________________________________________
<br>neutron-mc mailing list
<br>neutron-mc@risoe.dk
<br><a href="http://neutron.risoe.dk/mailman/listinfo/neutron-mc">http://neutron.risoe.dk/mailman/listinfo/neutron-mc</a></blockquote>
<pre>--
What's up Doc ?
--------------------------------------------
Emmanuel FARHI, <A HREF="http://www.ill.fr/Computing/people/Farhi">http://www.ill.fr/Computing/people/Farhi</A> \|/ ____ \|/
CS-Group ILL4/156, Institut Laue-Langevin (ILL) Grenoble ~@-/ oO \-@~
6 rue J. Horowitz, BP 156, 38042 Grenoble Cedex 9,France /_( \__/ )_\
Work :Tel (33/0) 4 76 20 71 35. Fax (33/0) 4 76 20 76 48 \__U_/</pre>
</html>