Hallo,
Ik ben wat aan het klooien geweest met een windows applicatie in C++ maken, gebruik VC++ Express, had als project type windows forms opgegeven wat prima werkt en ik inmiddels instellingen van heb aangepast. Nu probeerde ik echter wat uit met een dialoog venster, en liep tegen dit vreemde probleem aan:
1>wintest.obj : error LNK2028: unresolved token (0A000016) "extern "C" int __stdcall MessageBoxW(struct HWND__ *,wchar_t const *,wchar_t const *,unsigned int)" (?MessageBoxW@@$$J216YGHPAUHWND__@@PB_W1I@Z) referenced in function "int __clrcall main(cli::array<class System::String ^ >^)" (?main@@$$HYMHP$01AP$AAVString@System@@@Z)
1>wintest.obj : error LNK2019: unresolved external symbol "extern "C" int __stdcall MessageBoxW(struct HWND__ *,wchar_t const *,wchar_t const *,unsigned int)" (?MessageBoxW@@$$J216YGHPAUHWND__@@PB_W1I@Z) referenced in function "int __clrcall main(cli::array<class System::String ^ >^)" (?main@@$$HYMHP$01AP$AAVString@System@@@Z)
Wat is hier mis gegaan? Dit is mijn main cpp bestand, het is gewoon wat je krijgt als je voor forms project kiest, ik heb enkel de ::MessageBoxW() regel toegevoegd.
#include "stdafx.h"
#include "Form1.h"
#include <stdio.h>
#include <windows.h>
using namespace wintest;
[STAThreadAttribute]
int main(array<System::String ^> ^args)
{
// Enabling Windows XP visual effects before any controls are created
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
// Create the main window and run it
Application::Run(gcnew Form1());
::MessageBoxW(NULL,L"Question",L"Title",MB_OK);
return 0;
}
Die errors zijn voor mij onverklaarbare brij en ik hoop dat iemand mij kan uitleggen hoe ze op te lossen
Bedankt
Ik ben wat aan het klooien geweest met een windows applicatie in C++ maken, gebruik VC++ Express, had als project type windows forms opgegeven wat prima werkt en ik inmiddels instellingen van heb aangepast. Nu probeerde ik echter wat uit met een dialoog venster, en liep tegen dit vreemde probleem aan:
1>wintest.obj : error LNK2028: unresolved token (0A000016) "extern "C" int __stdcall MessageBoxW(struct HWND__ *,wchar_t const *,wchar_t const *,unsigned int)" (?MessageBoxW@@$$J216YGHPAUHWND__@@PB_W1I@Z) referenced in function "int __clrcall main(cli::array<class System::String ^ >^)" (?main@@$$HYMHP$01AP$AAVString@System@@@Z)
1>wintest.obj : error LNK2019: unresolved external symbol "extern "C" int __stdcall MessageBoxW(struct HWND__ *,wchar_t const *,wchar_t const *,unsigned int)" (?MessageBoxW@@$$J216YGHPAUHWND__@@PB_W1I@Z) referenced in function "int __clrcall main(cli::array<class System::String ^ >^)" (?main@@$$HYMHP$01AP$AAVString@System@@@Z)
Wat is hier mis gegaan? Dit is mijn main cpp bestand, het is gewoon wat je krijgt als je voor forms project kiest, ik heb enkel de ::MessageBoxW() regel toegevoegd.
#include "stdafx.h"
#include "Form1.h"
#include <stdio.h>
#include <windows.h>
using namespace wintest;
[STAThreadAttribute]
int main(array<System::String ^> ^args)
{
// Enabling Windows XP visual effects before any controls are created
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
// Create the main window and run it
Application::Run(gcnew Form1());
::MessageBoxW(NULL,L"Question",L"Title",MB_OK);
return 0;
}
Die errors zijn voor mij onverklaarbare brij en ik hoop dat iemand mij kan uitleggen hoe ze op te lossen

Bedankt
Laatst bewerkt: