Just trying to get started using C++BuilderX PE, and I can't even get
the simplest app out there short of Hello World working.
#include <iostream>
#include "tchar.h"
int _tmain(int argc, _TCHAR* argv[])
{
for (int i=1; i<argc; ++i) {
std::cout << argv[i] << _T(" Length: ") << _tcslen(argv[i])
<< std::endl;
}
return 0;
}
I add the -tWU flag to BCC32 and change c0x32.obj to c0x32w.obj in the
linker line, and it compiles just fine, but when I run it, it fails
during startup with an access violation in
ntdll!RtlpWaitForCriticalSection at 7C918FEA. (ie. before ever reaching
my code.) It works as you would expect if I compile and run it as a
non-Unicode app. Is there something obvious that I'm doing wrong? There
seems to be a dearth of documentation on this, and I'm sure those of you
making real applications with this IDE must be able to get something
like this working.
Dan Rosart
tor...@rogers.com
Wide characters as in Unicode are wchar_t and not char type variables and
use 'wcout' and not 'cout'. Try changing 'std::cout' to 'std::wcout'.
. Ed
> Dan Rosart wrote in message
> news:42ba1dbd$1...@newsgroups.borland.com...
. Ed
> Dan Rosart wrote in message
> news:42ba...@newsgroups.borland.com...