Embeddinator-4000 icon indicating copy to clipboard operation
Embeddinator-4000 copied to clipboard

C library compilation with -static fails due to missing "main"

Open atsushieno opened this issue 6 years ago • 1 comments

If you run Embeddinator-4000.exe -gen C -p Linux -o linux -static -v -c -d [yourlib.dll] it results in:

/usr/bin/../lib/gcc/x86_64-linux-gnu/7.2.0/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I'm running it on Linux, but as long as I can see from binder/Compilation.cs the same problem would happen on Mac too.

atsushieno avatar Jan 30 '18 06:01 atsushieno

I can confirm it happens on macOS too

zgramana avatar Mar 05 '20 00:03 zgramana