It's not in a repo yet, it's on my laptop only. What I'm doing is pass a 2D pointer (if I'm allowed to say this :) ) of t_float and a pointer to a data structure. The actual data live in the main file. Here's a reduced example:
In the dense.h file:
``` typedef struct _layer_dense { // some variables here } t_layer_dense;
In the dense.c file:
``` void layer_dense_forward(t_layer_dense *layer, t_float **data) { \ process data from layer data structure and the "data" pointer } ```
In the main header file:
``` #include dense.h
typedef struct _layer { t_layer_dense *layer_dense; t_float **data; } t_layer; ```
In the main .c file:
``` layer_dense_forward(&layer_dense, data); ```
Initially, the function in the dense.c file was declared as static, which is when Pd couldn't find it. I removed the static keyword, and now Pd just can't create the object, without providing any more information, even at log level 3 or 4.
On 8/6/24 14:34, Christof Ressi wrote:
Hi,
can you post a link to the repository? Then we don't need to guess :)
Christof
On 06.08.2024 13:31, Alexandros Drymonitis wrote:
I'm trying to split the source of an external I'm writing to more than one .c files but I'm failing. I have two .h and two .c files, where one pair includes all the Pd specific functions, line new() and setup(). In the Makefile (pd-lib-builder), I include the following line:
common.sources = src/dense.c
This is the .c file where I want to include part of the code. The object compiles. I even get some warnings about this dense.c file, but when I try to load the object, Pd complains that it can't find certain functions that are included in this dense.c file.
Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev
Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev