Author Topic: Some C::B Suggestions...  (Read 27129 times)

Shakes

  • Guest
Some C::B Suggestions...
« on: November 15, 2006, 09:51:46 am »
Hi Guys,

Great work on the IDE, I think it fits nicely into the niche of Cross-Platform Multi-Compiler IDE extremely well.

The biggest opposition is Eclipse I think and it has key features which you guys can employ to make C::B in a class of its own. Some of these IMO are:
- Doxygen preview - If there could be some way to preview Doxygen documentation like the JavaDoc viewer in Eclipse.
- Highlight all variables of the same name in document, useful for keeping track of names.
- Tooltips on functions using the Doxygen markup commenting.
- Class Diagrams and/or UML plugins
- Lint like behaviour, that precompiles code and points out possible problems.

I know some of these features are more easily implement because of the properties of interpreted languages like Java (there are LaTeX plugins that have some of the above features despite being compiled). Apologies to developers who are/have already implemented the above as plugins for C::B. The Doxygen stuff would be fantastic.

Anyway, hope that helps you guys in making C::B even more awesome :D

Cheers
Shakes
About me: I'm a PhD student working on Image processing with C/C++ and Java and I use the Qt and JAI libraries respectively. My suggestions are in response to using eclipse for the Java stuff I've done so far after using C::B Nightly's.

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: Some C::B Suggestions...
« Reply #1 on: November 15, 2006, 10:01:38 am »
The features you mention are not implemented and I doubt if it will be implemented in the official release.
Some one should have to write plugins for it. and I like the idea of a doxyge plugin...
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

Shakes

  • Guest
Re: Some C::B Suggestions...
« Reply #2 on: November 15, 2006, 11:08:03 am »
Kool, I guess then theres scope for (summary of my post):

Doxygen Plugin
UML Plugin
Lint-like Plugin

Cheers

Offline eranif

  • Regular
  • ***
  • Posts: 256
Re: Some C::B Suggestions...
« Reply #3 on: November 15, 2006, 03:10:44 pm »
Quote
Lint like behaviour, that precompiles code and points out possible problems
This feature can work only with java, the java compiler is 10 times faster than the c++ compiler (especially g++), at work i compile 40-50 java sources in less than 2 seconds, the same amount of sources, using g++ will take like 1-2 minutes.
I dont think it is doable for C++

Eran

Offline Charon

  • Multiple posting newcomer
  • *
  • Posts: 49
  • fnord
    • charon - where mental illness meets chronic nonsense
Re: Some C::B Suggestions...
« Reply #4 on: November 15, 2006, 05:57:11 pm »
Doesn't Apples XCode do something similar to this?
Not to say its practical or even fast with g++, just want to know if its possible.
hi, i am a signature virus. please copy me into your sig!
Wish list : no root-node for workspaces, open files and symbols; world domination

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Some C::B Suggestions...
« Reply #5 on: November 15, 2006, 07:02:17 pm »
XCode does that, but it has a compiler espcially made for that purpose.

I think it would be quite hard and laggy, if one tried to implement it with plain normal gcc under Windows/Linux.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Shakes

  • Guest
Re: Some C::B Suggestions...
« Reply #6 on: November 16, 2006, 02:11:30 am »
All valid points. But one has to point out, its already been done despite what seems impossible. If I'm not mistaken, the original Lint program was initially designed just for that purpose. Splint <http://splint.org/> <http://en.wikipedia.org/wiki/Splint_%28programming_tool%29> is a C code "interpretor" designed especially for checking code.

Even if this is not viable, the LaTeX plugin behaves intelligently around the problem, it simply gathers the info after each compile (which is done automatically at save) and then uses the output to display the (possible) errors in Lint form (so its not like double-click on error and it shows you where it is but rather underlines errors/warnings like Word). Note: LaTeX compilation is in general slower and has to be done multiple times to get references right in the document.

Anyway, hope that helps.
Cheers
« Last Edit: November 16, 2006, 02:18:22 am by Shakes »

takeshimiya

  • Guest
Re: Some C::B Suggestions...
« Reply #7 on: November 16, 2006, 05:29:28 am »
All valid points. But one has to point out, its already been done despite what seems impossible.

There's always CINT, even trough it covers 95% of ANSI C and 85% of C++, it will be nice to have a plugin for it. :)

Shakes

  • Guest
Re: Some C::B Suggestions...
« Reply #8 on: November 17, 2006, 10:08:25 am »
 :o Thats even better lol

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: Some C::B Suggestions...
« Reply #9 on: November 17, 2006, 11:25:45 am »
All valid points. But one has to point out, its already been done despite what seems impossible.

There's always CINT, even trough it covers 95% of ANSI C and 85% of C++, it will be nice to have a plugin for it. :)
There is one problem, it doesn't seems to work with MinGW  :? Or I am doeing something wrong...
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

takeshimiya

  • Guest
Re: Some C::B Suggestions...
« Reply #10 on: November 17, 2006, 02:34:37 pm »
All valid points. But one has to point out, its already been done despite what seems impossible.

There's always CINT, even trough it covers 95% of ANSI C and 85% of C++, it will be nice to have a plugin for it. :)
There is one problem, it doesn't seems to work with MinGW  :? Or I am doeing something wrong...
Well you must be doing something wrong, it does works with MinGW. :P

For compiling it, just open msys and do a ./configure --arch=mingw && make it works for me.
You might need to remove (or compile) readline and dl from linking libs if you don't have them.

Don't fear that is not portable, because it is, the list of OS supported is: HP-UX, Linux, SunOS, Solaris, AIX, Alpha-OSF, IRIX, FreeBSD, NetBSD,    NEC EWS4800, NewsOS, BeBox, Windows-9x, Windows-XP, MS-DOS, MacOS, MacOS X, VMS, NextStep, Convex, QNX, ...

and of compilers: GCC, MinGW, Cygwin, Visual C++ 4.0 to Visual C++ 2005, Borland Builder, Borland 5.5, DJGPP, Intel, Symantec, ...


Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: Some C::B Suggestions...
« Reply #11 on: November 17, 2006, 02:57:48 pm »
I didn't compile it myself, because I don't have msys running :P
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

takeshimiya

  • Guest
Re: Some C::B Suggestions...
« Reply #12 on: November 17, 2006, 03:12:42 pm »
I didn't compile it myself, because I don't have msys running :P
Hehe, well you can use the precompiled exe, but if you read the README.txt:
"With the binary distribution, you can only use cint C++ interpreter.
In order to use makecint, you must compile cint from source."

Just in case, cint.txt:
NAME
cint - C/C++ interpreter

DESCRIPTION
"cint" is a C/C++ interpreter. About 95% of ANSI C and 90% of C++ features are covered.
(Data abstraction,  class inheritance, virtual function, function and operator over-loading,
default parameter, template,  etc...). Cint has source code debugger for interpreted
source code and it has sufficient capability for debugging a C++ script.

CINT AND MAKECINT
Cint can be used just as it is, but it is recommended to use makecint.
Makecint can encapsulate native C/C++ objects into Cint as precompiled libraries.
User defined precompiled objects can be accessed from the interpreter and a user
application can invoke C/C++ interpreter as interactive interface. It provides seamless
compiler/interpreter scripting environment. Precompiled libraries can be dynamically
loaded/unloaded if they are configured as Dynamic Link Library (DLL).

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: Some C::B Suggestions...
« Reply #13 on: November 17, 2006, 03:34:44 pm »
I only tried to do a sample: cint HelloWorld.c But even that didn't work :P But I will try to compile it if I find/make some time...
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

takeshimiya

  • Guest
Re: Some C::B Suggestions...
« Reply #14 on: November 17, 2006, 03:49:07 pm »
I only tried to do a sample: cint HelloWorld.c But even that didn't work :P But I will try to compile it if I find/make some time...
I guess you did get a message like this:
cint HelloWorld.c
Error: cannot open file "stdio.h"  FILE:HelloWorld.c LINE:9


If you read the page, for the pre-compiled exe it says "download the source package too".
So it's easy, just uncompress both in the same folder and it will work:
cint HelloWorld.c
Hellow World