mardi 28 avril 2015

how to force clang to check semantic with system(ubuntu) STL header instead of clang's

when I try to use clang++ to detect semantic My program can be compiled with gcc. when I use clang to detect semantic, I got:

error| no viable overloaded '*='

problem occurs from one header I include from open source project

std::vector<double> Hc;
checksum(H,Hc);
Hc*=1.0/mrpt::math::maximum(Hc);

I think the problem is because the clang's STLib headers are different with my Ubuntu's c++ headers, and they didn't override *= opt. I added -std=c++11 -stdlib=libc++11 -nodefaultlibs and tried this http://libcxx.llvm.org but the only error still there. Indeed, I am trying YouCompleteMe plugin in vim. this plugin only need compile semantic and without linking step. and I can't change the header. '-isystem doesn't solve the problem' What should I do to force clang to check semantic with system STL header instead of clang's?

Aucun commentaire:

Enregistrer un commentaire