Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions targets/win32/nanoCLR/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
#include <nanoCLR_Application.h>
#include <target_common.h>
#include <iostream>
#include <locale>
#include <codecvt>
#include <string>

//
// UNDONE: Feature configuration
Expand Down Expand Up @@ -68,7 +71,7 @@ bool Target_GetReleaseInfo(NFReleaseInfo &releaseInfo)
/////////////////////////////////////////////////////////////////////////////
//

int _tmain(int argc, wchar_t *argv[])
int _tmain(int argc, _TCHAR *argv[])
{
wprintf(L"\n.NET nanoFramework nanoCLR WIN32 v");
std::cout << VERSION_STRING;
Expand All @@ -87,10 +90,11 @@ int _tmain(int argc, wchar_t *argv[])
// fill arguments from command line
clrSettings.StartArgs.resize(argc - 1);

std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter;

for (int i = 0; i < argc - 1; i++)
{
std::wstring argv_ = std::wstring(argv[1 + i]);
clrSettings.StartArgs[i] = argv_;
clrSettings.StartArgs[i] = converter.from_bytes(argv[1 + i]);
}

ClrStartup(clrSettings);
Expand Down