I used ignite1.7.0------------------ ???????? ------------------
??????: "Igor Sapego"<isap...@gridgain.com>
????????: 2016??11??14??(??????) ????10:09
??????: "user"<user@ignite.apache.org>;
????: Re: C++ API can't build successfully in my linux environment


Hi,

Which version do you use?


Best Regards,
Igor



 
On Mon, Nov 14, 2016 at 4:59 PM, smile <honglipi...@qq.com> wrote:
Hi, all
&#xA0; &#xA0; I build C++ api in linux environment, linux is Center OS, and g++ 
version is 4.4.6?? I get a lot build error, &#xA0;and I have to modify the 
code, include :

1??ignite_error.h : ~IgniteError();&#xA0; ???? ~IgniteError() throw();

2??ignite_error.cpp :&#xA0; 
IgniteError::~IgniteError()??????IgniteError::~IgniteError() throw();



3????java.cpp????nullPtr??????NULL

4????concurrent.h????explicit SharedPointer(T* ptr)????????

&#xA0;&#xA0;&#xA0; explicit SharedPointer(T* ptr)

&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;
 {

&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;
 /*

&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;
 if (ptr)

&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;
 {

&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;
 impl = new SharedPointerImpl(ptr, 
reinterpret_cast<SharedPointerImpl::DeleterType>(&SharedPointerDefaultDeleter<T>));

&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;
 ImplEnableShared(ptr, impl);

&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;
 }

&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;
 &#xA0;&#xA0;&#xA0;else

&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;
 impl = 0;

&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;
 */

&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;
 SharedPointer(ptr, &SharedPointerDefaultDeleter<T>);

 

&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;
 }

&#xA0; &#xA0;??????????????????????????

&#xA0; &#xA0;../common/include/ignite/common/concurrent.h: In constructor 
'ignite::common::concurrent::SharedPointer<T>::SharedPointer(T*) [with T = 
ignite::impl::cache::CacheImpl]':

../core/include/ignite/cache/cache.h:71: &#xA0; instantiated from 
'ignite::cache::Cache<K, V>::Cache(ignite::impl::cache::CacheImpl*) [with K = 
int, V = int]'

../core/include/ignite/ignite.h:133: &#xA0; instantiated from 
'ignite::cache::Cache<K, V> ignite::Ignite::GetOrCreateCache(const char*, 
ignite::IgniteError*) [with K = int, V = int]'

../core/include/ignite/ignite.h:112: &#xA0; instantiated from 
'ignite::cache::Cache<K, V> ignite::Ignite::GetOrCreateCache(const char*) [with 
K = int, V = int]'

src/ignite.cpp:207: &#xA0; instantiated from here

../common/include/ignite/common/concurrent.h:145: error: address of overloaded 
function with no contextual type information




&#xA0; ok, &#xA0;I have modifty them, then it can build success, but when I run 
the example, &#xA0;it is core dump?? and I think that the memory is modified 
during process running.




&#xA0;How can I solve it ?

&#xA0;Thank you very much!

Reply via email to