So your previous code file is overwritten with an empty file, but you can still see the code in the editor tab, if it is open.
This happens automatically when building or when you save the file by the save command, without any warning or message.
When building, the empty file is compiled to an object file without any code and data. When this is passed to the linker, it will not find the code and data and complain about undefined references.
CodeLite rev. 5770, wxWidgets 2.9.4
Global editor preferences: file font encoding: ISO-8859-1 (not UTF-8, because I use Windows API directly).
But I have to process UTF strings, too.
Sample (g++ console project):
Code: Select all
#include <stdio.h>
int main(int argc, char **argv)
{
printf("Grüße!\n"); // in UTF-8 "Grüße!"
return 0;
}
Code: Select all
const char* utf8Greetings = "Grüße!";
As this obviously is a bug in wxWidgets, I think an additional check would be appropriate before CodeLite lets it write the file.
Thank you,
Fred