when I was compiling code, I got this : segment fault,
any idea?
You need to add this line, then it will work:
I've tried that I get the following error:
If you try to compile normally, you may invoke the following linker error:
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
The solution is to simply not invoke the linker. You can compile a nocode object file which you can link to other projects. (However, linking this object file with any other code is not recommended)
Check that this error message isn't coming from another program though, nocode will always return null for success and -null for failure.
Most helpful comment
If you try to compile normally, you may invoke the following linker error:
The solution is to simply not invoke the linker. You can compile a nocode object file which you can link to other projects. (However, linking this object file with any other code is not recommended)