[Ecls-list] ecl-0.9e msvc 7.1 linker error (windows).

Valery Syssik syssik at mail.ru
Thu Jan 20 07:58:21 UTC 2005


Good evening, Giuseppe Attardi.
Tanks for maintenance and support ECL!

Good evening, all list subscribers.

I try to build ECL (ecl-0.9e-fix-1.tgz.gz)
under MSVC 7.1 (VS.NET 2003) on my Windows 2000 box today.

Linking failed twice on "ecl_min.exe" and "ecl.dll",
because there is a mixture of libc and libcd (debug)
libraries used inside *.obj files.

nmake -f Makefile.msvc6 >out1 2>out2
"out1" file:
-----
#At first used "/ML" (Single-Threaded) compiler option.
echo > msvc-build
cl -c /nologo /ML /W3 /GX /I "." /I ..\..\src\gmp /I "..\..\src\gmp\mpn\generic" /D "WIN32" /D "NDEBUG" /D "_LIB" /D "_WIN32" /D "_MBCS" /Fompn\generic\add.obj ..\..\src\gmp\mpn\generic\add.c
---

-----
#In "gc" directory used "/MLd" (Debug Single-Threaded) compiler option.

 cd gc
 nmake -f Makefile.msvc6 gc.lib
 cl -Zi -Od -DDEBUG -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -D_X86_=1  -DWIN32 -D_WIN32 -W3 -D_WINNT -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0500 -DWINVER=0x0500  -MLd -I..\..\src\gc\include -DSILENT -DALL_INTERIOR_POINTERS -D__STDC__ -DGC_NOT_DLL ..\..\src\gc\alloc.c /Foalloc.objalloc.c
(cinit.obj /DEFAULTLIB:"LIBC")

---
Then any run-time library option skipped (compiler’s default action: /ML)

h:\src\ecl-0.9e-libc\src\c\list.d(329) : warning C4715: 'nth' : not all control paths return a value
        cl -c -Zi -I./ -I..\..\src\c -I..\..\src\h -I../h -I..\..\src/gc/include -DHAVE_ISATTY -o apply.obj apply.c
apply.c

----
Finish (error: multiply defined symbols ):

cl -Zi /Feecl_min.exe cinit.obj c\all_symbols.obj eclmin.lib eclgc.lib eclgmp.lib user32.lib ws2_32.li
Microsoft (R) Incremental Linker Version 7.10.3077
Copyright (C) Microsoft Corporation.  All rights reserved.

/debug
/out:ecl_min.exe
cinit.obj
c\all_symbols.obj
eclmin.lib
eclgc.lib
eclgmp.lib
user32.lib
ws2_32.lib
LIBCD.lib(dbgheap.obj) : error LNK2005: _malloc already defined in LIBC.lib(malloc.obj)
LIBCD.lib(dbgheap.obj) : error LNK2005: __nh_malloc already defined in LIBC.lib(malloc.obj)
LIBCD.lib(dbgheap.obj) : error LNK2005: __heap_alloc already defined in LIBC.lib(malloc.obj)
LIBCD.lib(dbgheap.obj) : error LNK2005: _calloc already defined in LIBC.lib(calloc.obj)
LIBCD.lib(dbgheap.obj) : error LNK2005: _realloc already defined in LIBC.lib(realloc.obj)
LIBCD.lib(dbgheap.obj) : error LNK2005: _free already defined in LIBC.lib(free.obj)
LIBCD.lib(dbgheap.obj) : error LNK2005: __msize already defined in LIBC.lib(msize.obj)
LIBCD.lib(sbheap.obj) : error LNK2005: __get_sbh_threshold already defined in LIBC.lib(sbheap.obj)
LIBCD.lib(sbheap.obj) : error LNK2005: __set_sbh_threshold already defined in LIBC.lib(sbheap.obj)
LIBCD.lib(sbheap.obj) : error LNK2005: ___sbh_heap_init already defined in LIBC.lib(sbheap.obj)
LIBCD.lib(sbheap.obj) : error LNK2005: ___sbh_find_block already defined in LIBC.lib(sbheap.obj)
LIBCD.lib(sbheap.obj) : error LNK2005: ___sbh_free_block already defined in LIBC.lib(sbheap.obj)
LIBCD.lib(sbheap.obj) : error LNK2005: ___sbh_alloc_block already defined in LIBC.lib(sbheap.obj)
LIBCD.lib(sbheap.obj) : error LNK2005: ___sbh_alloc_new_region already defined in LIBC.lib(sbheap.obj)
LIBCD.lib(sbheap.obj) : error LNK2005: ___sbh_alloc_new_group already defined in LIBC.lib(sbheap.obj)
LIBCD.lib(sbheap.obj) : error LNK2005: ___sbh_resize_block already defined in LIBC.lib(sbheap.obj)
LIBCD.lib(sbheap.obj) : error LNK2005: ___sbh_heapmin already defined in LIBC.lib(sbheap.obj)
LIBCD.lib(sbheap.obj) : error LNK2005: ___sbh_heap_check already defined in LIBC.lib(sbheap.obj)
LINK : warning LNK4098: defaultlib 'LIBCD' conflicts with use of other libs; use /NODEFAULTLIB:library
ecl_min.exe : fatal error LNK1169: one or more multiply defined symbols found


I linked it manually via command line
cl -Zi /Feecl_min.exe cinit.obj c\all_symbols.obj eclmin.lib eclgc.lib eclgmp.lib user32.lib ws2_32.lib /link "/NODEFAULTLIB:libc"

cl -Zi -Fe"ecl.dll" "c/main.obj" "c/all_symbols2.obj" "lsp.lib" "eclmin.lib"  /LD /link /LIBPATH:"H:/src/ecl-0.9e/msvc/" eclgmp.lib eclgc.lib user32.lib ws2_32.lib /DEF:ecl.def /link /NODEFAULTLIB:libc"


Can anybody (please) explain what version of C run-time should be used,
and how to fix this problem correctly.

The second question is:
What does it mean:  "Threads were broken with latest
improvements." (http://ecls.sourceforge.net/news.html)?

Can ECL used in MT program with POSIX threads (Solaris) and
Windows threads?

Best regards,
Valery Syssik.










More information about the ecl-devel mailing list