I installed tidy-dev from ubuntu repository, checked installation path - it's okay (/usr/include/tidy).
But I can not find a true flags to compile my c++ script with include tidy c++ wrapper tidyx.h from http://users.rcn.com/creitzel/tidy/tidyx.h
Can you help me?
My test script file named 1.cpp, tidyx.h I put near. 1.cpp content:
#include "tidyx.h"
int main()
{
}
I try it, but no-good:
$ gcc -I/usr/include/tidy 1.cpp -ltidy
In file included from 1.cpp:1:
tidyx.h: In constructor ‘Tidy::Source::Source()’:
tidyx.h:83: error: invalid conversion from ‘int (*)(ulong)’ to ‘int (*)(void*)’
tidyx.h:84: error: invalid conversion from ‘void (*)(ulong, byte)’ to ‘void (*)(void*, byte)’
tidyx.h:85: error: invalid conversion from ‘Bool (*)(ulong)’ to ‘Bool (*)(void*)’
tidyx.h:86: error: invalid conversion from ‘ulong’ to ‘void*’
tidyx.h: In constructor ‘Tidy::Sink::Sink()’:
tidyx.h:123: error: invalid conversion from ‘void (*)(ulong, byte)’ to ‘void (*)(void*, byte)’
tidyx.h:124: error: invalid conversion from ‘ulong’ to ‘void*’
tidyx.h: In member function ‘void Tidy::Buffer::Attach(void*, uint)’:
tidyx.h:165: error: invalid conversion from ‘void*’ to ‘byte*’
tidyx.h:165: error: initializing argument 2 of ‘void tidyBufAttach(TidyBuffer*, byte*, uint)’
tidyx.h: In member function ‘int Tidy::Document::Create()’:
tidyx.h:496: error: invalid conversion from ‘ulong’ to ‘void*’
tidyx.h:496: error: initializing argument 2 of ‘void tidySetAppData(const _TidyDoc*, void*)’
tidyx.h: In member function ‘void Tidy::Document::SetAppData(ulong)’:
tidyx.h:511: error: invalid conversion from ‘ulong’ to ‘void*’
tidyx.h:511: error: initializing argument 2 of ‘void tidySetAppData(const _TidyDoc*, void*)’
tidyx.h: In member function ‘ulong Tidy::Document::GetAppData()’:
tidyx.h:512: error: invalid conversion from ‘void*’ to ‘ulong’
To include a header file you need to use the #include preprocessor directive. It will look for the header file in compiler include paths.
If tidyx.h is in /usr/include/tidy you could put in your source file:
#include <tidy/tidyx.h>
and then compile just with gcc script.cpp, since /usr/include is most likely a default include path for your compiler.
Otherwise you could also put in your source file:
#include <tidyx.h>
And then tell GCC to look in /usr/include/tidy: gcc -I/usr/include/tidy script.cpp
At this point the header will be found. If you'll get other errors related to tidy (eg: some tidy functions are not defined) you'll need to link your binary to some library using GCC -l option.
EDIT after OP's massive edit.
Your problem here is that tidyx.h contains C++ code, and also your source file, looking to its extensions, seems to be a C++ source file. You'll need a C++ compiler in order to compile it. Use g++ instead of gcc:
g++ script.cpp
Related
I'm trying to compile the boost example from http://www.boost.org/doc/libs/1_47_0/doc/html/boost_asio/example/ssl/client.cpp . For some reason I'm getting the following errors and I don't know how to fix them:
ssl_client.cpp:37:25: error: ‘boost::asio::ssl::verify_context’ has not been declared
ssl_client.cpp: In constructor ‘client::client(boost::asio::io_service&, boost::asio::ssl::context&, boost::asio::ip::basic_resolver<boost::asio::ip::tcp>::iterator)’:
ssl_client.cpp:27:13: error: ‘class boost::asio::ssl::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp> >’ has no member named ‘set_verify_mode’
ssl_client.cpp:27:29: error: ‘verify_peer’ is not a member of ‘boost::asio::ssl’
ssl_client.cpp:28:13: error: ‘class boost::asio::ssl::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp> >’ has no member named ‘set_verify_callback’
ssl_client.cpp:31:5: error: ‘async_connect’ is not a member of ‘boost::asio’
ssl_client.cpp: In member function ‘bool client::verify_certificate(bool, int&)’:
ssl_client.cpp:48:54: error: request for member ‘native_handle’ in ‘ctx’, which is of non-class type ‘int’
ssl_client.cpp: In function ‘int main(int, char**)’:
ssl_client.cpp:143:68: error: no matching function for call to ‘boost::asio::ssl::basic_context<boost::asio::ssl::context_service>::basic_context(boost::asio::ssl::context_base::method)’
ssl_client.cpp:143:68: note: candidates are:
/usr/include/boost/asio/ssl/basic_context.hpp:47:3: note: boost::asio::ssl::basic_context<Service>::basic_context(boost::asio::io_service&, boost::asio::ssl::context_base::method) [with Service = boost::asio::ssl::context_service]
/usr/include/boost/asio/ssl/basic_context.hpp:47:3: note: candidate expects 2 arguments, 1 provided
/usr/include/boost/asio/ssl/basic_context.hpp:35:7: note: boost::asio::ssl::basic_context<boost::asio::ssl::context_service>::basic_context(const boost::asio::ssl::basic_context<boost::asio::ssl::context_service>&)
/usr/include/boost/asio/ssl/basic_context.hpp:35:7: note: no known conversion for argument 1 from ‘boost::asio::ssl::context_base::method’ to ‘const boost::asio::ssl::basic_context<boost::asio::ssl::context_service>&’
I'm currently compiling with the following line:
g++ -I /usr/include/boost -Wall -o main ssl_client.cpp -lboost_system
And I recently installed boost through:
sudo apt-get install libboost-all-dev
I'm sure there's an easy fix, does anyone know what I'm doing wrong?
========================================================================
Update:
I've now tried compiling with:
g++ -I /usr/include/boost -Wall -o main ssl_client.cpp -lboost_system -lcrypto -lssl -lpthread
but I'm still getting the following errors:
ssl_client.cpp:37:25: error: ‘boost::asio::ssl::verify_context’ has not been declared
ssl_client.cpp: In constructor ‘client::client(boost::asio::io_service&, boost::asio::ssl::context&, boost::asio::ip::basic_resolver<boost::asio::ip::tcp>::iterator)’:
ssl_client.cpp:27:13: error: ‘class boost::asio::ssl::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp> >’ has no member named ‘set_verify_mode’
ssl_client.cpp:27:29: error: ‘verify_peer’ is not a member of ‘boost::asio::ssl’
ssl_client.cpp:28:13: error: ‘class boost::asio::ssl::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp> >’ has no member named ‘set_verify_callback’
ssl_client.cpp:31:5: error: ‘async_connect’ is not a member of ‘boost::asio’
ssl_client.cpp: In member function ‘bool client::verify_certificate(bool, int&)’:
ssl_client.cpp:48:54: error: request for member ‘native_handle’ in ‘ctx’, which is of non-class type ‘int’
ssl_client.cpp: In function ‘int main(int, char**)’:
ssl_client.cpp:143:68: error: no matching function for call to ‘boost::asio::ssl::basic_context<boost::asio::ssl::context_service>::basic_context(boost::asio::ssl::context_base::method)’
ssl_client.cpp:143:68: note: candidates are:
/usr/include/boost/asio/ssl/basic_context.hpp:47:3: note: boost::asio::ssl::basic_context<Service>::basic_context(boost::asio::io_service&, boost::asio::ssl::context_base::method) [with Service = boost::asio::ssl::context_service]
/usr/include/boost/asio/ssl/basic_context.hpp:47:3: note: candidate expects 2 arguments, 1 provided
/usr/include/boost/asio/ssl/basic_context.hpp:35:7: note: boost::asio::ssl::basic_context<boost::asio::ssl::context_service>::basic_context(const boost::asio::ssl::basic_context<boost::asio::ssl::context_service>&)
/usr/include/boost/asio/ssl/basic_context.hpp:35:7: note: no known conversion for argument 1 from ‘boost::asio::ssl::context_base::method’ to ‘const boost::asio::ssl::basic_context<boost::asio::ssl::context_service>&’
Fixed it! It was because apt-get was giving me boost version 1.46 and I needed version 1.48. I did the following to fix it:
apt-get purge libboost-all-dev
and
apt-get install libboost1.48-all-dev
Thanks to: http://spencernusbaum.me/blog.php#106
I have successfully generated the .py and .cpp files needed using:
swig -c++ -python sf_c_api.i
but now I'm trying to make the shared object (.so) and I'm getting swamped with errors.
g++ -Wall -g -fPIC -I/usr/include/python2.6 -c atob.c fish.c maby_swap.c pwd_file.c pwd.c setup_fish.c shs.c sf_c_api.cpp sha1.cpp sf_c_api_wrap.cpp
Can anyone make heads or tails of this g++ output?
In file included from /usr/include/python2.6/Python.h:8,
from sf_c_api_wrap.cpp:149:
/usr/include/python2.6/pyconfig.h:1038:1: warning: "_XOPEN_SOURCE" redefined
<built-in>: warning: this is the location of the previous definition
In file included from /usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/bits/postypes.h:42,
from /usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/bits/char_traits.h:42,
from /usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/string:42,
from /usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/stdexcept:39,
from sf_c_api_wrap.cpp:3024:
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:143: error: ‘::btowc’ has not been declared
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:148: error: ‘::fwide’ has not been declared
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:149: error: ‘::fwprintf’ has not been declared
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:150: error: ‘::fwscanf’ has not been declared
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:153: error: ‘::mbrlen’ has not been declared
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:154: error: ‘::mbrtowc’ has not been declared
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:155: error: ‘::mbsinit’ has not been declared
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:156: error: ‘::mbsrtowcs’ has not been declared
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:159: error: ‘::swprintf’ has not been declared
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:160: error: ‘::swscanf’ has not been declared
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:162: error: ‘::vfwprintf’ has not been declared
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:166: error: ‘::vswprintf’ has not been declared
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:170: error: ‘::vwprintf’ has not been declared
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:174: error: ‘::wcrtomb’ has not been declared
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:185: error: ‘::wcsrtombs’ has not been declared
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:195: error: ‘::wctob’ has not been declared
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:196: error: ‘::wmemcmp’ has not been declared
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:197: error: ‘::wmemcpy’ has not been declared
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:198: error: ‘::wmemmove’ has not been declared
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:199: error: ‘::wmemset’ has not been declared
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:200: error: ‘::wprintf’ has not been declared
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:201: error: ‘::wscanf’ has not been declared
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:205: error: ‘::wcsstr’ has not been declared
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:206: error: ‘::wmemchr’ has not been declared
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar: In function ‘wchar_t* std::wcsstr(wchar_t*, const wchar_t*)’:
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:223: error: invalid conversion from ‘const wchar_t*’ to ‘wchar_t*’
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:223: error: initializing argument 1 of ‘wchar_t* std::wcsstr(wchar_t*, const wchar_t*)’
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar: In function ‘wchar_t* std::wmemchr(wchar_t*, wchar_t, size_t)’:
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:227: error: invalid conversion from ‘const wchar_t*’ to ‘wchar_t*’
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/cwchar:227: error: initializing argument 1 of ‘wchar_t* std::wmemchr(wchar_t*, wchar_t, size_t)’
In file included from /usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/string:42,
from /usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/stdexcept:39,
from sf_c_api_wrap.cpp:3024:
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/bits/char_traits.h: In static member function ‘static int std::char_traits<wchar_t>::compare(const wchar_t*, const wchar_t*, size_t)’:
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/bits/char_traits.h:330: error: ‘wmemcmp’ was not declared in this scope/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/bits/char_traits.h: In static member function ‘static const wchar_t* std::char_traits<wchar_t>::find(const wchar_t*, size_t, const wchar_t&)’:
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/bits/char_traits.h:338: error: initializing argument 1 of ‘wchar_t* std::wmemchr(wchar_t*, wchar_t, size_t)’
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/bits/char_traits.h: In static member function ‘static wchar_t* std::char_traits<wchar_t>::move(wchar_t*, const wchar_t*, size_t)’:
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/bits/char_traits.h:342: error: ‘wmemmove’ was not declared in this scope
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/bits/char_traits.h: In static member function ‘static wchar_t* std::char_traits<wchar_t>::copy(wchar_t*, const wchar_t*, size_t)’:
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/bits/char_traits.h:346: error: ‘wmemcpy’ was not declared in this scope
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/bits/char_traits.h: In static member function ‘static wchar_t* std::char_traits<wchar_t>::assign(wchar_t*, size_t, wchar_t)’:
/usr/gcc/4.4/lib/gcc/i386-pc-solaris2.11/4.4.4/../../../../include/c++/4.4.4/bits/char_traits.h:350: error: ‘wmemset’ was not declared in this scope
/../include/c++/4.4.4/bits/char_traits.h:338: error: invalid conversion from ‘const wchar_t*’ to ‘wchar_t*’
I found a solution.
The problem is that under solaris:
If -D_XOPEN_SOURCE_EXTENDED=1, g++ cannot compile even an empty body
that #includes <iostream>. If it's undefined, then gcc cannot compile
C code.
[source]
and from /usr/include/python2.6/pyconfig.h:
/* Define to activate Unix95-and-earlier features */
#define _XOPEN_SOURCE_EXTENDED 1
Removing the XOPEN definitions fixed my problem.
Compiling my program I have this error:
/usr/include/xercesc/util/Compilers/GCCDefs.hpp:133:60: error: declaration of ‘int strcasecmp(const char*, const char*)’ has a different exception specifier
/usr/include/string.h:536:12: error: from previous declaration ‘int strcasecmp(const char*, const char*) throw ()’
make: *** [src/test/VFTImageMaterial.o] Error 1
Any idea about this conflict with string.h?
You need to define HAVE_STRCASECMP. This probably should be defined automatically by ./configure in config.h - have you run ./configure?
$ g++ -lthrift -Wall thriftfs.cpp cassandra_constants.cpp Cassandra.cpp cassandra_types.cpp -o thriftfs -I/usr/local/include/thrift -L/usr/local/lib
In file included from /usr/local/include/thrift/protocol/TProtocol.h:23:0,
from /usr/local/include/thrift/TProcessor.h:24,
from Cassandra.h:10,
from t`enter code here`hriftfs.cpp:4:
/usr/local/include/thrift/transport/TTransport.h:34:1: error: ‘uint32_t’ does not name a type
/usr/local/include/thrift/transport/TTransport.h:156:29: error: ISO C++ forbids declaration of ‘buf’ with no type [-fpermissive]
In file included from /usr/local/include/thrift/TProcessor.h:24:0,
from Cassandra.h:10,
from thriftfs.cpp:4:
/usr/local/include/thrift/protocol/TProtocol.h:184:1: error: ‘uint32_t’ does not name a type
In file included from Cassandra.h:10:0,
from thriftfs.cpp:4:
/usr/local/include/thrift/TProcessor.h:72:57: error: ‘uint32_t’ has not been declared
In file included from cassandra_types.h:11:0,
from Cassandra.h:11,
from thriftfs.cpp:4:
/usr/local/include/thrift/TApplicationException.h:94:3: error: ‘uint32_t’ does not name a type
In file included from Cassandra.h:11:0,
from thriftfs.cpp:4:
cassandra_types.h:85:16: error: ‘uint8_t’ does not name a type
In file included from Cassandra.h:11:0,
from thriftfs.cpp:4:
cassandra_types.h:142:3: error: ‘uint32_t’ does not name a type
In file included from Cassandra.h:11:0,
from thriftfs.cpp:4:
cassandra_types.h:1478:16: error: ‘uint8_t’ does not name a type
In file included from Cassandra.h:11:0,
from thriftfs.cpp:4:
cassandra_types.h:1812:3: error: ‘uint32_t’ does not name a type
In file included from thriftfs.cpp:4:0:
Cassandra.h:217:3: error: ‘uint32_t’ does not name a type
Cassandra.h:4857:35: error: ‘org::apache::thrift’ has not been declared
Cassandra.h:4857:62: error: expected ‘,’ or ‘...’ before ‘*’ token
Cassandra.h:4859:71: error: cannot declare pointer to ‘void’ member
Cassandra.h:4859:145: error: template argument 2 is invalid
Cassandra.h:4859:145: error: template argument 4 is invalid
Cassandra.h:4860:45: error: ‘org::apache::thrift’ has not been declared
Cassandra.h:4860:72: error: expected ‘,’ or ‘...’ before ‘*’ token
Cassandra.h:4935:42: error: ‘thrift’ is not a member of ‘org::apache’
Cassandra.h:4935:42: note: suggested alternative:
/usr/local/include/thrift/Thrift.h:75:37: note: ‘apache::thrift’
Cassandra.h:4935:42: error: ‘thrift’ is not a member of ‘org::apache’
Cassandra.h:4935:42: note: suggested alternative:
/usr/local/include/thrift/Thrift.h:75:37: note: ‘apache::thrift’
Cassandra.h:4935:77: error: template argument 1 is invalid
Cassandra.h:4935:105: error: ‘thrift’ is not a member of ‘org::apache’
Cassandra.h:4935:105: note: suggested alternative:
/usr/local/include/thrift/Thrift.h:75:37: note: ‘apache::thrift’
Cassandra.h:4935:105: error: ‘thrift’ is not a member of ‘org::apache’
Cassandra.h:4935:105: note: suggested alternative:
/usr/local/include/thrift/Thrift.h:75:37: note: ‘apache::thrift’
Cassandra.h:4935:140: error: template argument 1 is invalid
Cassandra.h: In constructor ‘org::apache::cassandra::CassandraProcessor::CassandraProcessor(boost::shared_ptr)’:
Cassandra.h:4898:49: error: assignment of read-only location ‘"login"[((org::apache::cassandra::CassandraProcessor*)this)->org::apache::cassandra::CassandraProcessor::processMap_]’
Cassandra.h:4898:49: error: cannot convert ‘void (org::apache::cassandra::CassandraProcessor::*)(int32_t, int) {aka void (org::apach
Add the following defines:
g++ -DHAVE_NETINET_IN_H -DHAVE_INTTYPES_H ...
Or add #include <stdint.h> before including Thrift.h in your code.
See the discussion at THRIFT-1326. The issue is suppposedly fixed in thrift 0.9.
It looks like your problem is a compiler issue.
It can't find the type "uint32_t"
There is another question on SO regarding this:
'uint32_t' identifier not found error
Quoted from user templatetypedef
This type is defined in the C header which is not currently
a part of the C++ standard. According to the Wikipedia page on the
header, it hasn't shipped with Visual Studio until VS2010.
In the meantime, you could probably fake up your own version of the
header by adding typedefs that map Microsoft's custom integer types to
the types expected by C. For example:
typedef __int32 int32_t; typedef unsigned __int32 uint32_t; /* ...
etc. ... */ Hope this helps!
I would like to use the libtorrent-rasterbar to devellop some test with torren, but when I have tried to compile the examples which are in package I've gotten this error :
g++ dump_torrent.cpp
In file included from /usr/local/include/libtorrent/torrent_info.hpp:61:0,
from dump_torrent.cpp:40:
/usr/local/include/libtorrent/file_storage.hpp:110:8: error: ‘void libtorrent::file_storage::add_file(const wpath&, libtorrent::size_type, int, time_t, const boost::filesystem3::path&)’ cannot be overloaded
/usr/local/include/libtorrent/file_storage.hpp:106:8: error: with ‘void libtorrent::file_storage::add_file(const boost::filesystem3::path&, libtorrent::size_type, int, time_t, const boost::filesystem3::path&)’
In file included from dump_torrent.cpp:40:0:
/usr/local/include/libtorrent/torrent_info.hpp:195:3: error: ‘libtorrent::torrent_info::torrent_info(const wpath&)’ cannot be overloaded
/usr/local/include/libtorrent/torrent_info.hpp:193:3: error: with ‘libtorrent::torrent_info::torrent_info(const boost::filesystem3::path&)’
/usr/local/include/libtorrent/torrent_info.hpp:204:3: error: ‘libtorrent::torrent_info::torrent_info(const wpath&, boost::system::error_code&)’ cannot be overloaded
/usr/local/include/libtorrent/torrent_info.hpp:202:3: error: with ‘libtorrent::torrent_info::torrent_info(const boost::filesystem3::path&, boost::system::error_code&)’
In file included from /usr/local/include/libtorrent/magnet_uri.hpp:38:0,
from dump_torrent.cpp:42:
/usr/local/include/libtorrent/torrent_handle.hpp:585:8: error: ‘void libtorrent::torrent_handle::move_storage(const wpath&) const’ cannot be overloaded
/usr/local/include/libtorrent/torrent_handle.hpp:581:8: error: with ‘void libtorrent::torrent_handle::move_storage(const boost::filesystem3::path&) const’
/usr/local/include/libtorrent/torrent_handle.hpp:586:8: error: ‘void libtorrent::torrent_handle::rename_file(int, const wpath&) const’ cannot be overloaded
/usr/local/include/libtorrent/torrent_handle.hpp:582:8: error: with ‘void libtorrent::torrent_handle::rename_file(int, const boost::filesystem3::path&) const’
the version of libraries are : libtorrent-rasterbar-0.15.10 libboost-1.46
In addition I 'm trying to use it under linux.
If you need something else information I would be glad to give it to you.
thanks
I found out the solution.
Libtorrent-rasterbar needs boost-filesystem version number 2, but the current version is 3, so to fix the problem you have to compile it with this flag :
-DBOOST_FILESYSTEM_VERSION=2
try to use build script.
I also experementing with libtorrent-rasterbar and I can make dump_torrent by next command:
make dump_torrent