Compile...no...work!

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

lord_nightrose
Posts: 5
Joined: 2003-04-19 17:34
Location: Right Here

Compile...no...work!

Post by lord_nightrose » 2003-04-19 17:37

After following the instructions in compile.txt to the letter (installed the SDK, have my include paths in the right order, etc.), I still get 102 errors when I try to compile DC++ 0.242 . It all starts off with VC++ 6 telling me that it can't find the namespace _STL . Any ideas?
Fnord.

lord_nightrose
Posts: 5
Joined: 2003-04-19 17:34
Location: Right Here

Post by lord_nightrose » 2003-04-19 18:09

Here are the entire contents of my errors:

--------------------Configuration: client - Win32 Debug--------------------
Compiling...
stdinc.cpp
c:\visual studio 6\vc98\include\cstddef(42) : error C2039: 'ptrdiff_t' : is not a member of '`global namespace''
c:\visual studio 6\vc98\include\cstddef(42) : error C2873: 'ptrdiff_t' : symbol cannot be used in a using-declaration
c:\visual studio 6\vc98\include\cstdlib(42) : error C2039: 'div_t' : is not a member of '`global namespace''
c:\visual studio 6\vc98\include\cstdlib(42) : error C2873: 'div_t' : symbol cannot be used in a using-declaration
c:\visual studio 6\vc98\include\cstdlib(43) : error C2039: 'ldiv_t' : is not a member of '`global namespace''
c:\visual studio 6\vc98\include\cstdlib(43) : error C2873: 'ldiv_t' : symbol cannot be used in a using-declaration
c:\visual studio 6\vc98\include\stl\_iterator_base.h(224) : error C2143: syntax error : missing ';' before '*'
c:\visual studio 6\vc98\include\stl\_iterator_base.h(224) : error C2433: 'ptrdiff_t' : 'inline' not permitted on data declarations
c:\visual studio 6\vc98\include\stl\_iterator_base.h(224) : error C2501: 'ptrdiff_t' : missing storage-class or type specifiers
c:\visual studio 6\vc98\include\stl\_iterator_base.h(224) : error C2059: syntax error : ';'
c:\visual studio 6\vc98\include\stl\_iterator_base.h(224) : error C2143: syntax error : missing ',' before '*'
c:\visual studio 6\vc98\include\stl\_iterator_base.h(224) : error C2059: syntax error : '*'
c:\visual studio 6\vc98\include\stl\_iterator_base.h(232) : error C2954: template definitions cannot nest
c:\visual studio 6\vc98\include\stl\_iterator_base.h(317) : error C2143: syntax error : missing ';' before '__cdecl'
c:\visual studio 6\vc98\include\stl\_iterator_base.h(317) : error C2433: 'ptrdiff_t' : 'inline' not permitted on data declarations
c:\visual studio 6\vc98\include\stl\_iterator_base.h(317) : error C2501: 'ptrdiff_t' : missing storage-class or type specifiers
c:\visual studio 6\vc98\include\stl\_iterator_base.h(317) : error C2086: 'ptrdiff_t' : redefinition
c:\visual studio 6\vc98\include\stl\_iterator_base.h(317) : error C2059: syntax error : ';'
c:\visual studio 6\vc98\include\stl\_iterator_base.h(318) : error C2143: syntax error : missing ',' before '&'
c:\visual studio 6\vc98\include\stl\_iterator_base.h(318) : error C2059: syntax error : '&'
c:\visual studio 6\vc98\include\stl\_iterator_base.h(355) : error C2954: template definitions cannot nest
c:\visual studio 6\vc98\include\stl\_iterator_base.h(356) : error C2143: syntax error : missing ';' before '__cdecl'
c:\visual studio 6\vc98\include\stl\_iterator_base.h(356) : error C2433: 'ptrdiff_t' : 'inline' not permitted on data declarations
c:\visual studio 6\vc98\include\stl\_iterator_base.h(356) : error C2501: 'ptrdiff_t' : missing storage-class or type specifiers
c:\visual studio 6\vc98\include\stl\_iterator_base.h(356) : error C2086: 'ptrdiff_t' : redefinition
c:\visual studio 6\vc98\include\stl\_iterator_base.h(356) : error C2059: syntax error : ';'
c:\visual studio 6\vc98\include\stl\_iterator_base.h(357) : error C2143: syntax error : missing ',' before '&'
c:\visual studio 6\vc98\include\stl\_iterator_base.h(357) : error C2059: syntax error : '&'
c:\visual studio 6\vc98\include\stl\_iterator_base.h(362) : error C2954: template definitions cannot nest
c:\visual studio 6\vc98\include\stl\_iterator_base.h(363) : error C2143: syntax error : missing ';' before '__cdecl'
c:\visual studio 6\vc98\include\stl\_iterator_base.h(363) : error C2433: 'ptrdiff_t' : 'inline' not permitted on data declarations
c:\visual studio 6\vc98\include\stl\_iterator_base.h(363) : error C2501: 'ptrdiff_t' : missing storage-class or type specifiers
c:\visual studio 6\vc98\include\stl\_iterator_base.h(363) : error C2086: 'ptrdiff_t' : redefinition
c:\visual studio 6\vc98\include\stl\_iterator_base.h(363) : error C2059: syntax error : ';'
c:\visual studio 6\vc98\include\stl\_iterator_base.h(364) : error C2143: syntax error : missing ',' before '&'
c:\visual studio 6\vc98\include\stl\_iterator_base.h(364) : error C2059: syntax error : '&'
c:\visual studio 6\vc98\include\stl\_iterator_base.h(370) : error C2954: template definitions cannot nest
c:\visual studio 6\vc98\include\stl\_algobase.h(183) : error C2146: syntax error : missing ';' before identifier '_Num'
c:\visual studio 6\vc98\include\stl\_algobase.h(183) : error C2734: 'ptrdiff_t' : const object must be initialized if not extern
c:\visual studio 6\vc98\include\stl\_algobase.h(183) : error C2065: '_Num' : undeclared identifier
c:\visual studio 6\vc98\include\stl\_algobase.h(493) : error C2146: syntax error : missing ';' before identifier '__len1'
c:\visual studio 6\vc98\include\stl\_algobase.h(493) : error C2734: 'ptrdiff_t' : const object must be initialized if not extern
c:\visual studio 6\vc98\include\stl\_algobase.h(493) : error C2065: '__len1' : undeclared identifier
c:\visual studio 6\vc98\include\stl\_algobase.h(494) : error C2146: syntax error : missing ';' before identifier '__len2'
c:\visual studio 6\vc98\include\stl\_algobase.h(494) : error C2734: 'ptrdiff_t' : const object must be initialized if not extern
c:\visual studio 6\vc98\include\stl\_algobase.h(494) : error C2086: 'ptrdiff_t' : redefinition
c:\visual studio 6\vc98\include\stl\_algobase.h(494) : error C2065: '__len2' : undeclared identifier
c:\visual studio 6\vc98\include\stl\_algobase.h(524) : error C2146: syntax error : missing ';' before identifier 'count'
c:\visual studio 6\vc98\include\stl\_algobase.h(524) : error C2433: 'ptrdiff_t' : 'inline' not permitted on data declarations
c:\visual studio 6\vc98\include\stl\_algobase.h(524) : error C2501: 'ptrdiff_t' : missing storage-class or type specifiers
c:\visual studio 6\vc98\include\stl\_algobase.h(524) : error C2086: 'ptrdiff_t' : redefinition
c:\visual studio 6\vc98\include\stl\_algobase.h(524) : error C2059: syntax error : ';'
c:\visual studio 6\vc98\include\stl\_algobase.h(524) : error C2065: '_InputIter' : undeclared identifier
c:\visual studio 6\vc98\include\stl\_algobase.h(524) : error C2146: syntax error : missing ')' before identifier '__first'
c:\visual studio 6\vc98\include\stl\_algobase.h(524) : error C2501: 'count' : missing storage-class or type specifiers
c:\visual studio 6\vc98\include\stl\_algobase.h(524) : error C2059: syntax error : ')'
c:\visual studio 6\vc98\include\stl\_algobase.h(536) : error C2954: template definitions cannot nest
c:\visual studio 6\vc98\include\new(58) : error C2039: 'bad_alloc' : is not a member of 'std'
c:\visual studio 6\vc98\include\new(58) : error C2873: 'bad_alloc' : symbol cannot be used in a using-declaration
c:\visual studio 6\vc98\include\new(59) : error C2039: 'nothrow_t' : is not a member of 'std'
c:\visual studio 6\vc98\include\new(59) : error C2873: 'nothrow_t' : symbol cannot be used in a using-declaration
c:\visual studio 6\vc98\include\new(60) : error C2039: 'nothrow' : is not a member of 'std'
c:\visual studio 6\vc98\include\new(60) : error C2873: 'nothrow' : symbol cannot be used in a using-declaration
c:\visual studio 6\vc98\include\new(63) : error C2039: 'new_handler' : is not a member of '`global namespace''
c:\visual studio 6\vc98\include\new(63) : error C2873: 'new_handler' : symbol cannot be used in a using-declaration
c:\visual studio 6\vc98\include\new(64) : error C2039: 'set_new_handler' : is not a member of '`global namespace''
c:\visual studio 6\vc98\include\new(64) : error C2873: 'set_new_handler' : symbol cannot be used in a using-declaration
c:\visual studio 6\vc98\include\stl\_tempbuf.h(46) : error C2974: 'pair' : invalid template argument for '_T2', type expected
c:\visual studio 6\vc98\include\stl\_pair.h(57) : see declaration of 'pair'
c:\visual studio 6\vc98\include\stl\_tempbuf.h(47) : error C2061: syntax error : identifier 'ptrdiff_t'
c:\visual studio 6\vc98\include\stl\_tempbuf.h(52) : error C2974: 'pair' : invalid template argument for '_T2', type expected
c:\visual studio 6\vc98\include\stl\_pair.h(57) : see declaration of 'pair'
c:\visual studio 6\vc98\include\stl\_tempbuf.h(52) : error C2061: syntax error : identifier 'ptrdiff_t'
c:\visual studio 6\vc98\include\stl\_tempbuf.h(63) : error C2974: 'pair' : invalid template argument for '_T2', type expected
c:\visual studio 6\vc98\include\stl\_pair.h(57) : see declaration of 'pair'
c:\visual studio 6\vc98\include\stl\_tempbuf.h(64) : error C2061: syntax error : identifier 'ptrdiff_t'
c:\visual studio 6\vc98\include\stl\_tempbuf.h(66) : error C2995: 'get_temporary_buffer' : template function has already been defined
c:\visual studio 6\vc98\include\stl\_tempbuf.h(52) : see declaration of 'get_temporary_buffer'
c:\visual studio 6\vc98\include\stl\_tempbuf.h(79) : error C2146: syntax error : missing ';' before identifier '_M_original_len'
c:\visual studio 6\vc98\include\stl\_tempbuf.h(134) : see reference to class template instantiation '_STL::_Temporary_buffer<_ForwardIterator,_Tp>' being compiled
c:\visual studio 6\vc98\include\stl\_tempbuf.h(79) : error C2501: 'ptrdiff_t' : missing storage-class or type specifiers
c:\visual studio 6\vc98\include\stl\_tempbuf.h(134) : see reference to class template instantiation '_STL::_Temporary_buffer<_ForwardIterator,_Tp>' being compiled
c:\visual studio 6\vc98\include\stl\_tempbuf.h(79) : error C2501: '_M_original_len' : missing storage-class or type specifiers
c:\visual studio 6\vc98\include\stl\_tempbuf.h(134) : see reference to class template instantiation '_STL::_Temporary_buffer<_ForwardIterator,_Tp>' being compiled
c:\visual studio 6\vc98\include\stl\_tempbuf.h(80) : error C2146: syntax error : missing ';' before identifier '_M_len'
c:\visual studio 6\vc98\include\stl\_tempbuf.h(134) : see reference to class template instantiation '_STL::_Temporary_buffer<_ForwardIterator,_Tp>' being compiled
c:\visual studio 6\vc98\include\stl\_tempbuf.h(80) : error C2501: 'ptrdiff_t' : missing storage-class or type specifiers
c:\visual studio 6\vc98\include\stl\_tempbuf.h(134) : see reference to class template instantiation '_STL::_Temporary_buffer<_ForwardIterator,_Tp>' being compiled
c:\visual studio 6\vc98\include\stl\_tempbuf.h(80) : error C2501: '_M_len' : missing storage-class or type specifiers
c:\visual studio 6\vc98\include\stl\_tempbuf.h(134) : see reference to class template instantiation '_STL::_Temporary_buffer<_ForwardIterator,_Tp>' being compiled
c:\visual studio 6\vc98\include\stl\_tempbuf.h(104) : error C2146: syntax error : missing ';' before identifier 'size'
c:\visual studio 6\vc98\include\stl\_tempbuf.h(134) : see reference to class template instantiation '_STL::_Temporary_buffer<_ForwardIterator,_Tp>' being compiled
c:\visual studio 6\vc98\include\stl\_tempbuf.h(104) : error C2501: 'ptrdiff_t' : missing storage-class or type specifiers
c:\visual studio 6\vc98\include\stl\_tempbuf.h(134) : see reference to class template instantiation '_STL::_Temporary_buffer<_ForwardIterator,_Tp>' being compiled
c:\visual studio 6\vc98\include\stl\_tempbuf.h(104) : warning C4183: 'size': member function definition looks like a ctor, but name does not match enclosing class
c:\visual studio 6\vc98\include\stl\_tempbuf.h(134) : see reference to class template instantiation '_STL::_Temporary_buffer<_ForwardIterator,_Tp>' being compiled
c:\visual studio 6\vc98\include\stl\_tempbuf.h(105) : error C2146: syntax error : missing ';' before identifier 'requested_size'
c:\visual studio 6\vc98\include\stl\_tempbuf.h(134) : see reference to class template instantiation '_STL::_Temporary_buffer<_ForwardIterator,_Tp>' being compiled
c:\visual studio 6\vc98\include\stl\_tempbuf.h(105) : error C2501: 'ptrdiff_t' : missing storage-class or type specifiers
c:\visual studio 6\vc98\include\stl\_tempbuf.h(134) : see reference to class template instantiation '_STL::_Temporary_buffer<_ForwardIterator,_Tp>' being compiled
c:\visual studio 6\vc98\include\stl\_tempbuf.h(105) : warning C4183: 'requested_size': member function definition looks like a ctor, but name does not match enclosing class
c:\visual studio 6\vc98\include\stl\_tempbuf.h(134) : see reference to class template instantiation '_STL::_Temporary_buffer<_ForwardIterator,_Tp>' being compiled
c:\visual studio 6\vc98\include\stl\_tempbuf.c(32) : error C2974: 'pair' : invalid template argument for '_T2', type expected
c:\visual studio 6\vc98\include\stl\_pair.h(57) : see declaration of 'pair'
c:\visual studio 6\vc98\include\stl\_tempbuf.c(33) : error C2061: syntax error : identifier 'ptrdiff_t'
c:\visual studio 6\vc98\include\stl\_algo.h(72) : error C2146: syntax error : missing ';' before identifier 'count_if'
c:\visual studio 6\vc98\include\stl\_algo.h(72) : error C2433: 'ptrdiff_t' : 'inline' not permitted on data declarations
c:\visual studio 6\vc98\include\stl\_algo.h(72) : error C2501: 'ptrdiff_t' : missing storage-class or type specifiers
c:\visual studio 6\vc98\include\stl\_algo.h(72) : error C2086: 'ptrdiff_t' : redefinition
c:\visual studio 6\vc98\include\stl\_algo.h(72) : error C2059: syntax error : ';'
c:\visual studio 6\vc98\include\stl\_algo.h(72) : error C2146: syntax error : missing ')' before identifier '__first'
c:\visual studio 6\vc98\include\stl\_algo.h(72) : error C2501: 'count_if' : missing storage-class or type specifiers
c:\visual studio 6\vc98\include\stl\_algo.h(72) : error C2059: syntax error : ')'
c:\visual studio 6\vc98\include\stl\_algo.h(84) : error C2143: syntax error : missing ';' before '{'
c:\visual studio 6\vc98\include\stl\_algo.h(84) : error C2447: missing function header (old-style formal list?)
c:\visual studio 6\vc98\include\stl\_algo.h(97) : error C2954: template definitions cannot nest
c:\visual studio 6\vc98\include\stl\_algo.h(121) : error C2373: 'count' : redefinition; different type modifiers
c:\visual studio 6\vc98\include\stl\_algobase.h(524) : see declaration of 'count'
c:\visual studio 6\vc98\include\stl\_algo.h(130) : error C2373: 'count_if' : redefinition; different type modifiers
c:\visual studio 6\vc98\include\stl\_algo.h(72) : see declaration of 'count_if'
c:\visual studio 6\vc98\include\stl\_alloc.h(339) : error C2146: syntax error : missing ';' before identifier 'difference_type'
c:\visual studio 6\vc98\include\stl\_alloc.h(371) : see reference to class template instantiation '_STL::allocator<_Tp>' being compiled
c:\visual studio 6\vc98\include\stl\_alloc.h(339) : error C2501: 'difference_type' : missing storage-class or type specifiers
c:\visual studio 6\vc98\include\stl\_alloc.h(371) : see reference to class template instantiation '_STL::allocator<_Tp>' being compiled
c:\visual studio 6\vc98\include\stl\_alloc.h(339) : fatal error C1003: error count exceeds 100; stopping compilation
c:\visual studio 6\vc98\include\stl\_alloc.h(371) : see reference to class template instantiation '_STL::allocator<_Tp>' being compiled
Error executing cl.exe.

DCPlusPlus.exe - 102 error(s), 2 warning(s)
Fnord.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-08 02:46
Location: .pa.us

Re: Compile...no...work!

Post by GargoyleMT » 2003-04-19 23:14

lord_nightrose wrote:I have my include paths in the right order


Sorry, but are you sure?

Your errors quote this line:
c:\visual studio 6\vc98\include\stl\_iterator_base.h

It seems to be likely that VS6 isn't looking in the proper location for the stl library.

lord_nightrose
Posts: 5
Joined: 2003-04-19 17:34
Location: Right Here

Post by lord_nightrose » 2003-04-21 03:50

This is what I have:
Image
Fnord.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-08 02:46
Location: .pa.us

Post by GargoyleMT » 2003-04-21 13:13

Well, if K:\DCPPSRC\STLPORT\ contains the file "algorithm", etc. (vs. another "stlport" subdirectory) then my hunch is probably wrong.

lord_nightrose
Posts: 5
Joined: 2003-04-19 17:34
Location: Right Here

Post by lord_nightrose » 2003-05-04 06:21

Yeah, it contains 'algorithm', 'bitset', etc.
Fnord.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-08 02:46
Location: .pa.us

ah voodoo.

Post by GargoyleMT » 2003-05-04 15:08

Ah, excellent, looks like you've followed all the right steps, and yet Visual Studio is still using the wrong STL includes. I guess you could use the ugly hack of putting in full path names to stlport into stdinc.h. Or maybe you could modify the projects to list the stlport as an additional include directory... maybe that will force it to the top of the list, as it appears to be right now.

*shrugs*

Who is online

Users browsing this forum: Google [Bot] and 0 guests