Reputation: 47
I was making a simple DLL as a test in visual studio 2010. Here is the code for SimpleCPP.cpp
#include iostream
#include "SimpleH.h"
namespace nmspace
{
void myclass::Crap()
{
std::cout << "Test." << std::endl;
}
}
Here is the code for the header file
#include <iostream>
namespace nmspace
{
class myclass
{
public:
static __declspec(dllexport) void Crap();
};
}
My problem is when I compile I get an error that says that visual studio can't find the file SimpleDLLd.dll. In closer inspection I see that when the program is compiling visual studio adds a d to the release files. For example when the DLL is supposed to be SimpleDLL.dll (The project name is SimpleDLL) visual studio adds a d and outputs SimpleDlld.dll. I tried doing the same thing in another project and it did the same thing. I then proceeded to Visual Studio 2013 and copy and pasted the contents of the cpp and header files into new files and surprisingly got the same exact result as Visual Studio 2010. How would I fix this error? Thank you for responding.
Upvotes: 0
Views: 239
Reputation: 41
Check the name of the build target in your project file settings. The name of the resulting file should be in the Linker->General->Output File setting in the project which is usually $(OutDir)$(TargetName)$(TargetExt) by default.
Upvotes: 1