Thread overview
newbie link error
Jul 21, 2004
Florian RIVOAL
Jul 21, 2004
Jan Knepper
Jul 21, 2004
Scott Michel
July 21, 2004
I use dmc 8.40 with stlport 1.7.1 to compile a program of mine.
The same program used to compile without problem with microsoft visual studtio 7
c++ compiler, but for various reasons, i decided to used dmc instead. Now I get
some error message at link time. I guess it is something trivial, but the error
message simply do not make sense to me.

here is a copy of the console, so if any body could tell me what i missed, i'd be grateful

C:\IR\source>dmc test.cpp Corpus.cpp Document.cpp Query.cpp TextProcessor.cpp
test.cpp:
Corpus.cpp:
Document.cpp:
Query.cpp:
TextProcessor.cpp:
link test+Corpus+Document+Query+TextProcessor,,,user32+kernel32/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

Corpus.obj(Corpus)  Offset 0011AH Record Type 0091
Error 1: Previous Definition Different :
?separators@@3V?$basic_string@std@DV?$char_traits@std@D@1@V?$allocator@std@D@1@
(allocator<>::d::D::basic_string<>::far const
basic_string<>::d::DV?$char_traits::std::D::basic_string<> separators)
Document.obj(Document)  Offset 00118H Record Type 0091
Error 1: Previous Definition Different :
?separators@@3V?$basic_string@std@DV?$char_traits@std@D@1@V?$allocator@std@D@1@
(allocator<>::d::D::basic_string<>::far const
basic_string<>::d::DV?$char_traits::std::D::basic_string<> separators)
Query.obj(Query)  Offset 00112H Record Type 0091
Error 1: Previous Definition Different :
?separators@@3V?$basic_string@std@DV?$char_traits@std@D@1@V?$allocator@std@D@1@
(allocator<>::d::D::basic_string<>::far const
basic_string<>::d::DV?$char_traits::std::D::basic_string<> separators)
TextProcessor.obj(TextProcessor)  Offset 00101H Record Type 0091
Error 1: Previous Definition Different :
?separators@@3V?$basic_string@std@DV?$char_traits@std@D@1@V?$allocator@std@D@1@
(allocator<>::d::D::basic_string<>::far const
basic_string<>::d::DV?$char_traits::std::D::basic_string<> separators)
stlp45dm_debug_static.lib
Warning 2: File Not Found stlp45dm_debug_static.lib

--- errorlevel 4


July 21, 2004
"Error 1: Previous Definition Different :" sometimes is kinda misleading. It basically means that you have more than one definition for the same thing. I am guessing that you have something in an header file which is being compiled in to all the .obj which causes duplication at link time.

HTH
Jan



Florian RIVOAL wrote:
> I use dmc 8.40 with stlport 1.7.1 to compile a program of mine.
> The same program used to compile without problem with microsoft visual studtio 7
> c++ compiler, but for various reasons, i decided to used dmc instead. Now I get
> some error message at link time. I guess it is something trivial, but the error
> message simply do not make sense to me.
> 
> here is a copy of the console, so if any body could tell me what i missed, i'd
> be grateful
> 
> C:\IR\source>dmc test.cpp Corpus.cpp Document.cpp Query.cpp TextProcessor.cpp
> test.cpp:
> Corpus.cpp:
> Document.cpp:
> Query.cpp:
> TextProcessor.cpp:
> link test+Corpus+Document+Query+TextProcessor,,,user32+kernel32/noi;
> OPTLINK (R) for Win32  Release 7.50B1
> Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved
> 
> Corpus.obj(Corpus)  Offset 0011AH Record Type 0091
> Error 1: Previous Definition Different :
> ?separators@@3V?$basic_string@std@DV?$char_traits@std@D@1@V?$allocator@std@D@1@
> (allocator<>::d::D::basic_string<>::far const
> basic_string<>::d::DV?$char_traits::std::D::basic_string<> separators)
> Document.obj(Document)  Offset 00118H Record Type 0091
> Error 1: Previous Definition Different :
> ?separators@@3V?$basic_string@std@DV?$char_traits@std@D@1@V?$allocator@std@D@1@
> (allocator<>::d::D::basic_string<>::far const
> basic_string<>::d::DV?$char_traits::std::D::basic_string<> separators)
> Query.obj(Query)  Offset 00112H Record Type 0091
> Error 1: Previous Definition Different :
> ?separators@@3V?$basic_string@std@DV?$char_traits@std@D@1@V?$allocator@std@D@1@
> (allocator<>::d::D::basic_string<>::far const
> basic_string<>::d::DV?$char_traits::std::D::basic_string<> separators)
> TextProcessor.obj(TextProcessor)  Offset 00101H Record Type 0091
> Error 1: Previous Definition Different :
> ?separators@@3V?$basic_string@std@DV?$char_traits@std@D@1@V?$allocator@std@D@1@
> (allocator<>::d::D::basic_string<>::far const
> basic_string<>::d::DV?$char_traits::std::D::basic_string<> separators)
> stlp45dm_debug_static.lib
> Warning 2: File Not Found stlp45dm_debug_static.lib
> 
> --- errorlevel 4
> 
> 


-- 
ManiaC++
Jan Knepper

But as for me and my household, we shall use Mozilla...
www.mozilla.org
July 21, 2004
You might want to tell DMC the explicit name of the STLport library you intend to link with, e.g., stlport_debug_lib.lib. Otherwise, DMC makes other assumptions about what STLport library you really want.


Florian RIVOAL wrote:
> I use dmc 8.40 with stlport 1.7.1 to compile a program of mine.
> The same program used to compile without problem with microsoft visual studtio 7
> c++ compiler, but for various reasons, i decided to used dmc instead. Now I get
> some error message at link time. I guess it is something trivial, but the error
> message simply do not make sense to me.
> 
> here is a copy of the console, so if any body could tell me what i missed, i'd
> be grateful
> 
> C:\IR\source>dmc test.cpp Corpus.cpp Document.cpp Query.cpp TextProcessor.cpp
> test.cpp:
> Corpus.cpp:
> Document.cpp:
> Query.cpp:
> TextProcessor.cpp:
> link test+Corpus+Document+Query+TextProcessor,,,user32+kernel32/noi;
> OPTLINK (R) for Win32  Release 7.50B1
> Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved
> 
> Corpus.obj(Corpus)  Offset 0011AH Record Type 0091
> Error 1: Previous Definition Different :
> ?separators@@3V?$basic_string@std@DV?$char_traits@std@D@1@V?$allocator@std@D@1@
> (allocator<>::d::D::basic_string<>::far const
> basic_string<>::d::DV?$char_traits::std::D::basic_string<> separators)
> Document.obj(Document)  Offset 00118H Record Type 0091
> Error 1: Previous Definition Different :
> ?separators@@3V?$basic_string@std@DV?$char_traits@std@D@1@V?$allocator@std@D@1@
> (allocator<>::d::D::basic_string<>::far const
> basic_string<>::d::DV?$char_traits::std::D::basic_string<> separators)
> Query.obj(Query)  Offset 00112H Record Type 0091
> Error 1: Previous Definition Different :
> ?separators@@3V?$basic_string@std@DV?$char_traits@std@D@1@V?$allocator@std@D@1@
> (allocator<>::d::D::basic_string<>::far const
> basic_string<>::d::DV?$char_traits::std::D::basic_string<> separators)
> TextProcessor.obj(TextProcessor)  Offset 00101H Record Type 0091
> Error 1: Previous Definition Different :
> ?separators@@3V?$basic_string@std@DV?$char_traits@std@D@1@V?$allocator@std@D@1@
> (allocator<>::d::D::basic_string<>::far const
> basic_string<>::d::DV?$char_traits::std::D::basic_string<> separators)
> stlp45dm_debug_static.lib
> Warning 2: File Not Found stlp45dm_debug_static.lib
> 
> --- errorlevel 4
> 
>