I have some strange problems with latest CC .. this is my test code:
void getBase(int n) {
}
int main() {
return 0;
}
On first project startup is everything as expected .. but after first change with save, list of global function symbols is updated, and it shows two symbols with names "e(" and "n(". Type of the first (from debug tool) is "v o i d g e t B a s". Also sometimes when i add somewhere space, after save, there are no symbols at all ...
The only solution I found is to delete .layout file for project and restart C::B, but next save, ant it is again broken ... anyone with the same problems?
haha,get the reason.
patch:
Index: src/include/filemanager.h
===================================================================
--- src/include/filemanager.h (revision 5979)
+++ src/include/filemanager.h (working copy)
@@ -144,7 +144,19 @@
NullLoader(const wxString& name, char* buffer, size_t size) { fileName = name; data = buffer; len = size; Ready(); };
void operator()(){};
};
-
+class EditorReuser : public LoaderBase
+{
+public:
+ EditorReuser(const wxString& name, const wxString& s)
+ {
+ fileName = name;
+ len = strlen(s.mb_str(wxConvUTF8));
+ data = new char[len + 1];
+ strcpy(data, (const char*)s.mb_str(wxConvUTF8));
+ Ready();
+ }
+ void operator()(){};
+};
// ***** class: FileManager *****
class FileManager : public Mgr<FileManager>
{
Index: src/sdk/filemanager.cpp
===================================================================
--- src/sdk/filemanager.cpp (revision 5979)
+++ src/sdk/filemanager.cpp (working copy)
@@ -138,12 +138,8 @@
cbEditor* ed = em->GetBuiltinEditor(em->GetEditor(i));
if(ed && fileName == ed->GetFilename())
{
- wxString s(ed->GetControl()->GetText());
- #if wxCHECK_VERSION(2, 9, 0)
- NullLoader *nl = new NullLoader(file, (char*) s.wx_str(), s.length() * sizeof(wxChar));
- #else
- NullLoader *nl = new NullLoader(file, (char*) s.c_str(), s.length() * sizeof(wxChar));
- #endif
+
+ EditorReuser *nl = new EditorReuser(file, ed->GetControl()->GetText());
return nl;
}
}
I indeed also had crashes when whatever project was loaded.
No just update, but make or make clean now gives the following error :
rm: cannot remove `.libs/tinystr.o': Permission denied
rm: cannot remove `.libs/tinystr.o': Permission denied
g++ -DHAVE_CONFIG_H -I. -I../../../src/include -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../../../src/include/wxscintilla/include -I../../../src/include -I../../../src/include/tinyxml -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT tinystr.lo -MD -MP -MF .deps/tinystr.Tpo -c tinystr.cpp -fPIC -DPIC -o .libs/tinystr.o
Assembler messages:
Fatal error: can't create .libs/tinystr.o: Permission denied
make[3]: *** [tinystr.lo] Error 1
make[3]: Leaving directory `/home/lieven/Projects/Codeblocks/trunk/src/base/tinyxml'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/lieven/Projects/Codeblocks/trunk/src/base'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/lieven/Projects/Codeblocks/trunk/src'
make: *** [all-recursive] Error 1