unable to link this library to my vs code #129
-
Have downloaded this library and copied it in the mingw64/include path. But vsc does not seem to recognize the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Do you have the error message that it produces? If you've put pdfgen.c & pdfgen.h in the same folder as the code where you're trying to use it, you should probably use quotes for the #include, not |
Beta Was this translation helpful? Give feedback.
-
It looks like you're not linking pdfgen.c with your other C files (billing.c by the looks of it). That output doesn't show the actual command line that you used, but I'm assuming it's something like |
Beta Was this translation helpful? Give feedback.
It looks like you're not linking pdfgen.c with your other C files (billing.c by the looks of it). That output doesn't show the actual command line that you used, but I'm assuming it's something like
gcc billing.c
. That isn't enough - you either need to compile each .c file into it's own .o file separately, ie:gcc -o billing.o billing.c
,gcc -o pdfgen.o pdfgen.c
and then link them usinggcc -o myprogram billing.o pdfgen.o
, or you need to compile/link them all in one step, ie:gcc -o myprogram billing.c pdfgen.c
. Are you using aMakefile
or some other build tool?