Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Build error with git-84ed1a7
10-22-2013, 12:02 PM
Post: #1
Build error with git-84ed1a7
Code:
    CPP build/carsound.o
src/carsound.cpp: In member function ‘void CarSound::Update(const CarDynamics&, float)’:
src/carsound.cpp:332:17: error: cannot convert ‘unsigned int [4]’ to ‘size_t* {aka long unsigned int*}’ in assignment
    sound_active = tiresqueal;
                 ^
src/carsound.cpp:336:17: error: cannot convert ‘unsigned int [4]’ to ‘size_t* {aka long unsigned int*}’ in assignment
    sound_active = grasssound;
                 ^
src/carsound.cpp:341:17: error: cannot convert ‘unsigned int [4]’ to ‘size_t* {aka long unsigned int*}’ in assignment
    sound_active = gravelsound;
                 ^
src/carsound.cpp:346:17: error: cannot convert ‘unsigned int [4]’ to ‘size_t* {aka long unsigned int*}’ in assignment
    sound_active = tiresqueal;
                 ^
src/carsound.cpp:352:17: error: cannot convert ‘unsigned int [4]’ to ‘size_t* {aka long unsigned int*}’ in assignment
    sound_active = grasssound;
                 ^
src/carsound.cpp:358:17: error: cannot convert ‘unsigned int [4]’ to ‘size_t* {aka long unsigned int*}’ in assignment
    sound_active = tiresqueal;
                 ^
scons: *** [build/carsound.o] Error 1
scons: building terminated because of errors.
Any suggestions as to what I am doing wrong?
Find all posts by this user
Quote this message in a reply
10-22-2013, 02:00 PM
Post: #2
RE: Build error with git-84ed1a7
(10-22-2013 12:02 PM)tomlowshang Wrote: In order to view links, you must have to reply to this thread.
Code:
    CPP build/carsound.o
src/carsound.cpp: In member function ‘void CarSound::Update(const CarDynamics&, float)’:
src/carsound.cpp:332:17: error: cannot convert ‘unsigned int [4]’ to ‘size_t* {aka long unsigned int*}’ in assignment
    sound_active = tiresqueal;
                 ^
src/carsound.cpp:336:17: error: cannot convert ‘unsigned int [4]’ to ‘size_t* {aka long unsigned int*}’ in assignment
    sound_active = grasssound;
                 ^
src/carsound.cpp:341:17: error: cannot convert ‘unsigned int [4]’ to ‘size_t* {aka long unsigned int*}’ in assignment
    sound_active = gravelsound;
                 ^
src/carsound.cpp:346:17: error: cannot convert ‘unsigned int [4]’ to ‘size_t* {aka long unsigned int*}’ in assignment
    sound_active = tiresqueal;
                 ^
src/carsound.cpp:352:17: error: cannot convert ‘unsigned int [4]’ to ‘size_t* {aka long unsigned int*}’ in assignment
    sound_active = grasssound;
                 ^
src/carsound.cpp:358:17: error: cannot convert ‘unsigned int [4]’ to ‘size_t* {aka long unsigned int*}’ in assignment
    sound_active = tiresqueal;
                 ^
scons: *** [build/carsound.o] Error 1
scons: building terminated because of errors.
Any suggestions as to what I am doing wrong?
Yeah, that sound selection code wasn't 64bit safe. I've pushed a fix.
Find all posts by this user
Quote this message in a reply
10-22-2013, 10:18 PM
Post: #3
RE: Build error with git-84ed1a7
Commit 41918ae fixes original error but build fails again with differrent error. Looks like a similar problem.
Code:
CPP build/trackloader.o
src/trackloader.cpp: In member function ‘bool Track::Loader::AddObject(const Track::Loader::Object&)’:
src/trackloader.cpp:692:88: error: no matching function for call to ‘max(unsigned int, std::basic_string<char>::size_type)’
   std::string texname = object.texture.substr(0, std::max(0u, object.texture.length()-4)) + "-misc1.png";
                                                                                        ^
src/trackloader.cpp:692:88: note: candidates are:
In file included from /usr/include/c++/4.8/list:60:0,
                 from src/joeserialize.h:23,
                 from src/mathvector.h:23,
                 from src/bezier.h:23,
                 from src/roadpatch.h:23,
                 from src/roadstrip.h:23,
                 from src/track.h:23,
                 from src/trackloader.h:23,
                 from src/trackloader.cpp:20:
/usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
     max(const _Tp& __a, const _Tp& __b)
     ^
/usr/include/c++/4.8/bits/stl_algobase.h:216:5: note:   template argument deduction/substitution failed:
src/trackloader.cpp:692:88: note:   deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘std::basic_string<char>::size_type {aka long unsigned int}’)
   std::string texname = object.texture.substr(0, std::max(0u, object.texture.length()-4)) + "-misc1.png";
                                                                                        ^
In file included from /usr/include/c++/4.8/list:60:0,
                 from src/joeserialize.h:23,
                 from src/mathvector.h:23,
                 from src/bezier.h:23,
                 from src/roadpatch.h:23,
                 from src/roadstrip.h:23,
                 from src/track.h:23,
                 from src/trackloader.h:23,
                 from src/trackloader.cpp:20:
/usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^
/usr/include/c++/4.8/bits/stl_algobase.h:260:5: note:   template argument deduction/substitution failed:
src/trackloader.cpp:692:88: note:   deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘std::basic_string<char>::size_type {aka long unsigned int}’)
   std::string texname = object.texture.substr(0, std::max(0u, object.texture.length()-4)) + "-misc1.png";
                                                                                        ^
src/trackloader.cpp:706:88: error: no matching function for call to ‘max(unsigned int, std::basic_string<char>::size_type)’
   std::string texname = object.texture.substr(0, std::max(0u, object.texture.length()-4)) + "-misc2.png";
                                                                                        ^
src/trackloader.cpp:706:88: note: candidates are:
In file included from /usr/include/c++/4.8/list:60:0,
                 from src/joeserialize.h:23,
                 from src/mathvector.h:23,
                 from src/bezier.h:23,
                 from src/roadpatch.h:23,
                 from src/roadstrip.h:23,
                 from src/track.h:23,
                 from src/trackloader.h:23,
                 from src/trackloader.cpp:20:
/usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
     max(const _Tp& __a, const _Tp& __b)
     ^
/usr/include/c++/4.8/bits/stl_algobase.h:216:5: note:   template argument deduction/substitution failed:
src/trackloader.cpp:706:88: note:   deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘std::basic_string<char>::size_type {aka long unsigned int}’)
   std::string texname = object.texture.substr(0, std::max(0u, object.texture.length()-4)) + "-misc2.png";
                                                                                        ^
In file included from /usr/include/c++/4.8/list:60:0,
                 from src/joeserialize.h:23,
                 from src/mathvector.h:23,
                 from src/bezier.h:23,
                 from src/roadpatch.h:23,
                 from src/roadstrip.h:23,
                 from src/track.h:23,
                 from src/trackloader.h:23,
                 from src/trackloader.cpp:20:
/usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^
/usr/include/c++/4.8/bits/stl_algobase.h:260:5: note:   template argument deduction/substitution failed:
src/trackloader.cpp:706:88: note:   deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘std::basic_string<char>::size_type {aka long unsigned int}’)
   std::string texname = object.texture.substr(0, std::max(0u, object.texture.length()-4)) + "-misc2.png";
                                                                                        ^
scons: *** [build/trackloader.o] Error 1
scons: building terminated because of errors.
Find all posts by this user
Quote this message in a reply
10-23-2013, 07:30 AM
Post: #4
RE: Build error with git-84ed1a7
Yep, need to setup 64bit build. You can fix it by replacing "std::max(0u, " with "std::max<int>(0, "
Find all posts by this user
Quote this message in a reply
10-23-2013, 09:20 PM
Post: #5
RE: Build error with git-84ed1a7
That worked, thanks.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)