www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Link Error with SNN.lib

reply Frank Benoit <keinfarbton googlemail.com> writes:
While compiling with DMD on windows, i got this:

OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

C:\Programme\dmd\dm\bin\..\lib\SNN.lib(fputwc)  Offset 09AF4H Record
Type 00C3
 Error 1: Previous Definition Different : _putwc
C:\Programme\dmd\dm\bin\..\lib\SNN.lib(fgetwc)  Offset 093A3H Record
Type 00C3
 Error 1: Previous Definition Different : _getwc
--- errorlevel 2
Command C:\Programme\dsss\bin\rebuild.exe returned with code -1, aborting.

What does it mean?
What is SNN.lib?
How can I get it linking?

Frank
May 05 2007
parent reply Frits van Bommel <fvbommel REMwOVExCAPSs.nl> writes:
Frank Benoit wrote:
 While compiling with DMD on windows, i got this:
 
 OPTLINK (R) for Win32  Release 7.50B1
 Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved
 
 C:\Programme\dmd\dm\bin\..\lib\SNN.lib(fputwc)  Offset 09AF4H Record
 Type 00C3
  Error 1: Previous Definition Different : _putwc
 C:\Programme\dmd\dm\bin\..\lib\SNN.lib(fgetwc)  Offset 093A3H Record
 Type 00C3
  Error 1: Previous Definition Different : _getwc
 --- errorlevel 2
 Command C:\Programme\dsss\bin\rebuild.exe returned with code -1, aborting.
 
 What does it mean?

It means some functions in the standard C library are defined multiple times.
 What is SNN.lib?

The standard C library used by the Digital Mars compilers.
 How can I get it linking?

See if you define extern(C) functions "putwc" and "getwc" anywhere in your program, and rename them if so. That's my guess, anyway.
May 06 2007
parent Frank Benoit <keinfarbton googlemail.com> writes:
 See if you define extern(C) functions "putwc" and "getwc" anywhere in
 your program, and rename them if so.
 
 
 That's my guess, anyway.

hm, i use tango, tangobos on windows. tango has this: extern (D) wint_t putwc(wchar_t c, FILE* stream); tangobos has this: extern (C) wchar_t putwc(wchar_t c, FILE *fp); commenting this out in tangobos solved it. Thanks
May 06 2007