Talk:Modulinos: Difference between revisions

(→‎Some chat in IRC: Can shared libraries be executed?)
Line 37:
C code can use libraries ("shared libraries", "dynamically loaded libraries", whatever...). It's relatively trivial to put all of the logic in a library and have a trivial program that links to that library. That said, this is more about the build process than it is about the C code. (But good practice usually suggests that the "library code" and the "program code" be in separate files.) --[[User:Rdm|Rdm]] 12:16, 7 March 2011 (UTC)
: Can shared libraries be executed ''without'' an extra 'trivial program' though? Python not only has that ability, but it is a documented and well used feature of the language. --[[User:Paddy3118|Paddy3118]] 17:15, 7 March 2011 (UTC)
 
:: I believe that that is an OS issue. Hypothetically speaking: a shared library that defines a "main()" routine, can be treated as an executable. However if the OS requires something else (like: let's say there is a bit you set: when this bit is set you have an executable, when this bit is cleared you have a shared library), then you need a separate file (so that that bit can be set to different values for each of the two purposes). --[[User:Rdm|Rdm]] 17:24, 7 March 2011 (UTC)
 
== Ambiguities ==
6,962

edits