Uso de Visual Studio Express 2010 Hice un proyecto de Windows con las opciones Aplicación de Windows y Proyecto vacío. Luego trató el following code snippet de los tutoriales de MSDN Windows:Símbolos externos sin resolver __RTC_ * en el tutorial de programación de Windows
#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;
}
me los siguientes errores:
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
lo que está pasando aquí? Lo mejor que puedo decir es qué hacer con wWinMain
, pero se copia directamente desde el sitio.
Los compiladores parecen ser mucho más problemáticos para mí que la programación de aprendizaje. Decidí en Visual C++ después de probar algunos otros (bloques de código en su mayoría), pero dado que Visual C++ parece tener más soporte (o al menos la mayoría de los usuarios) pensé que era mejor que nunca llegar a nada, ya que todos son tan poco intuitivos. Un principiante.
¿Pudo resolverlo? –