Jasvirbahl / b-tk

Automatically exported from code.google.com/p/b-tk
0 stars 0 forks source link

Cannot mix static lib and dynamic lib under linux 64-bit #9

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Compile BTK with Matlab support

No error, nor warning to compile libBTKCommon, libBTKIO or libBTKBasicFilters. 
However, when GCC starts to compile the MEX functions, the following error 
appears: "The compile relocation R_X86_64_32 against `.LC1' can not be used 
when making a shared object; recompile with -fPIC"

Original issue reported on code.google.com by arnaud.barre on 1 Feb 2011 at 6:06

GoogleCodeExporter commented 8 years ago
From the web, it is not possible to link a static library into a shared library 
(the MEX functions). As proposed in the message, you can use the flag "-fPIC" 
but this is like creating a dynamic library. It is proposed to force the 
project to compile BTK libraries as shared dynamic object using the CMake 
option BUILD_SHARED_LIBS.

Original comment by arnaud.barre on 1 Feb 2011 at 6:07

GoogleCodeExporter commented 8 years ago

Original comment by arnaud.barre on 3 Feb 2011 at 9:28