Visual Studio Express 2010を使用して、Windowsアプリケーションを作成し、Windowsアプリケーションと空プロジェクトのオプションを用意しました。私は次のエラーを得たWindowsプログラミングチュートリアルで未解決の外部シンボル__RTC_ *
#include <windows.h>
#include <shobjidl.h>
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE, PWSTR pCmdLine, int nCmdShow)
{
HRESULT hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED |
COINIT_DISABLE_OLE1DDE);
if (SUCCEEDED(hr))
{
IFileOpenDialog *pFileOpen;
// Create the FileOpenDialog object.
hr = CoCreateInstance(CLSID_FileOpenDialog, NULL, CLSCTX_ALL,
IID_IFileOpenDialog, reinterpret_cast<void**>(&pFileOpen));
if (SUCCEEDED(hr))
{
// Show the Open dialog box.
hr = pFileOpen->Show(NULL);
// Get the file name from the dialog box.
if (SUCCEEDED(hr))
{
IShellItem *pItem;
hr = pFileOpen->GetResult(&pItem);
if (SUCCEEDED(hr))
{
PWSTR pszFilePath;
hr = pItem->GetDisplayName(SIGDN_FILESYSPATH, &pszFilePath);
// Display the file name to the user.
if (SUCCEEDED(hr))
{
MessageBox(NULL, pszFilePath, L"File Path", MB_OK);
CoTaskMemFree(pszFilePath);
}
pItem->Release();
}
}
pFileOpen->Release();
}
CoUninitialize();
}
return 0;
}
:
1>------ Rebuild All started: Project: Test05, Configuration: Debug Win32 ------
1> Test05.cpp
1>Test05.obj : error LNK2019: unresolved external symbol @[email protected]
referenced in function [email protected]
1>Test05.obj : error LNK2019: unresolved external symbol __RTC_CheckEsp referenced in
function [email protected]
1>Test05.obj : error LNK2001: unresolved external symbol __RTC_Shutdown
1>Test05.obj : error LNK2001: unresolved external symbol __RTC_InitBase
1>LINK : error LNK2001: unresolved external symbol _wWinMainCRTStartup
はここで何が起こっている私は、MSDNのWindowsのチュートリアルからfollowing code snippetを試してみましたか?最高私はwWinMain
と何かを話すことができますが、それはサイトから直接コピーされます。
コンパイラはプログラミング学習よりもずっと面倒なようです。私はいくつかの他のコードブロックを試した後でVisual C++を決定しましたが、Visual C++はほとんどのサポート(またはユーザーの大多数)を占めているように見えました。初心者です。
解決できましたか? –