samedi 5 mai 2012 01:49
I'm a noob when it comes to using dlls. I have a C++/Direct3D metro app that I would like to export as a DLL for other (C++) projects to use. After doing some reading for a while I am stumped on why my project still will not build.
1. I have configured the Direct3D metro app to build as a DLL and I have prefixed all of my classes in the project with __declspec(dllexport). This builds fine and produces a dll.
2. I add another project to the same solution and I add a reference to the existing DLL project. I then configure the new application to include the header directory for the DLL project.
3. The new project is also a Direct3D metro app and I have included all of the necessary headers and libraries, the build error is related to unresolved externals from the DLL project.
Any help would be greatly appreciated, I have been stuck on this for a while.
Toutes les réponses
lundi 7 mai 2012 11:21Modérateur
You should include the lib file to the Direct3D metro app.
Right Click your project->Properties->Configuration properties->Linker->Input-> Addition Dependencies, add the lib file name general with the DLL.
Generally speaking, the lib name is the same with dll name +.lib.
Jesse Jiang [MSFT]
MSDN Community Support | Feedback to us
- Marqué comme réponse mbradber mardi 8 mai 2012 01:15