Hello Community!
I copied this code to my Visual Studio 2010 and followed of course the instructions inTHIS TUTORIAL.
When I tried to compile the code I got the error message:
Serial.cpp(16): error C2664: 'CreateFileW': Konvertierung des Parameters 1 von 'char *' in 'LPCWSTR' nicht möglich
Translated: converting from char* to LPCWSTR is not possible in the CreateFileW which is requested in the Serial.CPP
Google told me a solution:
Change the properties from Unicode to Multibyte Code. -> No problem, BUT, i get a new error message which I don't know how to solve:
LINK : fatal error LNK1287: Ungültiger verwalteter Einstiegspunkt "int __clrcall main(int,char * * const)" (?main@@$$HYMHHQAPAD@Z)
Translated: Not valid Entrypoint in" ... ".
Anyone has an idea what the problem could be?
I researched for similar errors and found this information, but my Visual Studio doesn't report more than mentioned above to me, throughout I hope that maybe the solution is the same.
warning LNK4002: "int __clrcall main(int,char * * const)" (?main@@$$HYMHHQAPAD@Z) defined in Release\INIwriter.obj
warning LNK4022: cannot find unique match for symbol 'main
Please bear in mind, that this Error is not the one I get! May this helps to find the Problem. What about the Release\INIwriter.obj?
My Visual Studio is running in Debug Mode at the moment.
Some additional information:
I have at all now three Serial Connection Codes. Two of them run fine. One of these two had the same problem with the conversion. But setting it to Multibyte-Code helped and since then it works fine.
Why I ask you for support is, that I want this code to run, because upper mentioned tutorial would have helped me a lot, especially it was not hard to find, BUT sadly it doesn't work. Think we should change this.