简体   繁体   中英

Visual Studio Compiler Error

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 ad to the release files. For example when the DLL is supposed to be SimpleDLL.dll (The project name is SimpleDLL) visual studio adds ad 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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM