Author Topic: When I open some source files they open as an empty file... Please Help.  (Read 10496 times)

Aaragus

  • Guest
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. :(

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Be patient!
This bug will be fixed soon...

Aaragus

  • Guest
Re: When I open some source files they open as an empty file... Please Help.
« Reply #2 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

Offline 280Z28

  • Regular
  • ***
  • Posts: 397
  • *insert unicode here*
Re: When I open some source files they open as an empty file... Please Help.
« Reply #3 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
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
 Check out The Sam Zone :cool:

mauser

  • Guest
Re: When I open some source files they open as an empty file... Please Help.
« Reply #4 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.

Aaragus

  • Guest
Re: When I open some source files they open as an empty file... Please Help.
« Reply #5 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!!

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: When I open some source files they open as an empty file... Please Help.
« Reply #6 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.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Aaragus

  • Guest
Re: When I open some source files they open as an empty file... Please Help.
« Reply #7 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!! :)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: When I open some source files they open as an empty file... Please Help.
« Reply #8 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 ;-) )
« Last Edit: January 03, 2006, 09:16:44 pm by killerbot »

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: When I open some source files they open as an empty file... Please Help.
« Reply #9 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.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline kkez

  • Almost regular
  • **
  • Posts: 153
    • WinapiZone
Re: When I open some source files they open as an empty file... Please Help.
« Reply #10 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  :?

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: When I open some source files they open as an empty file... Please Help.
« Reply #11 on: January 03, 2006, 09:24:25 pm »
Never had problem with the 1.0rc2  :?

RC2 was ANSI.

Michael

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: When I open some source files they open as an empty file... Please Help.
« Reply #12 on: January 03, 2006, 09:37:05 pm »
kdesvn and the other one was rapidsvn