mercredi 3 mai 2017

unable to compile my code

I have a C++ code but I don't achieve to compile with -static. Here is my code :

#include <iostream>
#include <optimization.h>

int main(){

std::cout << opti::minimize(1,2) << std::endl;
return EXIT_SUCCESS;

}

And when I type on the terminal :

g++ main.cpp -loptimization -std=c++11

it works but when I type :

g++ main.cpp -loptimization -static -std=c++11

it does not work I don't understand at all why ?

Aucun commentaire:

Enregistrer un commentaire