polarbearzoo / maidsafe-dht

Automatically exported from code.google.com/p/maidsafe-dht
0 stars 0 forks source link

Compiling in Linux #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Checked the source from SVN:
r483 | irvine.david@gmail.com | 2010-07-13 23:44:54 +0100 (Ter, 13 Jul 2010) | 
2 lines
2.   cmake ../../.. -G"CodeBlocks - Unix Makefiles"
3. make package

What is the expected output? What do you see instead?
Compilation error:
/usr/bin/c++   -DSTATICLIB -DMAIDSAFE_LINUX -O3 -DNDEBUG 
-I/home/prrt/workspace/maidsafe-dht-read-only/src   -w -fPIC -DNDEBUG  
-march=native -mtune=native -pipe -o 
CMakeFiles/maidsafe_dht_static.dir/src/maidsafe/base/utils.cc.o -c 
/home/prrt/workspace/maidsafe-dht-read-only/src/maidsafe/base/utils.cc
/home/prrt/workspace/maidsafe-dht-read-only/src/maidsafe/base/utils.cc: In 
function ‘std::string base::RandomString(const size_t&)’:
/home/prrt/workspace/maidsafe-dht-read-only/src/maidsafe/base/utils.cc:83: 
error: no matching function for call to ‘min(long unsigned int, unsigned 
int)’

What version of the product are you using? On what operating system?
Linux Caixa Magica 15

Please provide any additional information below.

Solved with attached patch.

Original issue reported on code.google.com by paulo.tr...@gmail.com on 25 Jul 2010 at 11:25

Attachments:

GoogleCodeExporter commented 9 years ago
Hey man,

Thanks a lot for the work. Because of internal coding standards, we've decided 
to cast the constant number to a size_t instead of modifying the first 
parameter to the function. The change is committed on revision 504.

we are also very intrigued of exactly why this has stopped you from compiling. 
Are you by any chance on a 64-bit machine?

Thanks again for the contribution.

Dan

Original comment by dan.schm...@gmail.com on 26 Jul 2010 at 10:12

GoogleCodeExporter commented 9 years ago
Yes... It's a 64 bit Linux system.
Continue the good work.

Cheers...

Original comment by paulo.tr...@gmail.com on 29 Jul 2010 at 2:25