User Tools

Site Tools


notes:dynamic_linking

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
notes:dynamic_linking [2013/05/08 17:04]
andy
notes:dynamic_linking [2013/05/08 17:05] (current)
andy
Line 38: Line 38:
 gcc -c -Wall -Werror -fpic code.c gcc -c -Wall -Werror -fpic code.c
 </​code>​ </​code>​
 +
 +<​note>​When linking multiple object files into a single shared object, //all// of them must have been compiled with ''​-fpic''​ or the operation will fail.</​note>​
  
 Then the ''​-shared''​ option can be used to link that into a shared object: Then the ''​-shared''​ option can be used to link that into a shared object:
notes/dynamic_linking.1368032692.txt.gz ยท Last modified: 2013/05/08 17:04 by andy