Skip to content

unable to link this library to my vs code #129

Answered by AndreRenaud
shreya-spr asked this question in Q&A
Discussion options

You must be logged in to vote

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 using gcc -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 a Makefile or some other build tool?

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@shreya-spr
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by AndreRenaud
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants