Adding a library to an MFC project
So this might be super basic, but that's what happens when you get a job you aren't wholly qualified for, right?
I've got an MFC project, everything is working great, but I'm trying to add the string and stringstream directive into the project.
No matter where I put #include <string>
and #include <sstream>
I get the "string: undeclared identifier" error.
Tha开发者_开发技巧nks in advance? :D
Try std::string instead of string, since string is in the std namespace
Concerning that topic of this is
Adding a library to an MFC project
and I was searching for solution how to add dll to MFC project I will add here solution as time saver for all of you...
If you want to reference library you need 3 files:
- LibraryName.h
- LibraryName.lib
- LibraryName.dll
Follow steps:
- Add all these to you solution.
- In your application file add header file using #include "LibraryName.h"
- Click right mouse button on your project and chose "References"
- Go to Configuration Properties -> Linker -> Input
- In field Additional Dependencies write "LibraryName.lib", you can also check Ignore All Default Libraries to No
Compile and Have Fun!
精彩评论