开发者

problem with simple dll in c++

Hello i do not use c++ but i try to make a simple dll in c++ by usin Microsoft visual studio 2008 this my steps 1-开发者_如何学JAVAnew project 2-select win32 and chose win32 project 3- from the win Application Wizard i chose Dll and in Additional Option i celect Empty Project 4-right click "Source Files" and add new item

5- chose c++ file(.cpp) 6- in this file i write this code

#include <windows.h>
__declspec(dllexport) int ss()
{
return 5;
}

7-Build the project >> Build Succeeded

but there is no dll file

what is the wrong ??

Thanks in advance.


Where are you checking for the .dll output? By default it outputs to the Solution (NOT Project) debug/release folder.

If you are new to .dll building in Visual Studio I would suggest starting a project in a similar manner but NOT selecting empty project, and selecting 'exports symbols'. By doing this Visual Studio will generate an example file that shows you a good notation for defining exports.


Before you compile make sure you set up the buildconfiguration to "Release" and you have to save the whole project somewhere before you compile, otherwise it's located in a temp-folder. After you saved it, compile it and look inside the projectfolder. There should be a folder named "bin" with subfolders. Look inside those subfolders and you should find your dll!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜