stijn goossens
2021-04-21 18:23:08 UTC
Hello,
I'm trying to make a c_block in xcos (scilab 6.1.0) to communicate with a REST api.
I have a similar standalone c-program (but with a main function) running by building with two extra options: gcc hass.c -lcurl -ljson-c -o test (so -lcurl and -ljson-c).
I I try to create a c_block 4, I end up with this error.
I get errors like this
"/tmp/SCI_TMP_4905_6jDsU7"
Generate a loader file
Generate a Makefile
ilib_gen_Make: Copy compilation files (Makefile*, libtool...) to TMPDIR
ilib_gen_Make: Copy hass.c to TMPDIR
ilib_gen_Make: configure : Generate Makefile.
ilib_gen_Make: Modification of the Makefile in TMPDIR.
Running the Makefile
Generate a cleaner file
Link failed for dynamic library '/tmp/SCI_TMP_4905_6jDsU7/libhass.so'.
An error occurred: /tmp/SCI_TMP_4905_6jDsU7/libhass.so: undefined symbol: json_tokener_parse
this json_tokener_parse is part of #include <json-c/json.h>, so I assume that's why it doesn't find it.
1) is there any documentation or example programs hidden somewhere how to create such c_block4 function
(I don't even understand why to use c_block 4 or 3 or 2 or 1 ... )
2) Advice how to debug this type of blocks. I think for example I need to be able to tell this block to use json-c and libcurl ... but have no idea how to do so.
thanks
I'm trying to make a c_block in xcos (scilab 6.1.0) to communicate with a REST api.
I have a similar standalone c-program (but with a main function) running by building with two extra options: gcc hass.c -lcurl -ljson-c -o test (so -lcurl and -ljson-c).
I I try to create a c_block 4, I end up with this error.
I get errors like this
"/tmp/SCI_TMP_4905_6jDsU7"
Generate a loader file
Generate a Makefile
ilib_gen_Make: Copy compilation files (Makefile*, libtool...) to TMPDIR
ilib_gen_Make: Copy hass.c to TMPDIR
ilib_gen_Make: configure : Generate Makefile.
ilib_gen_Make: Modification of the Makefile in TMPDIR.
Running the Makefile
Generate a cleaner file
Link failed for dynamic library '/tmp/SCI_TMP_4905_6jDsU7/libhass.so'.
An error occurred: /tmp/SCI_TMP_4905_6jDsU7/libhass.so: undefined symbol: json_tokener_parse
this json_tokener_parse is part of #include <json-c/json.h>, so I assume that's why it doesn't find it.
1) is there any documentation or example programs hidden somewhere how to create such c_block4 function
(I don't even understand why to use c_block 4 or 3 or 2 or 1 ... )
2) Advice how to debug this type of blocks. I think for example I need to be able to tell this block to use json-c and libcurl ... but have no idea how to do so.
thanks