李永超
2014-04-03 01:14:25 UTC
Hi,
When building a piece of c++ code, llvm-gcc reports following error:
error: ¡®klee_make_symbolic¡¯ was not declared in this scope
The building command is :
llvm-gcc --emit-llvm -c -g src.cpp -o src.bc
and the piece of code is:
#include <iostream>
class base {
public:
int a;
base(int b):a(b){
};
void foo(){
if(a == 1)std::cout<<"yes\n";
else
std::cout<<"no\n";
}
};
int main() {
int a;
klee_make_symbolic(a, sizeof(a), "a");
base obj(a);
return 0;
}
But llvm-gcc works fine to build .c files with klee_make_symbolic called.
Does anybody have any idea about this error?
Thanks,
Yongchao.
When building a piece of c++ code, llvm-gcc reports following error:
error: ¡®klee_make_symbolic¡¯ was not declared in this scope
The building command is :
llvm-gcc --emit-llvm -c -g src.cpp -o src.bc
and the piece of code is:
#include <iostream>
class base {
public:
int a;
base(int b):a(b){
};
void foo(){
if(a == 1)std::cout<<"yes\n";
else
std::cout<<"no\n";
}
};
int main() {
int a;
klee_make_symbolic(a, sizeof(a), "a");
base obj(a);
return 0;
}
But llvm-gcc works fine to build .c files with klee_make_symbolic called.
Does anybody have any idea about this error?
Thanks,
Yongchao.