Hi guys,

I wrote a program which used an external library. i was asked to include a .h file for compiling and link with the '.lib' while linking. I don't understand the reasons behind all this? Can someone explain?

1>What happens when i include the .h and link with the library?
2>What is the cause of the symbol referencing error?
3>and most important what difference does it make to the linking process when i use a .dll instead of a .a?

1. There are additional functions in the library file. That's why you'll have to link to it. The header file (.h) tells the compiler which functions are in the library you're linking to.

2. You're using functions that the linker can't find

3. What do you mean?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.