Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - newbie link error
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 Jul 20 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 Jul 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 Jul 21 2004
|