Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Codeblocks Error "Failed to convert file"

(1/2) > >>

tiwag:

Hi guys !

since a long time i managed to recompile CB from SVN using the latest WX 2.8.4

but i get a lot of errors of the type

Codeblocks Error

--- Quote ---Failed to convert file "x:\y\filename.cpp" to Unicode.
--- End quote ---

when using the Threadsearch plugin and the Codestatistics plugin
The error is showed for some files, but not for all.

where in the code is this error message emitted, i couldn't find it  :shock: anywhere
seems that i've too much distance to the CB sources  :(  atm

brgds, tiwag

dje:
Hi !

I think this error comes from wxWidgets wxTextFile implementation but I didn't have time to check it.
wxTextFile is used both in Threadsearch and Codestatistics plugins.

Dje

tiwag:
thanks for your tip with wxTextFile

i've found a workaround with which it runs fine on WinXP,
just changed wxTextFile::Open() call to use "wxConvFile" parameter.

here is the patch:

--- Quote ---Index: contrib/codestat/codestatexec.cpp
===================================================================
--- contrib/codestat/codestatexec.cpp   (revision 4152)
+++ contrib/codestat/codestatexec.cpp   (working copy)
@@ -163,7 +163,7 @@
                                  long int &comment_lines, long int &empty_lines, long int &total_lines)
 {
    wxTextFile file;
-   if (file.Open(filename.GetFullPath()))
+   if (file.Open(filename.GetFullPath(),wxConvFile))
    {
       bool multi_line_comment = false;
       total_lines += file.GetLineCount();

--- End quote ---

could some Linux dev test this please if it works with Linux too ?
thanks.


attached is the patched ThreadSearch plugin (V0.61 with wxTextFile patch)


[attachment deleted by admin]

dje:
Hi Tiwag !

Thanks for the patch !
I'll test it this WE.

I'm about to release ThreadSearch 0.7 plugin but I have link problems on ubuntu.
I updated my Ubuntu 6.10 environment to wxWidgets 2.8.4 following cstudent wiki page.

My environment seems OK but I can't link codeblocks app because of undefined references (wxFont and others).
I have to fix that before testing on linux but I am a newbee on this OS.

Dje

tiwag:
@Yiannis

maybe you want to have a look at some code, where wxTextFile::Open() is used in CB sdk too.

it could happen, that there are some silent wxTextFile::Open() failures too.




[attachment deleted by admin]

Navigation

[0] Message Index

[#] Next page

Go to full version