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++ - Ambiguous reference to symbol
Walter, I am getting the following error messages when compiling my STLport4.0 tests. I am using version 8.1f.8n of the compiler. Is there any additional information you need to track this problem down? This may be related to the STLport4.0 IO streams problem reported by 'Christof Meerwald'. I know I have had my tests compiling for one of the previous 8.1f.XX releases. Regards, Damian D:\CVS\STL\port\test>smake SMAKE Program Maintenance Utility (Console) Version 7.50 Copyright (c) 1994-1995 Innovative Data Concepts Incorporated Copyright (c) 1994-2001 Digital Mars All Rights Reserved REM Output to . d:\CVS\STL\port\test\SCPPn.exe -mn -C -WA -S -5 -a8 -c -gf -D_CONSOLE=1 -ID:\CVS\STL\port\stlport -oregression\string1.obj regression\string1.cpp test3 const int __result = memcmp(__first1, __first2, min(__len1, __len2)); ^ D:\CVS\STL\port\stlport\stl/_algobase.h(629) : Error: ambiguous reference to symbol Had: memcmp(void const *,void const *,unsigned ) and: memcmp(void const *,void const *,unsigned ) test3 const int __result = memcmp(__first1, __first2, min(__len1, __len2)); ^ D:\CVS\STL\port\stlport\stl/_algobase.h(660) : Error: ambiguous reference to symbol Had: memcmp(void const *,void const *,unsigned ) and: memcmp(void const *,void const *,unsigned ) test3 memmove(__result, __first, __last - __first); ^ D:\CVS\STL\port\stlport\stl/_uninitialized.h(104) : Error: ambiguous reference to symbol Had: memmove(void *,void const *,unsigned ) and: memmove(void *,void const *,unsigned ) test3 memcpy(pptr_, _s, _n); ^ d:\DM\bin\..\mfc\include\../../include/iostream.h(391) : Error: ambiguous reference to symbol Had: memcpy(void *,void const *,unsigned ) and: memcpy(void *,void const *,unsigned ) test3 memcpy(_s, gptr_, _n); ^ d:\DM\bin\..\mfc\include\../../include/iostream.h(399) : Error: ambiguous reference to symbol Fatal error: too many errors SMAKE fatal error: command "d:\CVS\STL\port\test\SCPPn.exe" returned with error code 1 Stopping. Oct 17 2001
Please send me the source that generates this. -Walter Damian wrote in message <3BCD9F29.1040006 netscape.net>...Walter, I am getting the following error messages when compiling my STLport4.0 tests. I am using version 8.1f.8n of the compiler. Is there any additional information you need to track this problem down? This may be related to the STLport4.0 IO streams problem reported by 'Christof Meerwald'. I know I have had my tests compiling for one of the previous 8.1f.XX releases. Regards, Damian D:\CVS\STL\port\test>smake SMAKE Program Maintenance Utility (Console) Version 7.50 Copyright (c) 1994-1995 Innovative Data Concepts Incorporated Copyright (c) 1994-2001 Digital Mars All Rights Reserved REM Output to . d:\CVS\STL\port\test\SCPPn.exe -mn -C -WA -S -5 -a8 -c -gf -D_CONSOLE=1 -ID:\CVS\STL\port\stlport -oregression\string1.obj regression\string1.cpp test3 const int __result = memcmp(__first1, __first2, min(__len1, __len2)); ^ D:\CVS\STL\port\stlport\stl/_algobase.h(629) : Error: ambiguous reference to symbol Had: memcmp(void const *,void const *,unsigned ) and: memcmp(void const *,void const *,unsigned ) test3 const int __result = memcmp(__first1, __first2, min(__len1, __len2)); ^ D:\CVS\STL\port\stlport\stl/_algobase.h(660) : Error: ambiguous reference to symbol Had: memcmp(void const *,void const *,unsigned ) and: memcmp(void const *,void const *,unsigned ) test3 memmove(__result, __first, __last - __first); ^ D:\CVS\STL\port\stlport\stl/_uninitialized.h(104) : Error: ambiguous reference to symbol Had: memmove(void *,void const *,unsigned ) and: memmove(void *,void const *,unsigned ) test3 memcpy(pptr_, _s, _n); ^ d:\DM\bin\..\mfc\include\../../include/iostream.h(391) : Error: ambiguous reference to symbol Had: memcpy(void *,void const *,unsigned ) and: memcpy(void *,void const *,unsigned ) test3 memcpy(_s, gptr_, _n); ^ d:\DM\bin\..\mfc\include\../../include/iostream.h(399) : Error: ambiguous reference to symbol Fatal error: too many errors SMAKE fatal error: command "d:\CVS\STL\port\test\SCPPn.exe" returned with error code 1 Stopping. Oct 17 2001
Walter, I will generate a small example. Damian On Wed, 17 Oct 2001 10:07:10 -0700, "Walter" <walter digitalmars.com> wrote:Please send me the source that generates this. -Walter Damian wrote in message <3BCD9F29.1040006 netscape.net>...Walter, I am getting the following error messages when compiling my STLport4.0 tests. I am using version 8.1f.8n of the compiler. Is there any additional information you need to track this problem down? This may be related to the STLport4.0 IO streams problem reported by 'Christof Meerwald'. I know I have had my tests compiling for one of the previous 8.1f.XX releases. Regards, Damian D:\CVS\STL\port\test>smake SMAKE Program Maintenance Utility (Console) Version 7.50 Copyright (c) 1994-1995 Innovative Data Concepts Incorporated Copyright (c) 1994-2001 Digital Mars All Rights Reserved REM Output to . d:\CVS\STL\port\test\SCPPn.exe -mn -C -WA -S -5 -a8 -c -gf -D_CONSOLE=1 -ID:\CVS\STL\port\stlport -oregression\string1.obj regression\string1.cpp test3 const int __result = memcmp(__first1, __first2, min(__len1, __len2)); ^ D:\CVS\STL\port\stlport\stl/_algobase.h(629) : Error: ambiguous reference to symbol Had: memcmp(void const *,void const *,unsigned ) and: memcmp(void const *,void const *,unsigned ) test3 const int __result = memcmp(__first1, __first2, min(__len1, __len2)); ^ D:\CVS\STL\port\stlport\stl/_algobase.h(660) : Error: ambiguous reference to symbol Had: memcmp(void const *,void const *,unsigned ) and: memcmp(void const *,void const *,unsigned ) test3 memmove(__result, __first, __last - __first); ^ D:\CVS\STL\port\stlport\stl/_uninitialized.h(104) : Error: ambiguous reference to symbol Had: memmove(void *,void const *,unsigned ) and: memmove(void *,void const *,unsigned ) test3 memcpy(pptr_, _s, _n); ^ d:\DM\bin\..\mfc\include\../../include/iostream.h(391) : Error: ambiguous reference to symbol Had: memcpy(void *,void const *,unsigned ) and: memcpy(void *,void const *,unsigned ) test3 memcpy(_s, gptr_, _n); ^ d:\DM\bin\..\mfc\include\../../include/iostream.h(399) : Error: ambiguous reference to symbol Fatal error: too many errors SMAKE fatal error: command "d:\CVS\STL\port\test\SCPPn.exe" returned with error code 1 Stopping. Oct 17 2001
Walter, The problem appears to occur when the 'using' keyword is used. The example code (after the compilation erros) below shows what happens... Regards Damian REM Output to . d:\CVS\DM\SCPPn.exe -mn -C -WA -S -3 -a8 -c -gf -D_CONSOLE=1 -otest_teplate.obj test_template.cpp test3 const int __result = memcmp(__first1, __first2, min(__len1, __len2)); ^ test_template.cpp(54) : Error: ambiguous reference to symbol Had: memcmp(void const *,void const *,unsigned ) and: memcmp(void const *,void const *,unsigned ) SMAKE fatal error: command "d:\CVS\DM\SCPPn.exe" returned with error code 1 Stopping. -----------------------------------------Start of file // test_template.cpp : main implementation file // // Copyright (c) XYZ Corporation, 2001. All Rights Reserved. // // #include <stdio.h> #ifndef _CONSOLE #include <winio.h> #endif #ifdef _WINIO #include <string.h> // For strcpy #endif extern int memcmp(const void *buf1, const void *buf2, size_t count); using ::memcmp; // <-----------------PROBLEM CAUSED BY THIS template <class _Tp> inline const _Tp& min(const _Tp& __a, const _Tp& __b) { return __b < __a ? __b : __a; } template <class _Tp> inline const _Tp& max(const _Tp& __a, const _Tp& __b) { return __a < __b ? __b : __a; } template <class _InputIter1, class _InputIter2> bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2); template <class _InputIter1, class _InputIter2, class _Compare> bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2, _Compare __comp); inline bool lexicographical_compare(const unsigned char* __first1, const unsigned char* __last1, const unsigned char* __first2, const unsigned char* __last2) { const size_t __len1 = __last1 - __first1; const size_t __len2 = __last2 - __first2; // __STL_DEBUG_CHECK(__check_range(__first1, __last1)) // __STL_DEBUG_CHECK(__check_range(__first2, __last2)) const int __result = memcmp(__first1, __first2, min(__len1, __len2)); return __result != 0 ? (__result < 0) : (__len1 < __len2); } void main(int argc, char *argv[]) { #ifdef _WINIO winio_settitle(__hMainWnd,"test_template"); strcpy (__szModule,"test_template"); winio_about(__szModule); #endif unsigned char *first, *last, *first1, *last1; lexicographical_compare(first, last, first1, last1); #ifdef _CONSOLE { /* Print a prompt prior to exiting so that you can view output */ int c; printf ("Press Return To Exit: "); c = getc(stdin); } #endif } Damian Dixon wrote:Walter, I will generate a small example. Damian On Wed, 17 Oct 2001 10:07:10 -0700, "Walter" <walter digitalmars.com> wrote:Please send me the source that generates this. -Walter Damian wrote in message <3BCD9F29.1040006 netscape.net>...Walter, I am getting the following error messages when compiling my STLport4.0 tests. I am using version 8.1f.8n of the compiler. Is there any additional information you need to track this problem down? This may be related to the STLport4.0 IO streams problem reported by 'Christof Meerwald'. I know I have had my tests compiling for one of the previous 8.1f.XX releases. Regards, Damian D:\CVS\STL\port\test>smake SMAKE Program Maintenance Utility (Console) Version 7.50 Copyright (c) 1994-1995 Innovative Data Concepts Incorporated Copyright (c) 1994-2001 Digital Mars All Rights Reserved REM Output to . d:\CVS\STL\port\test\SCPPn.exe -mn -C -WA -S -5 -a8 -c -gf -D_CONSOLE=1 -ID:\CVS\STL\port\stlport -oregression\string1.obj regression\string1.cpp test3 const int __result = memcmp(__first1, __first2, min(__len1, __len2)); ^ D:\CVS\STL\port\stlport\stl/_algobase.h(629) : Error: ambiguous reference to symbol Had: memcmp(void const *,void const *,unsigned ) and: memcmp(void const *,void const *,unsigned ) test3 const int __result = memcmp(__first1, __first2, min(__len1, __len2)); ^ D:\CVS\STL\port\stlport\stl/_algobase.h(660) : Error: ambiguous reference to symbol Had: memcmp(void const *,void const *,unsigned ) and: memcmp(void const *,void const *,unsigned ) test3 memmove(__result, __first, __last - __first); ^ D:\CVS\STL\port\stlport\stl/_uninitialized.h(104) : Error: ambiguous reference to symbol Had: memmove(void *,void const *,unsigned ) and: memmove(void *,void const *,unsigned ) test3 memcpy(pptr_, _s, _n); ^ d:\DM\bin\..\mfc\include\../../include/iostream.h(391) : Error: ambiguous reference to symbol Had: memcpy(void *,void const *,unsigned ) and: memcpy(void *,void const *,unsigned ) test3 memcpy(_s, gptr_, _n); ^ d:\DM\bin\..\mfc\include\../../include/iostream.h(399) : Error: ambiguous reference to symbol Fatal error: too many errors SMAKE fatal error: command "d:\CVS\STL\port\test\SCPPn.exe" returned with error code 1 Stopping. Oct 18 2001
What I can suggest is just commenting out the using statement for the time being. I need to redo the whole namespace implementation to do Koenig lookup anyway. -Walter Damian wrote in message <3BCEAD34.6030008 netscape.net>...Walter, The problem appears to occur when the 'using' keyword is used. The example code (after the compilation erros) below shows what happens... Regards Damian REM Output to . d:\CVS\DM\SCPPn.exe -mn -C -WA -S -3 -a8 -c -gf -D_CONSOLE=1 -otest_teplate.obj test_template.cpp test3 const int __result = memcmp(__first1, __first2, min(__len1, __len2)); ^ test_template.cpp(54) : Error: ambiguous reference to symbol Had: memcmp(void const *,void const *,unsigned ) and: memcmp(void const *,void const *,unsigned ) SMAKE fatal error: command "d:\CVS\DM\SCPPn.exe" returned with error code 1 Stopping. -----------------------------------------Start of file // test_template.cpp : main implementation file // // Copyright (c) XYZ Corporation, 2001. All Rights Reserved. // // #include <stdio.h> #ifndef _CONSOLE #include <winio.h> #endif #ifdef _WINIO #include <string.h> // For strcpy #endif extern int memcmp(const void *buf1, const void *buf2, size_t count); using ::memcmp; // <-----------------PROBLEM CAUSED BY THIS template <class _Tp> inline const _Tp& min(const _Tp& __a, const _Tp& __b) { return __b < __a ? __b : __a; } template <class _Tp> inline const _Tp& max(const _Tp& __a, const _Tp& __b) { return __a < __b ? __b : __a; } template <class _InputIter1, class _InputIter2> bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2); template <class _InputIter1, class _InputIter2, class _Compare> bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2, _Compare __comp); inline bool lexicographical_compare(const unsigned char* __first1, const unsigned char* __last1, const unsigned char* __first2, const unsigned char* __last2) { const size_t __len1 = __last1 - __first1; const size_t __len2 = __last2 - __first2; // __STL_DEBUG_CHECK(__check_range(__first1, __last1)) // __STL_DEBUG_CHECK(__check_range(__first2, __last2)) const int __result = memcmp(__first1, __first2, min(__len1, __len2)); return __result != 0 ? (__result < 0) : (__len1 < __len2); } void main(int argc, char *argv[]) { #ifdef _WINIO winio_settitle(__hMainWnd,"test_template"); strcpy (__szModule,"test_template"); winio_about(__szModule); #endif unsigned char *first, *last, *first1, *last1; lexicographical_compare(first, last, first1, last1); #ifdef _CONSOLE { /* Print a prompt prior to exiting so that you can view output */ int c; printf ("Press Return To Exit: "); c = getc(stdin); } #endif } Damian Dixon wrote:Walter, I will generate a small example. Damian On Wed, 17 Oct 2001 10:07:10 -0700, "Walter" <walter digitalmars.com> wrote:Please send me the source that generates this. -Walter Damian wrote in message <3BCD9F29.1040006 netscape.net>...Walter, I am getting the following error messages when compiling my STLport4.0 tests. I am using version 8.1f.8n of the compiler. Is there any additional information you need to track this problem down? This may be related to the STLport4.0 IO streams problem reported by 'Christof Meerwald'. I know I have had my tests compiling for one of the previous 8.1f.XX releases. Regards, Damian D:\CVS\STL\port\test>smake SMAKE Program Maintenance Utility (Console) Version 7.50 Copyright (c) 1994-1995 Innovative Data Concepts Incorporated Copyright (c) 1994-2001 Digital Mars All Rights Reserved REM Output to . d:\CVS\STL\port\test\SCPPn.exe -mn -C -WA -S -5 -a8 -c -gf -D_CONSOLE=1 -ID:\CVS\STL\port\stlport -oregression\string1.obj Oct 18 2001
|