creating libraries in c
i was wondering how do u link asm code to c
I work with turbo c
how do they link their header file prototypes to the libraries?
i have some asm code which i have converted to obj, and i have a header file declaring the functions as extern
how do i link this header file to the assembly code??
You assemble the assembly code and compile the C code and then link the object modules together.
Header files are not linked, they are used by the compiler for definitions and prototypes. If you have a function written in assembly and use it in the C file, you declare it in the C-code as extern. The linker will search for the function when linking, if the linker could not find it, it will give you the message "could not resolve function blahblah".
Download Book from this site
It's really useful if you want to learn about mixing assembly programs with C.
Uses NASM as assembler.