In console programs compiled through the Borland compiler and including <string>, where string output is attempted through the cout command:
Program compiles 100% with no warnings or errors.
On execute, the following errors occur:
Application Error: The instruction at "0x00405bd8" referenced memory at "0x000000001". The memory could not be "read".
This error repeats on selecting OK to terminate program. After selecting OK again, the following error occurs:
The exception unknown software exception (0xc0000027) occured in the application at location 0c7c80de9c.
The application then closes, returning:
Process returned -1073741819 (0xC0000005) execution time : 269.703 s
Press any key to continue.
I know the knee-jerk reaction is to point at the compiler, but the same code compiles and runs fine from the command line. I believe C::B is invoking command line switches in the linker that aren't necessary, aren't switchable through C::B's interface, and are deadly to reading strings from memory. I use very basic switches (essentially none, actually) on the command line. I also do not separately invoke the linker. Here is the command line output from C::B :
bcc32.exe -q -w -x -v -tWC -IE:\PortableApps\Borland\BCC55\Include -IE:\Documents\Programming\StringErr -oobj\Debug\main.obj -c main.cpp
main.cpp:
ilink32.exe -q -ap -v -LE:\PortableApps\Borland\BCC55\Lib -LE:\PortableApps\Borland\BCC55\Lib\PSDK c0x32 obj\Debug\main.obj ,bin\Debug\StringErr.exe,,cw32mt.lib import32.lib ,,
Output size is 119.00 KB
Process terminated with status 0 (0 minutes, 1 seconds)
0 errors, 0 warnings
Any experience with this problem? Any help would be greatly appreciated!