IkeShoeman / geodesic

Automatically exported from code.google.com/p/geodesic
0 stars 0 forks source link

Compile error on Windows 7 64-bit using MinGW compiler #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Attempting to compile examples on on Windows 7 64 bit with MinGW gcc 4.7.0 
results in errors.

Issuing the command:

g++ -Wall example0.cpp -o example0.exe

Produces traceback:

In file included from geodesic_algorithm_exact.h:5:0,
                 from example0.cpp:10:
geodesic_memory.h:187:2: error: 'auto_ptr' in namespace 'std' does not name a 
type
geodesic_memory.h: In member function 'void geodesic::OutputBuffer::clear()':
geodesic_memory.h:156:3: error: 'm_buffer' was not declared in this scope
geodesic_memory.h:156:14: error: 'auto_ptr' is not a member of 'std'
geodesic_memory.h:156:28: error: expected primary-expression before 'double'
geodesic_memory.h:156:28: error: expected ';' before 'double'
geodesic_memory.h: In member function 'T* 
geodesic::OutputBuffer::allocate(unsigned int)':
geodesic_memory.h:166:4: error: 'm_buffer' was not declared in this scope
geodesic_memory.h:166:15: error: 'auto_ptr' is not a member of 'std'
geodesic_memory.h:166:29: error: expected primary-expression before 'double'
geodesic_memory.h:166:29: error: expected ';' before 'double'
geodesic_memory.h:170:14: error: 'm_buffer' was not declared in this scope
geodesic_memory.h: In member function 'T* geodesic::OutputBuffer::get()':
geodesic_memory.h:176:14: error: 'm_buffer' was not declared in this scope
In file included from example0.cpp:10:0:
geodesic_algorithm_exact.h: In member function 'unsigned int 
geodesic::GeodesicAlgorithmExact::intersect_intervals(geodesic::interval_pointer
, geodesic::IntervalWithStop*)':
geodesic_algorithm_exact.h:448:21: warning: array subscript has type 'char' 
[-Wchar-subscripts]
geodesic_algorithm_exact.h:451:28: warning: array subscript has type 'char' 
[-Wchar-subscripts]
geodesic_algorithm_exact.h:454:26: warning: array subscript has type 'char' 
[-Wchar-subscripts]
geodesic_algorithm_exact.h:459:29: warning: array subscript has type 'char' 
[-Wchar-subscripts]
geodesic_algorithm_exact.h:460:12: warning: array subscript has type 'char' 
[-Wchar-subscripts]
geodesic_algorithm_exact.h: In member function 'virtual void 
geodesic::GeodesicAlgorithmExact::propagate(std::vector<geodesic::SurfacePoint>&
, double, std::vector<geodesic::SurfacePoint>*)':

geodesic_algorithm_exact.h:549:63: error: no matching function for call to 
'max(std::set<geodesic::Interval*, geodesic::Interval>::size_type, unsigned 
int&)'
geodesic_algorithm_exact.h:549:63: note: candidates are:
In file included from 
c:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64
-mingw32/include/c++/4.7.0/bits/char_traits.h:41:0,
                 from c:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/include/c++/4.7.0/ios:41,
                 from c:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/include/c++/4.7.0/ostream:40,
                 from c:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/include/c++/4.7.0/iostream:40,
                 from example0.cpp:7:
c:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64
-mingw32/include/c++/4.7.0/bits/stl_algobase.h:210:5: note: template<class _Tp> 
const _Tp& std::max(const _Tp&
, const _Tp&)
c:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64
-mingw32/include/c++/4.7.0/bits/stl_algobase.h:210:5: note:   template argument 
deduction/substitution failed:

In file included from example0.cpp:10:0:
geodesic_algorithm_exact.h:549:63: note:   deduced conflicting types for 
parameter 'const _Tp' ('long long unsigned int' and 'unsigned int')
In file included from 
c:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64
-mingw32/include/c++/4.7.0/bits/char_traits.h:41:0,
                 from c:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/include/c++/4.7.0/ios:41,
                 from c:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/include/c++/4.7.0/ostream:40,
                 from c:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/include/c++/4.7.0/iostream:40,
                 from example0.cpp:7:
c:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64
-mingw32/include/c++/4.7.0/bits/stl_algobase.h:254:5: note: template<class _Tp, 
class _Compare> const _Tp& std
::max(const _Tp&, const _Tp&, _Compare)
c:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64
-mingw32/include/c++/4.7.0/bits/stl_algobase.h:254:5: note:   template argument 
deduction/substitution failed:

In file included from example0.cpp:10:0:
geodesic_algorithm_exact.h:549:63: note:   deduced conflicting types for 
parameter 'const _Tp' ('long long unsigned int' and 'unsigned int')
geodesic_algorithm_exact.h:563:16: warning: unused variable 'list' 
[-Wunused-variable]
example0.cpp: In function 'int main(int, char**)':
example0.cpp:78:13: warning: unused variable 'best_source' [-Wunused-variable]

Compiler Settings:
------------------

> g++ -v
Using built-in specs.
COLLECT_GCC=C:\Anaconda\Scripts\g++.bat\..\..\MinGW\bin\g++.exe
COLLECT_LTO_WRAPPER=c:/anaconda/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/4.7.
0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../../../build/gcc/src/configure --target=x86_64-w64-mingw32 
--prefix=/c/bb/vista64-mingw32/mingw-x86-x
86_64/build/build/root 
--with-sysroot=/c/bb/vista64-mingw32/mingw-x86-x86_64/build/build/root 
--enable-languages=all,obj
-c++ --enable-fully-dynamic-string --disable-multilib
Thread model: win32
gcc version 4.7.0 20111220 (experimental) (GCC)

Original issue reported on code.google.com by jeffrey....@gmail.com on 3 Mar 2014 at 5:44