BZ2 library

stunaep via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Mar 11 22:50:59 PST 2016


On Saturday, 12 March 2016 at 06:07:25 UTC, Mike Parker wrote:
> [...]

I used visual studio 2013 to build the libraries

With dflag -m64 and dub flag --arch=x86_64, this happens


     Running: dub build --arch=x86_64

     ## Warning for package rsdlib ##

     The following compiler flags have been specified in the 
package description
     file. They are handled by DUB and direct use in packages is 
discouraged.
     Alternatively, you can set the DFLAGS environment variable to 
pass custom flags
     to the compiler, or use one of the suggestions below:

     -m64: Use --arch=x86/--arch=x86_64 to specify the target 
architecture

     Performing "debug" build using dmd for x86_64.
     rsdlib ~master: building configuration "application"...
     Linking...
     MSVCRT.lib(MSVCR120.dll) : error LNK2005: exit already 
defined in LIBCMT.lib(crt0dat.obj)
     MSVCRT.lib(MSVCR120.dll) : error LNK2005: free already 
defined in LIBCMT.lib(free.obj)
     MSVCRT.lib(MSVCR120.dll) : error LNK2005: malloc already 
defined in LIBCMT.lib(malloc.obj)
     MSVCRT.lib(MSVCR120.dll) : error LNK2005: __iob_func already 
defined in LIBCMT.lib(_file.obj)
     MSVCRT.lib(MSVCR120.dll) : error LNK2005: fclose already 
defined in LIBCMT.lib(fclose.obj)
     MSVCRT.lib(MSVCR120.dll) : error LNK2005: ferror already 
defined in LIBCMT.lib(feoferr.obj)
     MSVCRT.lib(MSVCR120.dll) : error LNK2005: fflush already 
defined in LIBCMT.lib(fflush.obj)
     MSVCRT.lib(MSVCR120.dll) : error LNK2005: fprintf already 
defined in LIBCMT.lib(fprintf.obj)
     MSVCRT.lib(MSVCR120.dll) : error LNK2005: fread already 
defined in LIBCMT.lib(fread.obj)
     MSVCRT.lib(MSVCR120.dll) : error LNK2005: fwrite already 
defined in LIBCMT.lib(fwrite.obj)
     MSVCRT.lib(MSVCR120.dll) : error LNK2005: ungetc already 
defined in LIBCMT.lib(ungetc.obj)
     MSVCRT.lib(MSVCR120.dll) : error LNK2005: isdigit already 
defined in LIBCMT.lib(_ctype.obj)
     MSVCRT.lib(MSVCR120.dll) : error LNK2005: _fdopen already 
defined in LIBCMT.lib(fdopen.obj)
     MSVCRT.lib(MSVCR120.dll) : error LNK2005: _fileno already 
defined in LIBCMT.lib(fileno.obj)
     MSVCRT.lib(MSVCR120.dll) : error LNK2005: _setmode already 
defined in LIBCMT.lib(setmode.obj)
     LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with 
use of other libs; use /NODEFAULTLIB:library
     
.dub\build\application-debug-windows-x86_64-dmd_2070-F2AB32EEAA78A29A3AA6010749D38D4A\rsdlib.exe : fatal error LNK1169: one or more multiply defined symbols found
     --- errorlevel 1169
     dmd failed with exit code 1169.




and with dflag -m32mscoff, this happens

     Performing "debug" build using dmd for x86.
     rsdlib ~master: building configuration "application"...
     Linking...
     rsdlib.obj : error LNK2019: unresolved external symbol 
_BZ2_bzDecompressInit referenced in function     
_D6rsdlib6cache39Container6decodeFC6rsdlib2io10ByteBufferAiZC6rsdlib6cache39Container
     rsdlib.obj : error LNK2019: unresolved external symbol 
_BZ2_bzDecompress referenced in function     
_D6rsdlib6cache39Container6decodeFC6rsdlib2io10ByteBufferAiZC6rsdlib6cache39Container
     rsdlib.obj : error LNK2019: unresolved external symbol 
_BZ2_bzDecompressEnd referenced in function     
_D6rsdlib6cache39Container6decodeFC6rsdlib2io10ByteBufferAiZC6rsdlib6cache39Container
     
.dub\build\application-debug-windows-x86-dmd_2070-E301E842F2B5FA1A3A9D79D8EE34C4E8\rsdlib.exe : fatal error LNK1120: 3 unresolved externals
     --- errorlevel 1120
     dmd failed with exit code 1120.


More information about the Digitalmars-d-learn mailing list