I have a C++ project with cmake as build-system. When I try to compile it with
it fails with ‘ld returned 1 exit status’. But it works when I use
‘scan-build --use-cc=g++ make’
What might be causing that scan-build can not determine the right compiler/linker?
How can I fix it?
Hi, Kai. I haven't tried it, but scan-build usually wants you to use it to invoke your build system generator as well. So:
That may not be the issue here, though. What platform are you using? Does your project contain C++ files?
you are right. I have prepended the call to cmake by scan-build as you recommended and now it is working as expected.