my program compiled and worked fine with:
g++ main.cpp exm1.cpp exm2.cpp -o main.o
i want to compile this app and run anywhere
how can i?
i try this code
g++ -g -Wall -I/MyApp/lib -static-libgcc -static-libstdc++ -static main.cpp exm1.cpp exm2.cpp -o main.o
but not work
in lib folder has 2 files:
- exm1.h
- exm2.h
main.cpp included:
#include <fstream> #include <iostream> #include <string> #include <streambuf> #include <stdlib.h> #include "lib/exm1.h" #include "lib/exm2.h"
my linux is kali, and i want run this app on CentOS 6
please help me,thanks