Click here to Skip to main content
15,900,461 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I need steps to link database with C ? Also give C code with exp.

[edit]Volume down applied[/edit]
Posted
Updated 30-Jun-11 20:05pm
v3
Comments
Sergey Alexandrovich Kryukov 1-Jul-11 2:14am    
Ask your question if you have one. Kindly say "please". :-)
--SA

1 solution

Linking is done sending directives to the linker. It is not done in code (ANSI C) If you use MSVC the closest you get is to add a #pragma comment(lib libfile.lib)
 
Share this answer
 
Comments
Awa_tcp 1-Jul-11 7:03am    
Hi Nklas

It's good. But suppose I have an Api and I want it to link with a sql server .Will u please explain it with an example.

Thanks
Niklas L 1-Jul-11 12:38pm    
Check the specific API on MSDN. The documentation almost always contains info on what lib file to use at the bottom of the page.
Awa_tcp 2-Jul-11 2:18am    
Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900