-2
#include<z3++.h>  
#include<iostream>
#include"mainProj.cpp"
using namespace std;
using namespace z3;


int main()
{   context c;
    tactic t = tactic(c, "bit-blast");
    expr x = c.bv_const("x", 16);
    expr y = c.bv_const("y", 16);
    expr z = c.bv_const("z", 16);
    goal g(c);
    g.add(x == y + z);
    return 0;
}

I am supposed to execute the following code. What is the command for compilation and execution?

Viper
  • 121
  • 1
  • 7
  • Does this answer your question? [How to use Z3 with C++](https://stackoverflow.com/questions/51993350/how-to-use-z3-with-c) – Ali Kanat Dec 05 '19 at 14:18
  • No. I have done this before. I just forgot the command to compile the file. – Viper Dec 05 '19 at 14:29
  • If you are not using an Ide, that depends on what kind of compiler you use. Check these [answers](https://stackoverflow.com/questions/11365850/run-c-in-command-prompt-windows) for details – Ali Kanat Dec 05 '19 at 14:32
  • I am using Visual Code Studio on linux. and the command was something like " myProj.cpp -lz3 " but this one is not working. – Viper Dec 05 '19 at 14:36

1 Answers1

0

The compilation for my program is " g++ myProj.cpp -lz3 " Hope it is useful

Viper
  • 121
  • 1
  • 7