WindowsForms/CLR Nicht aufgelöstes externes Symbol mit ShellExceute
-
Hallo,
bei diesem Code:
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { ShellExecute( NULL, L"open", L"notepad.exe", NULL, NULL, NULL ); }
bekomme ich folgenden Fehler:
1>AppStarter2.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""extern "C" struct HINSTANCE__ * __stdcall ShellExecuteW(struct HWND__ *,wchar_t const *,wchar_t const *,wchar_t const *,wchar_t const *,int)" (?ShellExecuteW@@$$J224YGPAUHINSTANCE__@@PAUHWND__@@PB_W111H@Z)".
1>D:\Projekte\AppStarter2\Release\AppStarter2.exe : fatal error LNK1120: 1 nicht aufgelöste externe Verweise.Kann mir da jemand bitte weiterhelfen!
Besten Dank
-
#pragma comment(lib, "shell32.lib")
Aber warum nimmst Du nicht
System::Diagnostics::Process::Start
, wenn Du schon C++/CLI verwendest!?