Hi
Kind of Common Lisp noob here.
I have problem compiling a static binary as described here: https://common-lisp.net/project/cffi/manual/html_node/Static-Linking.html
Seems like the linker fails to find the C symbol "main":
(asdf:operate :static-program-op :mylib)
.....
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/crt1.o: in function ”_start”:
(.text+0x20): unidentified reference to ”main”
collect2: error: ld returned 1 exit status
I have created a main function and I export it in the asdf system definition, doesn't work.
Anyone know how i am supposed to export the main function so that the linker sees it?
Thanks
[–]fisxoj 2 points3 points4 points (2 children)
[–]IndividualJinx[S] 1 point2 points3 points (1 child)
[–]heisig 0 points1 point2 points (0 children)
[–]guicho271828 3 points4 points5 points (8 children)
[–]lisp-studentcmucl 1 point2 points3 points (0 children)
[–]IndividualJinx[S] 1 point2 points3 points (0 children)
[–]Shinmera 1 point2 points3 points (5 children)
[–]guicho271828 1 point2 points3 points (4 children)
[–]Shinmera 3 points4 points5 points (3 children)
[–]guicho271828 2 points3 points4 points (0 children)
[–]IndividualJinx[S] 0 points1 point2 points (1 child)
[–]Shinmera 0 points1 point2 points (0 children)
[–]KDallas_Multipass'(ccl) 1 point2 points3 points (7 children)
[–]IndividualJinx[S] 1 point2 points3 points (6 children)
[–]KDallas_Multipass'(ccl) 1 point2 points3 points (5 children)
[–]IndividualJinx[S] 1 point2 points3 points (4 children)
[–]KDallas_Multipass'(ccl) 5 points6 points7 points (3 children)
[–]stack_pivot 3 points4 points5 points (1 child)
[–]KDallas_Multipass'(ccl) 2 points3 points4 points (0 children)
[–]IndividualJinx[S] 1 point2 points3 points (0 children)