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 ==========
如何解決此問題?