[klee-dev] "'klee_make_symbolic' was not declared in this scope" - when analyzing C++ code

Radu Stoenescu radu.stoe at gmail.com
Mon Mar 17 09:04:58 GMT 2014


Hello,

I am currently in the experimentation phase of using Klee and I have
succeed in running klee over a number of C programs.

I have also tried doing so with some C++ code:

// Header Files
#include <iostream>
#include <stdio.h>

using namespace std;

// Class Declaration
class person
{
    //Access - Specifier
    public:

    //Varibale Declaration
    string name;
    int number;

    void printName(int x) {
        if (x > 10)
            cout << name;
        else
            cout << "You have no name";
    }
};

//Main Function
int main()
{
    // Object Creation For Class
    person obj;

    obj.name = "Foo";

    int a;

    klee_make_symbolic(&a, sizeof(a), "a");

    obj.printName(a);

    return 0;
}

I'm compiling it using:

llvm-g++ -B/usr/lib/x86_64-linux-gnu --emit-llvm -c -g

And I get the following error when invoking klee:

main.cpp:35: error: 'klee_make_symbolic' was not declared in this scope

Since I'm not doing the linking phase I thought this shouldn't occur.

Many thanks,

-- 
Radu Stoenescu
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the klee-dev mailing list