Hi,
I've been trying for 3 full days now to link a shared object
library to my OOT module.
I am trying to link the libfec.so library in order to use the
reed-solomon encoding and decoding functions.
As found on the internet i have made a FindFec.cmake file
inside cmake/Modules as follows shown below.
I edited my CMakeLists.text in main directory adding
find_package(Fec)
I added include dir to include_directories and Library to
target_link_library in lib/CMakeLists.text
As shown below.
However whenever i cmake .. make sudo make install and sudo
ldconfig if i run make tests or if i try to run python test
from python IF a function from the library is used, and only
in that case, an attribute not found error will show.
If i edit cpp test testing the class that is using the
library function during compile time it will show that said
function is not defined. i.e.:
CMakeFiles/test-AX100.dir/Encoder.cpp.o: nella funzione
"Encoder::Encode(unsigned char*, int, char const*)":
Encoder.cpp:(.text+0x61): riferimento non definito a
"encode_rs_8(unsigned char*, unsigned char*, int)"
collect2: error: ld returned 1 exit status
lib/CMakeFiles/test-AX100.dir/build.make:155: set di
istruzioni per l'obiettivo "lib/test-AX100" non riuscito
make[2]: *** [lib/test-AX100] Errore 1
CMakeFiles/Makefile2:159: set di istruzioni per l'obiettivo
"lib/CMakeFiles/test-AX100.dir/all" non riuscito
make[1]: *** [lib/CMakeFiles/test-AX100.dir/all] Errore 2
Makefile:140: set di istruzioni per l'obiettivo "all" non
riuscito
make: *** [all] Errore 2
sadly it is in italian, however it says that reference to
encode_rs_8() not defined.
While through python tests:
E
======================================================================
ERROR: test_001_t (__main__.qa_Msg_Encoder)
----------------------------------------------------------------------
Traceback (most recent call last):
File "qa_Msg_Encoder.py", line 35, in test_001_t
enc = AX100.Msg_Encoder("in1","out1")
AttributeError: 'module' object has no attribute 'Msg_Encoder'
----------------------------------------------------------------------
Ran 1 test in 0.000s
FAILED (errors=1)
Thanks for your support!
Massimo