How do I insert a library in MVC++?
A verry trivial question, but the program is new to me...
How do I insert a library in MVC++?
A verry trivial question, but the program is new to me...
-We're living in a illusion!
-Ok, if that's what you think!
What do you mean? Static library? Dynamic library? ... Header file?
if the library is in the current working directory of your program, ie, for the debug build, with your source files, or for the release build, with your executable, you can use the #pragma command to load it up. For more information on that, do a search for libraries on this board or search my previous posts for one in a thread about libraries.
However, I don't like to do it that way because then you have to have a copy of the library in every folder that uses it. For MSVC++, you can add the static library (.lib) in project settings in the link tab. The .lib should be in the Micorsoft Visual Studio\vc98\lib directory, and it's equivalent dynamic library(.dll) should be in a system directory, such as windows\system32.
Most common windows .dlls have a .lib provided by MSVC++ already.
So, to add the Common Controls dll to your project, which is necessary for tree views, progress bars, etc, add comctl32.lib to the link section of project settings, include its header (commctrl.h), and away you go.
[email protected]
Microsoft Visual Studio .NET 2003 Enterprise Architect
Windows XP Pro
Code Tags
Programming FAQ
Tutorials
Code:#pragma comment(lib,"yourlib.lib")