When I compile and run the following program
#include <windows.h>
#include <wchar.h>
PWSTR Brackets1 = L"(%s)\n";
PWSTR Brackets2 = L"(%ls)\n";
int main()
{
wprintf(Brackets1, L"Hello");
wprintf(Brackets2, L"Hello");
return 0;
}
I get with Pelles C and Pelles runtime the following result:
(H)
(Hello)
With Pelles C and linking with msvcrt.lib, lcc-win32, MinGW (gcc 4.4.0) and Visual C++ 2008 Express Edition I get:
(Hello)
(Hello)
I think this is a differance in the hole family of wprintf-functions. I think not that the kind how Pelles runtime-function works is wrong. I just want to say, that there is a diffence and the most time Pelle tries to be compatible with the Microsoft products.
This has been discussed before, and I strongly prefer the standard C way (so much that I'm unwilling to change it).
Quote from: Pelle on May 18, 2009, 03:17:43 PM
This has been discussed before, and I strongly prefer the standard C way (so much that I'm unwilling to change it).
Is OK. And if somebody will use the Microsoft way of runtime, there is a tool (Dll2Inc) from Vortex (http://www.vortex.masmcode.com/) to create a msvcrt.def and with polib a msvcrt.lib from the def-file.