2
。 我在MSDN中找到了一个名为“使用文本编辑器创建COM服务器”的示例。 http://msdn.microsoft.com/en-us/library/2wad1c0e(v=vs.71).aspx从空项目开始创建com库
它从命令promt编译得很好,但不是从Visual Studio IDE编译。
我决定把这个项目移到Visual Studio。 我创建了新项目(文件>>新建>>项目>>空项目),并将MyServer.cpp文件添加到“源文件”并将MyIncludes.h添加到头文件。我在尝试构建项目后出现以下错误:
1>------ Build started: Project: Myserver, Configuration: Release Win32 ------
1>Compiling...
1>MyServer.cpp
1>.\MyServer.cpp(26) : warning C4581: deprecated behavior: '"apartment"' replaced with 'apartment' to process attribute
1>Linking...
1> Creating library C:\Myserver\Release\Myserver.lib and object C:\Myserver\Release\Myserver.exp
1>LINK : fatal error LNK1561: entry point must be defined
1>Build log was saved at "file://c:\Myserver\Myserver\Release\BuildLog.htm"
1>Myserver - 1 error(s), 1 warning(s)
========= Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
如何解决此问题?