FAQ-Issues and Workarounds

From CodeBlocks
Revision as of 01:42, 18 November 2011 by Alpha (Talk | contribs) (Added scrolling distortion question.)

Jump to: navigation, search

Return to FAQ.


Q: Sometime, in the text editor, space bar triggers Code Completion, how do I fix that?

A: Information found on the forum.

It's possible to fix this issue editing the keyboard entry in /etc/X1/xorg.conf file. However, some recent distribs use HAL, therefore xorg.conf is empty (since Ubuntu 8.10 for instance). It's also possible to use a setxkbmap tool.

Hal Solution (Ubuntu 8.10 and above):

For Ubuntu (and other gnome desktops), another simple solution for the current user is to change a preference.

  1. Menu System => Preferences => Keyboard
  2. Select Tab Layout
  3. Edit "Layout Options..."
  4. Expand last option "Using space key to input non-breakable space character"
  5. 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"
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

Q: IDE is drawing the text from Right to Left?

A: Uncheck "Settings -> Environment -> View -> Internationalization" and restart Code::Blocks

Q: All the options in the debug menu are grayed out?

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 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 (*.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.

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.

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.

Return to FAQ.