Author Topic: Various questions and feedback...  (Read 14438 times)

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Various questions and feedback...
« on: July 18, 2008, 02:28:35 pm »
Hi all,

I'm part of a project where we develop a game and a game engine, which is for the moment about 15,000 lines of code.
We use Code::Blocks 8.02 as the IDE, SCons as the build tool ans Ubuntu as the developping platform. For integrating SCons with Code::Blocks, we make use of the "Use custom Makefile" feature, with a Makefile which looks like :
Code
all:
   scons
release:
   scons
debug:
   scons debug=1
cleanrelease:
   scons -c
cleandebug:
   scons debug=1 -c

It works well, however, when we get a long compilation error (for example, when it is related to the STL ^^), the log doesn't fit in the "Build messages" pane, and we have to rebuild it from the console in order to see the errors :( Is this a solved problem in the SVN version ? It would be very nice :)

Also :
- when I change the "Settings->Environment->General settings->Terminal to launch console programs" from "xterm -T $TITLE -e" to "gnome-terminal --title=$TITLE -e", or even "gnome-terminal -e", I get a console window which closes as soon as it opened, what could be the reason for that ? (NB : when launching with xterm, I get my OpenGL window which waits for me to press escape). I don't want to keep with xterm as it is impossible to do any copy/paste (or is this possible and I didn't find it ?)

- when debugging my project with GDB, when I want to use the "Find implementation" right click shortcut, the right click menu disappears less that 1 second after it appeared, because of debugging info (debug symbols or whatever) ; I have to be very fast in order to get the menu entry :D

- is it possible to log as I want the result of the execution of my program to some stdout.txt and stderr.txt file, from Code::Blocks, without having to change the project or the editor"s settings ? Or better, would it be possible to get this file loaded automatically into Code::Blocks as the execution of the program finishes ?

- as for the moment, when having a long log in a file, I use gedit to look at the logs as its "search" feature highlights all the occurences of the word in the file. Would it be possible to have such a "highlight all occurences of this word" feature into Code::Blocks ?

- in our project, we use a file structure which separates "src/" and "include/", but Code::Blocks also separates them in "Sources" and "Headers", so I get "Sources->src" in the project. Is it possible not to use such an automated ordering ?

- a cool feature of Code::Blocks is that it indicates the current namespace we are working in in a greyed toolbar ; however, it is not always up to date, and we had 2 classes "DebugCamera" and "BlenderCamera", and a friend of mine coded in the wrong class because the toolbar didn't indicate the right namespace...:(

- a very cool feature which lacks and would be very simple to add (or I didn't see that ?) : it would be very nice to be able to open a file which is part of the project just by writing its name, just as we can launch a program in GNOME using the Alt+F2 and typing its name :)

- the behavior of the tabs corresponding to the opened files can be very annoying (I don't manage to reproduce the behavior right now, sorry ^^). Would it be possible to customize this a little more, just like Firefox ? A very interesting Firefox extension is TabMixPlus, which permits having up to 3 lines of tabs ; something like this would be very cool :)

- the code completion doesn't work always very well (but I know that coding a good code completion must be very difficult ^^) ; particularly, I don't get any autocompletion concerning OpenGL nor GLFW, though I mentionned "/usr/include/GL" in my project's "C/C++ parser options" :(


Wow, that's a long post ^^

Thanks for those who will have the bravery to read it entirely, and thanks for the IDE :)

EDIT : sorry, yet another thing, but I suppose this is due to wxWidgets : would it be possible to be able to expand a folder in the Project browser just by double-clicking on the folder's name, instead of having to click exactly on the left arrow...? ^^
« Last Edit: July 18, 2008, 03:21:38 pm by Funto »

mariocup

  • Guest
Re: Various questions and feedback...
« Reply #1 on: July 18, 2008, 04:00:46 pm »
Hi Funto,

- in our project, we use a file structure which separates "src/" and "include/", but Code::Blocks also separates them in "Sources" and "Headers", so I get "Sources->src" in the project. Is it possible not to use such an automated ordering ?

you can use the menu Project->Project Tree and disable "Categorize by file types". You can also manage and add new file types.

Bye,

Mario

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Various questions and feedback...
« Reply #2 on: July 18, 2008, 04:19:55 pm »
 Various questions various answers  :roll:

- when I change the "Settings->Environment->General settings->Terminal to launch console programs" from "xterm -T $TITLE -e" to "gnome-terminal --title=$TITLE -e", or even "gnome-terminal -e", I get a console window which closes as soon as it opened, what could be the reason for that ? (NB : when launching with xterm, I get my OpenGL window which waits for me to press escape). I don't want to keep with xterm as it is impossible to do any copy/paste (or is this possible and I didn't find it ?)

If you turn on full commandline logging you should see which instruction is really used and what goes wrong: "Settings -> Compiler and debugger -> Global Compiler settings -> other settings (rightmost tab) -> Compiler Logging:"

xterm can copy and paste at least with highlighting the text with left mouse button pressed and paste with the middle mouse button.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Various questions and feedback...
« Reply #3 on: July 18, 2008, 04:46:15 pm »
- a cool feature of Code::Blocks is that it indicates the current namespace we are working in in a greyed toolbar ; however, it is not always up to date, and we had 2 classes "DebugCamera" and "BlenderCamera", and a friend of mine coded in the wrong class because the toolbar didn't indicate the right namespace...:(
I cannot reproduce. Do you have a step-by-step instruction for such cases?! For me it "just works".

EDIT : sorry, yet another thing, but I suppose this is due to wxWidgets : would it be possible to be able to expand a folder in the Project browser just by double-clicking on the folder's name, instead of having to click exactly on the left arrow...? ^^
I don't understand. What "left arrow"? I just have a "plus" there for folder and can open them via double-click already...?!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: Various questions and feedback...
« Reply #4 on: July 18, 2008, 05:06:57 pm »
mariocup >> thanks, I've just done that, it's ok :)

jens >> thanks also :) In fact, I'm already in full compiler logging ^^ I looked more in detail at gnome-terminal's options, and in fact gnome-terminal's "-e" option needs a quoted string ; however, the "-x" option uses the rest of the command line, so finally I put "gnome-terminal --title=$TITLE -x" and it works like a charm :) And thanks for the xterm trick :) In fact it also works with most UNIX applications, like gedit for example, but it's not the "real" copy-paste, as it uses a different buffer and is invalidated as soon as the text is deselected.

MortenMacFly >> are you using Windows ? (as you said "plus"...). I'm using Ubuntu and wxGTK, and when I double-click on the folder's name, it doesn't open ^^.

Smatcher

  • Guest
Re: Various questions and feedback...
« Reply #5 on: July 18, 2008, 05:19:57 pm »
Well actually here is the file ( a .txt, strange that .cpp isn't allowed).
I think that having the same function name in different namespaces might be responsible for this.

As a test i just opened the file out of any project and clicked on the display() function in the "function browser".
The text cursor went at the start of DebugGrid::display() and the function browser said DebugAxis::display() ( the function just above )


[attachment deleted by admin]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Various questions and feedback...
« Reply #6 on: July 18, 2008, 05:27:26 pm »
- the code completion doesn't work always very well (but I know that coding a good code completion must be very difficult ^^) ; particularly, I don't get any autocompletion concerning OpenGL nor GLFW, though I mentioned "/usr/include/GL" in my project's "C/C++ parser options" :(
GLUT really works, if one does it right... but ok... it's a bit tricky. ;-) The error that happens most is that the include is inside a #define, something like:
Code
#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
CodeCompletion does not handle defines correctly (as of now). Thus the parser won't identify "glut.h" as file to parse. Just remove the #define (comment all out) and leave the relevant single #include line for the OS you are developing on and it'll work.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Various questions and feedback...
« Reply #7 on: July 18, 2008, 05:29:22 pm »
MortenMacFly >> are you using Windows ? (as you said "plus"...). I'm using Ubuntu and wxGTK, and when I double-click on the folder's name, it doesn't open ^^.
Ah yes... ok - my fault. But then it really seems to be a wx issue / limitation.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: Various questions and feedback...
« Reply #8 on: July 18, 2008, 05:49:03 pm »
As for code completion, in fact we use GLEW (GL Extension Wrangler, a library to get the OpenGL extensions' functions) and GLFW, not GLUT ^^
I just managed to have a working code completion for OpenGL by adding /usr/include/GL/glew.h to my project files, but that's not an elegant solution, and my project browser now displays the folders "usr->include->GL" and "home->funto->vertex_team->iap_engine->etc...", which is not very handy ^^

Some simple solution that would be ok would be to make it possible to add not only specific directories, but also header files to parse ^^

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: Various questions and feedback...
« Reply #9 on: July 18, 2008, 08:37:04 pm »
Quote
- a very cool feature which lacks and would be very simple to add (or I didn't see that ?) : it would be very nice to be able to open a file which is part of the project just by writing its name, just as we can launch a program in GNOME using the Alt+F2 and typing its name Smile

right click on the project or the workspace and choose 'find file' the the name of the file and the project tree will open on that file, and then you can double click it to open it in the editor.

I dunno if there's a keyboard shortcut to open the current selected file in the project tree : might be a nice addition if it's lacking.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Various questions and feedback...
« Reply #10 on: July 18, 2008, 10:16:51 pm »
As for code completion, in fact we use GLEW (GL Extension Wrangler, [...]
Erm... my fault again (seems not my day today - I have wrong the second time... :-(). I will try and see what's happening... stay tuned... ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: Various questions and feedback...
« Reply #11 on: July 19, 2008, 12:52:45 am »
killerbot >> yeah, nice feature, thanks for the advice :) But as you say, it lacks the keyboard shortcut, and we still have to double-click on the file's name after finding it ^^

MortenMacFly >> lol, no problem, you couldn't guess this ^^ Thanks for your help :)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Various questions and feedback...
« Reply #12 on: July 19, 2008, 09:18:02 pm »
As for code completion, in fact we use GLEW (GL Extension Wrangler, [...]
I will try and see what's happening... stay tuned... ;-)
Ok - I had some minutes time and looked into. But I can't see it's failing. CC reports GLEW methods / macros just fine... (see the screenshot attached)...?! I used the latest GLEW available on Win32... :?: :shock:

[attachment deleted by admin]
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: Various questions and feedback...
« Reply #13 on: July 20, 2008, 12:12:13 am »
Effectively, it seems to work...

Perhaps it's because you use the SVN version ?
Nevertheless, making it possible to specify a particular file to code completion would be a good solution I think ^^

As for me, code completion worked when I added glew.h to the project...

Another thing : when I make a mistake in OpenGL, and the error is in glew.h, Code::Blocks makes several seconds to open glew.h ; I don't know why, but parsing glew.h is very hard for C::B...

Thanks for your help :)

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: Various questions and feedback...
« Reply #14 on: July 23, 2008, 11:32:30 am »
This link has nothing to do here.
Make your advertisement elsewhere or post the log directly on this forum.