Below is my code.
#include <bits/stdc++.h>
using namespace std;
int main() {
//#include <string.h> from <bits/stdc++.h>
char source[] = "new string";
cout<<"\nGiven String is "<<strlen(source) << endl;
}
I can compile this code successfully using below command
g++ -o file.out file.cpp
But when I am trying to compile with debug symbols (-g so I can use gdb debugger) it does not compile successfully.
g++ -g -o file.out file.cpp
Processes for a long time and exits with error as below:
g++: fatal error: Killed signal terminated program cc1plus. compilation terminated.
I can compile other code without any problems. But if I use include<stdc++.h> and compile with -g option I am getting error.. Please how can I solve this?