Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Aaragus on January 03, 2006, 04:04:20 pm

Title: When I open some source files they open as an empty file... Please Help.
Post by: Aaragus on January 03, 2006, 04:04:20 pm
I have been searching for a good program to use in Linux, I have only been using C::B for 2 days now but I am very satisfied with it.  But I am having a problem that makes debugging impossible.  Many source files I try to open don't load the content of the file.  Is this some sort of a setup problem or could it be my source files?  The source files were created in Context, I used to create the source in windows and compile it with gcc in a linux shell.  As I said, some of my source files open without a problem, but others do not.  Any ideas or help would be greatly appreciated, this problem is frustrating me and I can't think of a solution. :(
Title: Re: When I open some source files they open as an empty file... Please Help.
Post by: mandrav on January 03, 2006, 04:08:09 pm
http://forums.codeblocks.org/index.php?topic=1673.0 (http://forums.codeblocks.org/index.php?topic=1673.0)
Title: Re: When I open some source files they open as an empty file... Please Help.
Post by: Aaragus on January 03, 2006, 06:58:55 pm
I read a lot and searched even more before I had written my original post.  Yet still I haven't found a solution or indication of what I can do to open these .c files that don't open.  I am using Debian Linux with C::B Build Dec. 12 2005, 16:33:17 - wx2.6.1 (Linux, unicode).  I don't think that this is a problem with C::B because I can open some .c files, but the others open empty.  Is there anything specific that would make a file not open?  Thanks in advance anyone who can help me.  :D
Title: Re: When I open some source files they open as an empty file... Please Help.
Post by: 280Z28 on January 03, 2006, 07:08:11 pm
I read a lot and searched even more before I had written my original post.  Yet still I haven't found a solution or indication of what I can do to open these .c files that don't open.  I am using Debian Linux with C::B Build Dec. 12 2005, 16:33:17 - wx2.6.1 (Linux, unicode).  I don't think that this is a problem with C::B because I can open some .c files, but the others open empty.  Is there anything specific that would make a file not open?  Thanks in advance anyone who can help me.  :D

Apply the patch in this thread to C::B svn revision 1651. :)

http://forums.codeblocks.org/index.php?topic=1833.0
Title: Re: When I open some source files they open as an empty file... Please Help.
Post by: mauser on January 03, 2006, 07:11:39 pm
Are the files you can't open in plain english. look at difference between the files you can open and the ones you can't. are they in the same encoding.
Title: Re: When I open some source files they open as an empty file... Please Help.
Post by: Aaragus on January 03, 2006, 07:37:22 pm
In Reply to Mauser - Yes I have checked out the files and saved them in various formats - Unicode, Windows format and Linux format and the files that work don't seem to be any diferent from the ones that don't, either way they still won't open, thanks for the ideas!

In Reply to 280Z28 - I downloaded the patch, but being as I only have used this program for 2 days I am not sure as to how I apply the patch.  If you could give me a few pointers that would be great!! Thanks!!
Title: Re: When I open some source files they open as an empty file... Please Help.
Post by: thomas on January 03, 2006, 07:43:13 pm
In Reply to 280Z28 - I downloaded the patch, but being as I only have used this program for 2 days I am not sure as to how I apply the patch.  If you could give me a few pointers that would be great!! Thanks!!
To apply a patch, you have to build Code::Blocks from sources. You can follow the instructions here: http://forums.codeblocks.org/index.php?topic=1701.0

You will have to apply the patch before you build (but after getting the sources, obviously).
For this, right-click into your working copy, and select "Apply patch" from the TortoiseSVN menu, then do as you are told, that's all :)

The install instructions are 99% correct, except that Unicode is now the default build.
Thus, you will want to build wxWidgets in Unicode mode, and just use CodeBlocks-NewBuild.cbp without any additional fuzz - it will do a Unicode build anyway.
Title: Re: When I open some source files they open as an empty file... Please Help.
Post by: Aaragus on January 03, 2006, 08:57:11 pm
Are those instructions for a Debian Linux Compile or for Windows?  I am using Debian Linux, to run the patch on Debian do I use the "Patch" command or is there a TortoiseSVN for Linux. I ran "apt-get install subversion" will this program do what TortoiseSVN does?  Thanks again!! :)
Title: Re: When I open some source files they open as an empty file... Please Help.
Post by: killerbot on January 03, 2006, 09:07:24 pm
on my suse I could install ksubversion and also another one (don't remember anymore). That K version was available in right click context, but it does not show such a nice conclusion as tortoise does, so you can check for all the files that have changed at which comments explain their changes (or I didn't find it yet, to be honest ,didn't search much, and did not read any manual for it ;-) )
Title: Re: When I open some source files they open as an empty file... Please Help.
Post by: thomas on January 03, 2006, 09:15:43 pm
Are those instructions for a Debian Linux Compile or for Windows?  I am using Debian Linux, to run the patch on Debian do I use the "Patch" command or is there a TortoiseSVN for Linux. I ran "apt-get install subversion" will this program do what TortoiseSVN does?  Thanks again!! :)
Ah right... forgot you were using Linux, sorry. No, Tortoise is not available for Linux. But you can use the tool killerbot named or just run svn from the commandline.
Title: Re: When I open some source files they open as an empty file... Please Help.
Post by: kkez on January 03, 2006, 09:18:04 pm
I had the same problem on windows with the svn version revision 1644 (unicode). Switching to the revision 1648 (unicode) did solve this problem. Never had problem with the 1.0rc2  :?
Title: Re: When I open some source files they open as an empty file... Please Help.
Post by: Michael on January 03, 2006, 09:24:25 pm
Never had problem with the 1.0rc2  :?

RC2 was ANSI.

Michael
Title: Re: When I open some source files they open as an empty file... Please Help.
Post by: killerbot on January 03, 2006, 09:37:05 pm
kdesvn and the other one was rapidsvn