This question was asked few times on stackoverflow. However, what I'm trying to do is a little bit different.
I'm trying to port python to QNX. Compiling all the source files and statically linking it to a "Hello World" script using python c API works.
I'm having problem with the struct module. I tried compiling struct into a shared library and placing it at the exec_prefix path specified by python. When I try to import it, It tries to load the module but it complains about unknown symbols.
It says something like
Unknown symbol: _PyUnicode_FormatAdvancedWriter referenced by _struct.so
I get a lot of unknown symbol errors like this. I included the header and source files of all these unknown symbols and it ends up throwing other unknown symbol errors.
I might be doing something completely wrong. Any ideas on how I can link them?