Author Topic: Various questions and feedback...  (Read 10272 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: [Select]
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 »

Offline mariocup

  • Developer
  • Lives here!
  • *****
  • Posts: 587
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 jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
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: 9508
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: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://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: 9508
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: [Select]
#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: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
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: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://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: 5195
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: 9508
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: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://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: 9508
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: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://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.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Various questions and feedback...
« Reply #15 on: July 23, 2008, 11:43:44 am »
What dje said.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: Various questions and feedback...
« Reply #16 on: July 24, 2008, 04:29:38 pm »
...? What are you talking about...?

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: Various questions and feedback...
« Reply #17 on: July 24, 2008, 04:33:56 pm »
Someone who had post something just before my post complaining about a linker error or something like that giving a link to a log, which was in fact an advertisement.
But it seems it has been deleted...

Dje

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: Various questions and feedback...
« Reply #18 on: July 27, 2008, 12:22:57 am »
I had a lot of questions / requests in my first post and didn't get an answer to all of them ^^

Particularly, I just experimented the problem of errors not fitting in the "Build messages" panel when compiling with a custom Makefile which calls SCons to build my project.
Here is a screen :

As you can see, it's impossible to read the error in the panel, so I have to recompile it in an external terminal to get all the error message :(

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: Various questions and feedback...
« Reply #19 on: July 30, 2008, 05:18:16 pm »
...Up ?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Various questions and feedback...
« Reply #20 on: July 30, 2008, 06:29:52 pm »
Add -fmessage-length=0 in your build options (in your SCons configuration files).
Be patient!
This bug will be fixed soon...

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: Various questions and feedback...
« Reply #21 on: July 30, 2008, 08:52:05 pm »
Thank you :)

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: Various questions and feedback...
« Reply #22 on: August 27, 2008, 02:05:51 am »
Hi, it's me again :p

I'm still developping my project with Code::Blocks, and one of the missing features I told in the first post is really, really lacking :
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 :)

I have got a lot of files, and having to look for the right folder by hand makes me forget what I was going to do...(well, at least, it doesn't help concentration ^^).

If nobody wants to add this feature, I wonder if I could do it myself...
I downloaded the SVN repository but do not manage to build it using the autotools, as ./configure tells me this :
Quote
./configure: line 24891: AM_OPTIONS_WXCONFIG: command not found
./configure: line 24892: syntax error near unexpected token `2.8.0,'
./configure: line 24892: `AM_PATH_WXCONFIG(2.8.0, wxWin=1)'

Any idea ?

Ah and yet another lacking feature is the possibility to re-open a closed tab, as what is possible with Firefox ; it's a pain to look for the file we just closed, because we forgot to write something into ^^

And last one, and then I stop :p : giving the user the possibility to choose on how many rows we would like the tabs to be would be great too, as personnaly, I don't have a sufficient place...(this is what is done with the must-have Firefox plugin "Tab Mix Plus" ^^)

Thanks :)

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2180
Re: Various questions and feedback...
« Reply #23 on: August 27, 2008, 02:11:19 am »

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: Various questions and feedback...
« Reply #24 on: August 27, 2008, 12:40:44 pm »
Wooow yeah, didn't know it already existed, this is going to change my life !

Lol well not SO much, but it's really going to boost my productivity :) Thanks a lot :)

I've just found it in the "Search" menu..."Goto function" can also be really handful :)

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: Various questions and feedback...
« Reply #25 on: August 29, 2008, 06:15:23 pm »
I'm still trying to try to compile Code::Blocks from SVN and do not succeed...Any help would be welcome...:)