Nocode: segment fault?

Created on 19 Feb 2018  ·  4Comments  ·  Source: kelseyhightower/nocode

when I was compiling code, I got this : segment fault,
any idea?

Most helpful comment

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)

All 4 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

julianommartins picture julianommartins  ·  3Comments

Jourday picture Jourday  ·  3Comments

paolomainardi picture paolomainardi  ·  3Comments

zhihuitang picture zhihuitang  ·  3Comments

ahrobinson picture ahrobinson  ·  3Comments