Difference between revisions of "FAQ-Issues and Workarounds"
(Added "greater-than" question.) |
m (→Q: I cannot find any text in my Code::Blocks logs?: Make forum URL absolute) |
||
(10 intermediate revisions by 6 users not shown) | |||
Line 7: | Line 7: | ||
==== Q: Sometime, in the text editor, space bar triggers Code Completion, how do I fix that? ==== | ==== Q: Sometime, in the text editor, space bar triggers Code Completion, how do I fix that? ==== | ||
− | '''A:''' | + | '''A:''' '''The problem is solved in the version 12.11.''' |
− | + | On Ubuntu 12.04 LTS, version 10.05 from the official repos makes this space bar problem, upgrading to codeblocks 12.11 solved the problem. | |
+ | |||
+ | For earlier versions, there are (at least) 3 working fixes : | ||
+ | * [[#setxkbmap_Solution: | setxkbmap]] | ||
+ | * [[#Hal_Solution_.28Ubuntu_8.10_and_above.29: | Hal]] | ||
+ | * [[#setxkbmap_Solution: | xorg.conf]] | ||
+ | |||
+ | Information found [/index.php/topic,8291.0.html on the forum] | ||
+ | |||
+ | ===== ''setxkbmap Solution:'' ===== | ||
+ | |||
+ | run this command before running Code::Blocks (works fines for KUbuntu) | ||
+ | setxkbmap -option nbsp:none | ||
+ | if it's not enough you can try: | ||
+ | setxkbmap -option nbsp:none -model pc 105 -layout fr -variant latin 9 | ||
===== ''Hal Solution (Ubuntu 8.10 and above):'' ===== | ===== ''Hal Solution (Ubuntu 8.10 and above):'' ===== | ||
+ | |||
+ | Note : Hal is now [https://wiki.ubuntu.com/Halsectomy deprecated] | ||
For Ubuntu (and other gnome desktops), another simple solution for the current user is to change a preference. | For Ubuntu (and other gnome desktops), another simple solution for the current user is to change a preference. | ||
Line 52: | Line 68: | ||
It seems that KUbuntu requires the following line: | It seems that KUbuntu requires the following line: | ||
Option "XkbOptions" "nbsp:none" | Option "XkbOptions" "nbsp:none" | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==== Q: IDE is drawing the text from Right to Left? ==== | ==== Q: IDE is drawing the text from Right to Left? ==== | ||
Line 68: | Line 77: | ||
'''A:''' Code::Blocks can only use integrated debugging on an active project. Start a [[Creating a new project|new project]] and [[Creating a new project#Adding a pre-existing file|add the file]] to it. Also see [[debugging with Code::Blocks]]. | '''A:''' Code::Blocks can only use integrated debugging on an active project. Start a [[Creating a new project|new project]] and [[Creating a new project#Adding a pre-existing file|add the file]] to it. Also see [[debugging with Code::Blocks]]. | ||
− | ''Note: Code::Blocks only supports the GNU GDB and MSVC CDB debuggers.'' | + | ''Note: Code::Blocks currently only supports the GNU GDB and MSVC CDB debuggers.'' |
==== Q: My project works everywhere except one computer? ==== | ==== Q: My project works everywhere except one computer? ==== | ||
Line 76: | Line 85: | ||
==== Q: Syntax highlighting is broken; how do I fix it? ==== | ==== Q: Syntax highlighting is broken; how do I fix it? ==== | ||
− | '''A:''' Code::Blocks cannot know how to highlight your code unless it knows what lexer to use. This is normally automatically determined by the file extension, so it is important to save the file and name it correctly (<tt>*.c</tt> or <tt>*.cpp</tt> for C and C++ code). It is also possible to activate syntax highlighting on a temporary basis. Open ''Edit->Highlight mode'' and select the language the current file is using. | + | '''A:''' Code::Blocks cannot know how to highlight your code unless it knows what lexer to use. This is normally automatically determined by the file extension, so it is important to save the file and name it correctly (for example, <tt>*.c</tt> or <tt>*.cpp</tt> for C and C++ code). It is also possible to activate syntax highlighting on a temporary basis. Open ''Edit->Highlight mode'' and select the language the current file is using. Alternatively add the extension to the lexer configuration in the editor options. This will permanently apply the chosen syntax highlighting for all files with this extension. |
==== Q: I posted on the forums that Code::Blocks was not working, but no one could help me? ==== | ==== Q: I posted on the forums that Code::Blocks was not working, but no one could help me? ==== | ||
Line 84: | Line 93: | ||
==== Q: I cannot find any text in my Code::Blocks logs? ==== | ==== Q: I cannot find any text in my Code::Blocks logs? ==== | ||
− | '''A:''' On MS Windows, wxWidgets sometimes does not show the content of logs at first; scrolling in the log will bring the text to visibility. | + | '''A:''' On MS Windows, wxWidgets sometimes does not show the content of logs at first; scrolling in the log will bring the text to visibility. Please note that this is a known wxWidgets bug in wxWidgets v2.8.x. See more details in [https://forums.codeblocks.org/index.php/topic,15940.msg108421.html#msg108421 refresh issue in wx2.8.12] |
==== Q: Scrolling causes gray areas/distortions to obscure my code in the editor? ==== | ==== Q: Scrolling causes gray areas/distortions to obscure my code in the editor? ==== | ||
Line 100: | Line 109: | ||
Open ''Settings->Editor...->Keyboard shortcuts''. The command ''Ctrl-Alt-.'' is assigned to ''Menu bar->Search->Open include file'' by default. Changing or removing this shortcut should resolve the problem. | Open ''Settings->Editor...->Keyboard shortcuts''. The command ''Ctrl-Alt-.'' is assigned to ''Menu bar->Search->Open include file'' by default. Changing or removing this shortcut should resolve the problem. | ||
+ | |||
+ | ==== Q: Using Code::Blocks with high dpi screens and windows ==== | ||
+ | |||
+ | '''A:''' https://forums.codeblocks.org/index.php/topic,21119.msg145906.html#msg145906 | ||
+ | |||
---- | ---- | ||
Return to '''[[FAQ]]'''. | Return to '''[[FAQ]]'''. |
Latest revision as of 19:45, 26 December 2022
Return to FAQ.
Q: Sometime, in the text editor, space bar triggers Code Completion, how do I fix that?
A: The problem is solved in the version 12.11.
On Ubuntu 12.04 LTS, version 10.05 from the official repos makes this space bar problem, upgrading to codeblocks 12.11 solved the problem.
For earlier versions, there are (at least) 3 working fixes :
Information found [/index.php/topic,8291.0.html on the forum]
setxkbmap Solution:
run this command before running Code::Blocks (works fines for KUbuntu)
setxkbmap -option nbsp:none
if it's not enough you can try:
setxkbmap -option nbsp:none -model pc 105 -layout fr -variant latin 9
Hal Solution (Ubuntu 8.10 and above):
Note : Hal is now deprecated
For Ubuntu (and other gnome desktops), another simple solution for the current user is to change a preference.
- Menu System => Preferences => Keyboard
- Select Tab Layout
- Edit "Layout Options..."
- Expand last option "Using space key to input non-breakable space character"
- Select the last choice "Usual Space at any level"
This is not system wide.
A system wide solution would be to add an fdi file there (for instance)
/etc/hal/fdi/policy/99-x11-key_space_fix.fdi
put the right thing in it (I did not succeed), unplug your keyboard, plug it again.
Xorg Solution (prior Hal based distrib):
as root, edit /etc/X11/xorg.conf and find something like :
Section "InputDevice" Identifier "Generic Keyboard" Driver "kbd" ... Option "XkbVariant" "oss" EndSection
Try one of the following workarounds :
1. you comment the line
Option "XkbVariant" "oss"
like this
# Option "XkbVariant" "oss"
2. you replace
"XkbVariant" "oss"
with
"XkbVariant" "latin9"
This works for Ubuntu prior 8.10 (before hal)
It seems that KUbuntu requires the following line:
Option "XkbOptions" "nbsp:none"
Q: IDE is drawing the text from Right to Left?
A: Uncheck "Settings -> Environment -> View -> Internationalization" and restart Code::Blocks
A: Code::Blocks can only use integrated debugging on an active project. Start a new project and add the file to it. Also see debugging with Code::Blocks.
Note: Code::Blocks currently only supports the GNU GDB and MSVC CDB debuggers.
Q: My project works everywhere except one computer?
A: Some parts of Code::Blocks or the back-end compiler may not support non-ASCII characters (such as é) or possibly spaces. Try moving the project on the affected computer to a directory that contains neither of these in its path.
Q: Syntax highlighting is broken; how do I fix it?
A: Code::Blocks cannot know how to highlight your code unless it knows what lexer to use. This is normally automatically determined by the file extension, so it is important to save the file and name it correctly (for example, *.c or *.cpp for C and C++ code). It is also possible to activate syntax highlighting on a temporary basis. Open Edit->Highlight mode and select the language the current file is using. Alternatively add the extension to the lexer configuration in the editor options. This will permanently apply the chosen syntax highlighting for all files with this extension.
Q: I posted on the forums that Code::Blocks was not working, but no one could help me?
A: There is a distinct lack of crystal balls and divining mirrors here, so you may want to post some information. Using this template in your problem description would be a great help.
Q: I cannot find any text in my Code::Blocks logs?
A: On MS Windows, wxWidgets sometimes does not show the content of logs at first; scrolling in the log will bring the text to visibility. Please note that this is a known wxWidgets bug in wxWidgets v2.8.x. See more details in refresh issue in wx2.8.12
Q: Scrolling causes gray areas/distortions to obscure my code in the editor?
A: This has been a reported problem, sometimes occurring on Ubuntu (and its derivatives). There are several actions that seem to resolve the issue.
- Install all the newest updates from Update Manager.
- Reset Unity.
- unity --reset
- Reload compiz by switching to metacity, then back to compiz.
Q: I cannot type a greater-than '>' sign?
A: The keyboard shortcut Ctrl-Alt-. is known to occasionally conflict with this.
Open Settings->Editor...->Keyboard shortcuts. The command Ctrl-Alt-. is assigned to Menu bar->Search->Open include file by default. Changing or removing this shortcut should resolve the problem.
Q: Using Code::Blocks with high dpi screens and windows
A: https://forums.codeblocks.org/index.php/topic,21119.msg145906.html#msg145906
Return to FAQ.