Hey so basically I'm trying to get a huge amount of code to compile. None of them are main files so I added a main into thats basically blank
the main might be wrong but thats not the problem so all the other code uses functions from different folders.Code:#include <stdio> int main( int ....., char** .....) { printf(hi\n); }
/root/Desktop/Vmainline/fctl/
fctl.c
uses a function from Vmain/v2lin_v02/lib
like semGive();
so i use the command
gcc -I../../v2lin_v02/lib -I/root/Desktop/VMainlineV3/h -lm -o main *.c *.h -L../../v2lin_v02/lib
and i get a whole bunch of errors basically looking like this
fctl.c.text+0x16a): undefined reference to `semGive'
and i know theres some kind of link cuz without the -I../../ v2lin.......... blah blah i would actually get a error saying
semGive() undeclared or something
so is there another way to link it or am i missing something And i even loaded the library from
v2lin_v02/lib by
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/root/Desktop/VMainlineV3/v2lin_v02/lib