User forums > Help
Unable to read source file
BlueHazzard:
what does the debugger log tell you? Pleas enable full debugger logging and post it here (Settings->Debigger->select default, ot gdb on the right side->Full logging
LuiZiffer:
--- Quote ---Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
src
Adding source dir: /home/luiziffer/trunk/src/
Adding source dir: /home/luiziffer/trunk/src/
Adding file: /home/luiziffer/trunk/src/devel30/codeblocks
Changing directory to: /home/luiziffer/trunk/src/devel30
Set variable: LD_LIBRARY_PATH=.:/home/luiziffer/trunk/src/base/tinyxml:/home/luiziffer/trunk/src/devel30:/usr/lib64:
[debug]Command-line: /usr/bin/gcc -nx -fullname -quiet -args /home/luiziffer/trunk/src/devel30/codeblocks
[debug]Working dir : /home/luiziffer/trunk/src/devel30
Starting debugger: /usr/bin/gcc -nx -fullname -quiet -args /home/luiziffer/trunk/src/devel30/codeblocks
Setting SHELL to '/bin/sh'
done
[debug]gcc: error: unrecognized command line option -quiet
[debug]gcc: error: unrecognized command line option -nx
[debug]gcc: error: unrecognized command line option -fullname
[debug]gcc: error: unrecognized command line option -args
Debugger finished with status 1
--- End quote ---
I found the setting Full (Debug) Log in Common
oBFusCATed:
Your debugger settings are wrong.
You've set gcc as debugger instead of the correct gdb.
BlueHazzard:
--- Quote ---Your debugger settings are wrong.
You've set gcc as debugger instead of the correct gdb.
--- End quote ---
You can fix this in Settings->Debugger->Default on the left side->Executable path-> point it to gdb
tianrenli92:
I figured out the reason.
I created two files. test has 616 bytes, which cannot be opened in c::b in Ubuntu (Windows subsystem), with the error described in the original post, and test2 has 617 bytes, which can be opened:
https://imgur.com/a/3eZv6kG
Notice the size on disk, test is 0 byte, while test2 is 4KB.
This happens if the file is so small that its contents and the filesystem bookkeeping fit in 1KB. To save disk space, NTFS keeps small files "resident", storing their contents right in the file record, so no cluster has to be allocated for it.
reference: https://superuser.com/questions/1030800/how-can-a-files-size-on-disk-be-0-bytes-when-theres-data-in-it
TL;DR: If the file is too small (<617B), it may not be found by c::b.
Anyone know how to report the bug?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version