我使用C++語言在Windows7 x64上工作。LNK 2019 ShellExecuteEx無法解析的外部符號Qt Creator
我創建了一個項目,當我使用ShellExecuteEx函數向我的網絡攝像頭顯示標記時打開Firefox瀏覽器。我的項目使用Visual Studio 2010
但是,效果很好,當我嘗試運行我的Qt Creator的項目,我得到這個錯誤:
main_cam.obj:-1: error: LNK2019: riferimento al simbolo esterno [email protected] non risolto nella funzione _main
debug\cam.exe:-1: error: LNK1120: 1 esterni non risolti
的代碼是:
#include <iostream>
#include <stdio.h>
#include <string> // for strings
#include <iomanip> // for controlling float print precision
#include <sstream> // string to number conversion
#include <windows.h>
#include <ShellAPI.h>
include [...]
int main() {
[...]
SHELLEXECUTEINFO ShExecInfo = {0};
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = NULL;
ShExecInfo.lpFile = "firefox.exe";
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_SHOW;
ShExecInfo.hInstApp = NULL;
[...]
if (condition_is_verified) {
ShExecInfo.lpParameters = (LPCWSTR)"www.google.it";
ShellExecuteEx(&ShExecInfo);
WaitForSingleObject(ShExecInfo.hProcess,INFINITE);
}
[...]
}//end main
我認爲問題是shell32.lib。如果是這樣,我的電腦裏沒有這個庫。我該如何解決它?
你能幫我嗎?
在此先感謝!
你有沒有找到解決此問題的方法 –
不,我沒有找到解決方案 – Cristina1986