i usually can resolve linker's issue like 'undefined reference' using nm and figuring out that i forgot to add a source file in a makefile but here i can t understand what is happening :
$ make
gcc -I.. -I../../data_structures
-I../../iterator -I../../stack -I../../array_stack
-Wall -Wextra -Werror array_collection.o -o array_collection
-L.. -larray_collection
-L../../data_structures -ldyn_array
-L../../iterator -literator
-L../../stack -lstack
-L../../array_stack -larray_stack
../../array_stack/libarray_stack.a(array_stack_init_stack.o): In function `array_stack_init_stack':
array_stack_init_stack.c:(.text+0x79): undefined reference to `stack_init'
$ nm ../../stack/libstack.a| grep stack_init
auto_stack_init.o:
0000000000000000 T auto_stack_init
0000000000000000 T stack_init
Can you help me please ? It is maybe important to say that the gcc command is aliased to clang on the vm i am using.
Here is the stack_init's code :
void stack_init(t_stack *stack, void *realisation)
{
stack->realisation = realisation;
stack->_release = stack->release;
}