Closed GoogleCodeExporter closed 9 years ago
[deleted comment]
here we go =(
# ./make.sh
../misc/sql/sql_query.cpp:21:26: warning: using the result of an assignment as
a condition without
parentheses [-Wparentheses]
for (size_t i = 0, j; j = v.find('@', i); )
~~^~~~~~~~~~~~~~~~
../misc/sql/sql_query.cpp:21:26: note: place parentheses around the assignment
to silence this
warning
for (size_t i = 0, j; j = v.find('@', i); )
^
( )
../misc/sql/sql_query.cpp:21:26: note: use '==' to turn this assignment into an
equality comparison
for (size_t i = 0, j; j = v.find('@', i); )
^
==
1 warning generated.
In file included from ../misc/bvalue.cpp:1:
./stdafx.h:6:10: fatal error: 'array' file not found
#include <array>
^
1 error generated.
Original comment by duelis...@gmail.com
on 27 Apr 2012 at 5:36
Did you enable C++11 mode?
Original comment by olafvdspek
on 27 Apr 2012 at 7:12
http://www.freebsd.org/doc/en_US.ISO8859-1/articles/custom-gcc/article.html
RU: http://www.freebsd.org/doc/ru/articles/custom-gcc/article.html
g++44 $@ -DNDEBUG -I ../misc -I . -O3 -o xbt_tracker -I /usr/local/include
-std=c++0x \
Error:
./make.sh
../misc/bvalue.cpp: In member function 'int Cbvalue::write(const char*&, const
char*)':
../misc/bvalue.cpp:166: error: 'atoll' was not declared in this scope
server.cpp: In member function 'int Cserver::run()':
server.cpp:180: error: 't_udp_sockets' has not been declared
server.cpp:180: error: expected ';' before 'i'
server.cpp:182: error: 'i' was not declared in this scope
tracker_input.cpp: In member function 'void Ctracker_input::set(const
std::string&, const std::string&)':
tracker_input.cpp:28: error: 'atoll' was not declared in this scope
tracker_input.cpp:54: error: 'atoll' was not declared in this scope
tracker_input.cpp:68: error: 'atoll' was not declared in this scope
Original comment by M.Sergi...@gmail.com
on 27 Apr 2012 at 9:55
What revision of misc and Tracker dirs is this?
Original comment by olafvdspek
on 27 Apr 2012 at 10:18
[deleted comment]
r2289
../misc/bvalue.cpp: In member function 'int Cbvalue::write(const char*&, const
char*)':
../misc/bvalue.cpp:166: error: 'atoll' was not declared in this scope
tracker_input.cpp: In member function 'void Ctracker_input::set(const
std::string&, const std::string&)':
tracker_input.cpp:28: error: 'atoll' was not declared in this scope
tracker_input.cpp:54: error: 'atoll' was not declared in this scope
tracker_input.cpp:68: error: 'atoll' was not declared in this scope
Original comment by M.Sergi...@gmail.com
on 28 Apr 2012 at 5:25
In what header is atoll declared on your platform?
Original comment by olafvdspek
on 28 Apr 2012 at 2:44
r2293
g++48 $@ -DNDEBUG -I ../misc -I . -O3 -o xbt_tracker -I /usr/local/include
-std=c++0x \
# ./make.sh
tracker_input.cpp: In member function 'void Ctracker_input::set(const string&,
const string&)':
tracker_input.cpp:28:38: error: 'atoll' was not declared in this scope
tracker_input.cpp:54:32: error: 'atoll' was not declared in this scope
tracker_input.cpp:68:36: error: 'atoll' was not declared in this scope
help please...
Original comment by M.Sergi...@gmail.com
on 30 Apr 2012 at 8:52
In what header is atoll declared on your platform?
Original comment by olafvdspek
on 30 Apr 2012 at 10:44
stdlib.h
Original comment by M.Sergi...@gmail.com
on 30 Apr 2012 at 11:03
Try to add #include <cstdlib> to stdafx.h
Original comment by olafvdspek
on 30 Apr 2012 at 11:04
#include <cstdlib>
or
#include <stdlib.h>
did not help
Original comment by M.Sergi...@gmail.com
on 30 Apr 2012 at 11:15
So atoll is *not* declared in stdlib.h?
In that case you'll have to find the right header.
Original comment by olafvdspek
on 30 Apr 2012 at 12:20
r2303
g++48 $@ -DNDEBUG -I ../misc -I . -O3 -o xbt_tracker -I /usr/local/include
-std=c++0x \
# ./make.sh
tracker_input.cpp: In member function 'void Ctracker_input::set(const string&,
const string&)':
tracker_input.cpp:28:38: error: 'atoll' was not declared in this scope
m_downloaded = atoll(value.c_str());
^
tracker_input.cpp:54:32: error: 'atoll' was not declared in this scope
m_left = atoll(value.c_str());
^
tracker_input.cpp:68:36: error: 'atoll' was not declared in this scope
m_uploaded = atoll(value.c_str());
^
Original comment by M.Sergi...@gmail.com
on 2 May 2012 at 5:32
Found the right header yet?
Original comment by olafvdspek
on 2 May 2012 at 5:34
http://en.cppreference.com/w/cpp/string/byte/atoi
long long atoll( const char *str ); (since C++11)
Original comment by M.Sergi...@gmail.com
on 2 May 2012 at 5:44
I have tried various connection options, different versions of g++(4.4 - 4.6 -
4.8)
all write that the atoll is registered in stdlib.h, and are placed it in:
/usr/include/
and
/usr/local/lib/gcc44/include/c++/tr1
and
/usr/local/lib/gcc44/gcc/x86_64-portbld-freebsd8.2/4.4.7/include-fixed
and
/usr/ports/lang/gcc44/work/build/gcc/include-fixed
and
/usr/ports/lang/gcc48/work/build/gcc/include-fixed
and
/usr/ports/lang/gcc46/work/build/gcc/include-fixed
I have no idea what to do and how to compile in the xbt freebsd :(
Original comment by M.Sergi...@gmail.com
on 2 May 2012 at 7:50
If you give me shell access I'll have a look.
Original comment by olafvdspek
on 2 May 2012 at 7:56
Original comment by olafvdspek
on 3 May 2012 at 9:18
may be replace atoll to my_atoll? ))
long long my_atoll(char *instr)
{
long long retval;
int i;
retval = 0;
for (; *instr; instr++) {
retval = 10*retval + (*instr - '0');
}
return retval;
}
Original comment by M.Sergi...@gmail.com
on 6 May 2012 at 8:20
Why? You should just fix your platform.
Original comment by olafvdspek
on 6 May 2012 at 9:59
# ./make.sh
In file included from connection.cpp:5:0:
stdafx.h:3:0: warning: "FD_SETSIZE" redefined [enabled by default]
#define FD_SETSIZE 1024
^
In file included from
/usr/local/lib/gcc48/gcc/x86_64-portbld-freebsd9.0/4.8.1/include-fixed/sys/types
.h:287:0,
from connection.cpp:2:
/usr/include/sys/select.h:59:0: note: this is the location of the previous
definition
#define FD_SETSIZE 1024U
^
In file included from server.cpp:4:0:
stdafx.h:3:0: warning: "FD_SETSIZE" redefined [enabled by default]
#define FD_SETSIZE 1024
^
In file included from
/usr/local/lib/gcc48/gcc/x86_64-portbld-freebsd9.0/4.8.1/include-fixed/sys/types
.h:287:0,
from server.cpp:1:
/usr/include/sys/select.h:59:0: note: this is the location of the previous
definition
#define FD_SETSIZE 1024U
^
# uname -a
FreeBSD torrents.berislav.net.ua 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Fri Nov 2
15:44:15 EET 2012 user@torrents.berislav.net.ua:/usr/obj/usr/src/sys/CS
amd64
Original comment by M.Sergi...@gmail.com
on 9 Jun 2013 at 7:41
Original issue reported on code.google.com by
duelis...@gmail.com
on 24 Apr 2012 at 11:19