Advertisement
Guest User

Untitled

a guest
Jan 21st, 2020
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.00 KB | None | 0 0
  1. root@localhost:~# python3 hello.pyx
  2. Hello
  3. root@localhost:~# cat hello.pyx
  4. print("Hello")
  5. root@localhost:~# cython3 --embed hello.pyx
  6. root@localhost:~#
  7. root@localhost:~# gcc hello.c -o hello -I/usr/include/python3.6m
  8. /tmp/cctfO6BC.o: In function `__Pyx_PyObject_GetAttrStr':
  9. hello.c:(.text+0x61): undefined reference to `PyObject_GetAttr'
  10. /tmp/cctfO6BC.o: In function `PyInit_hello':
  11. hello.c:(.text+0x108): undefined reference to `PyTuple_New'
  12. hello.c:(.text+0x15c): undefined reference to `PyBytes_FromStringAndSize'
  13. hello.c:(.text+0x1b0): undefined reference to `PyUnicode_FromStringAndSize'
  14. hello.c:(.text+0x204): undefined reference to `PyModule_Create2'
  15. hello.c:(.text+0x256): undefined reference to `PyModule_GetDict'
  16. hello.c:(.text+0x2b6): undefined reference to `PyImport_AddModule'
  17. hello.c:(.text+0x305): undefined reference to `PyImport_AddModule'
  18. hello.c:(.text+0x365): undefined reference to `PyObject_SetAttrString'
  19. hello.c:(.text+0x3e7): undefined reference to `PyObject_SetAttrString'
  20. hello.c:(.text+0x417): undefined reference to `PyImport_GetModuleDict'
  21. hello.c:(.text+0x465): undefined reference to `PyDict_GetItemString'
  22. hello.c:(.text+0x484): undefined reference to `PyDict_SetItemString'
  23. hello.c:(.text+0x55a): undefined reference to `PyDict_New'
  24. hello.c:(.text+0x5b2): undefined reference to `PyDict_SetItem'
  25. hello.c:(.text+0x6f7): undefined reference to `PyErr_Occurred'
  26. hello.c:(.text+0x703): undefined reference to `PyExc_ImportError'
  27. hello.c:(.text+0x712): undefined reference to `PyErr_SetString'
  28. /tmp/cctfO6BC.o: In function `__Pyx_CLineForTraceback':
  29. hello.c:(.text+0x747): undefined reference to `_PyObject_GetDictPtr'
  30. hello.c:(.text+0x774): undefined reference to `PyDict_GetItem'
  31. hello.c:(.text+0x794): undefined reference to `PyErr_Fetch'
  32. hello.c:(.text+0x7c4): undefined reference to `PyObject_Not'
  33. hello.c:(.text+0x7cf): undefined reference to `_Py_FalseStruct'
  34. hello.c:(.text+0x7d8): undefined reference to `_Py_TrueStruct'
  35. hello.c:(.text+0x838): undefined reference to `PyErr_Restore'
  36. hello.c:(.text+0x85b): undefined reference to `_Py_FalseStruct'
  37. hello.c:(.text+0x866): undefined reference to `PyObject_SetAttr'
  38. hello.c:(.text+0x874): undefined reference to `PyObject_Not'
  39. /tmp/cctfO6BC.o: In function `__pyx_insert_code_object':
  40. hello.c:(.text+0xa91): undefined reference to `PyMem_Malloc'
  41. hello.c:(.text+0xbf7): undefined reference to `PyMem_Realloc'
  42. /tmp/cctfO6BC.o: In function `__Pyx_CreateCodeObjectForTraceback':
  43. hello.c:(.text+0xd0c): undefined reference to `PyUnicode_FromString'
  44. hello.c:(.text+0xd43): undefined reference to `PyUnicode_FromFormat'
  45. hello.c:(.text+0xd55): undefined reference to `PyUnicode_FromString'
  46. hello.c:(.text+0xdcb): undefined reference to `PyCode_New'
  47. /tmp/cctfO6BC.o: In function `__Pyx_AddTraceback':
  48. hello.c:(.text+0xf98): undefined reference to `PyThreadState_Get'
  49. hello.c:(.text+0xfaf): undefined reference to `PyFrame_New'
  50. hello.c:(.text+0xfd0): undefined reference to `PyTraceBack_Here'
  51. /tmp/cctfO6BC.o: In function `__Pyx_main':
  52. hello.c:(.text+0x109d): undefined reference to `Py_SetProgramName'
  53. hello.c:(.text+0x10a2): undefined reference to `Py_Initialize'
  54. hello.c:(.text+0x10c0): undefined reference to `PySys_SetArgv'
  55. hello.c:(.text+0x10e0): undefined reference to `PyErr_Occurred'
  56. hello.c:(.text+0x10ea): undefined reference to `PyErr_Print'
  57. hello.c:(.text+0x1140): undefined reference to `Py_Finalize'
  58. /tmp/cctfO6BC.o: In function `__Pyx_Print':
  59. hello.c:(.text+0x1649): undefined reference to `PyObject_GetAttr'
  60. hello.c:(.text+0x1676): undefined reference to `PyDict_New'
  61. hello.c:(.text+0x16ae): undefined reference to `PyDict_SetItem'
  62. hello.c:(.text+0x16d8): undefined reference to `PyUnicode_FromStringAndSize'
  63. hello.c:(.text+0x170a): undefined reference to `PyDict_SetItem'
  64. hello.c:(.text+0x17be): undefined reference to `PyDict_New'
  65. hello.c:(.text+0x17f5): undefined reference to `PyUnicode_FromStringAndSize'
  66. hello.c:(.text+0x1830): undefined reference to `PyDict_SetItem'
  67. hello.c:(.text+0x18d9): undefined reference to `PyObject_Call'
  68. /tmp/cctfO6BC.o: In function `__Pyx_PrintOne':
  69. hello.c:(.text+0x1a13): undefined reference to `PyTuple_Pack'
  70. /tmp/cctfO6BC.o: In function `__Pyx_check_binary_version':
  71. hello.c:(.text+0x1ace): undefined reference to `PyOS_snprintf'
  72. hello.c:(.text+0x1ad3): undefined reference to `Py_GetVersion'
  73. hello.c:(.text+0x1af9): undefined reference to `PyOS_snprintf'
  74. hello.c:(.text+0x1b58): undefined reference to `PyOS_snprintf'
  75. hello.c:(.text+0x1b71): undefined reference to `PyErr_WarnEx'
  76. /tmp/cctfO6BC.o: In function `__Pyx_InitStrings':
  77. hello.c:(.text+0x1bdd): undefined reference to `PyUnicode_InternFromString'
  78. hello.c:(.text+0x1c22): undefined reference to `PyUnicode_Decode'
  79. hello.c:(.text+0x1c4d): undefined reference to `PyUnicode_FromStringAndSize'
  80. hello.c:(.text+0x1c78): undefined reference to `PyBytes_FromStringAndSize'
  81. hello.c:(.text+0x1ca3): undefined reference to `PyObject_Hash'
  82. hello.c:(.text+0x1cae): undefined reference to `PyErr_Clear'
  83. collect2: error: ld returned 1 exit status
  84. root@localhost:~#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement