Closed tanaka141 closed 5 years ago
Which C++ compiler and version are you trying to build c10t with?
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
I'm looking at yet another compiling error... oh well
src/image/image_base.cpp:43:23: error: call of overloaded ‘abs(pos_t)’ is ambiguous
int dx = abs(x2-x1)
$ gcc --version
gcc (Gentoo 8.3.0-r1 p1.1) 8.3.0
$ eselect gcc list
[1] x86_64-pc-linux-gnu-8.3.0 *
So yeah, this is a memory leak. The basic_json
class doesn't have a virtual destructor, which would mean the subclass destructors are not called:
If someone wants to fix it, this is where it is defined: https://github.com/udoprog/c10t/blob/master/src/json.hpp#L51
So we need something like this to basic_json
:
virtual ~basic_json() = 0;
Yepp, but thats a compiler warning, I'm guessing its the same compiler error as mine? pos_t is defined in image_base.hpp as uint64_t, calling abs on an unsigned integer makes no sense. I'm testing a patch now.
Edit: nevermind I misunderstood; I'm opening a diffrent issue and patching it there.
i think i waked up some people here :D
This issue is a duplicate of #270
for json, the proposal https://github.com/evildeeds/c10t/commit/bd365e4ac2870783bbe65c99b94a4f13a28946f9 was made in my local src.
No more message.
But this error allways appear :
[ 78%] Building CXX object CMakeFiles/c10t.dir/src/generate_map.cpp.o
/home/minecraft/c10tCreation/c10t/src/generate_map.cpp: In function ‘bool generate_map(std::ostream&, std::ostream&, std::ostream&, settings_t&, std::vector<std::__cxx11::basic_string<char> >&, boost::filesystem::path&, boost::filesystem::path&)’:
/home/minecraft/c10tCreation/c10t/src/generate_map.cpp:578:20: warning: typedef ‘hello_f’ locally defined but not used [-Wunused-local-typedefs]
typedef void (*hello_f)();
^
[ 80%] Building CXX object CMakeFiles/c10t.dir/src/generate_statistics.cpp.o
@evildeeds heh, so you've had the fix for 5 years in your branch :D. Wanna setup a PR?
your proposal was good in 2014 :D
i think the https://github.com/evildeeds/c10t/commit/bd365e4ac2870783bbe65c99b94a4f13a28946f9 must be approved
@evildeeds heh, so you've had the fix for 5 years in your branch :D. Wanna setup a PR?
Perhaps, don't know HOW-TO :D
Heh, that not why. But that was a fascinating discovery, maybe I messed up back then and accidentally merged it onto my master branch before making any pull requests.
Merged, reopen if this did not resolve the issue
allways present during compilation :
Don't know why ?