Hi
I'm working as developer on Linux using mainly C/C++ and Fortran (Intel Compilers: icpc and ifort). We have been looking for a new IDE since the C-Forge project died. Due to CMake and the integration of C::B therein I wanted to take a look into the Pros/Cons of C::B. The competition is Eclipse and Kdevelop.
My general first impression is really good. The Fortran Plugin http://darmar.vgtu.lt (http://darmar.vgtu.lt) looks really neat but I have to see how it really performs in our mixed C++ and Fortran 90-code.
I have exported our CMake-project and its really beautifully imported into C::B. It would have been nice if compiler settings were also read from CMake but that does not matter much - I can live with changing that manually.
I have two main issues:
1. Perforce integration: We use Perforce which means that Perforce integration is pretty much a KO-criterion. However, it would be sufficient to simply being able to check out files when editing. Something like:
$ p4 edit $current_file_in_CB$
Can I add this myself or hack it somehow? A button in C::B doing the above would also be OK.
2. Fortran compiler jump to error does not work. The output of ifort i a bit different than icpc but I read somewhere that C::B uses regex's to parse the output. Can I somehow fix it myself or have I overlooked some setting ?
IFORT: fortcom: Error: /scratch/users/clausen/Repository/main/development/baseline/source/prog_dev/prog_hp2/bead_steu.f90, line 69: A specification statement cannot appear in the executable section.
ICPC: /scratch/users/clausen/Repository/main/development/baseline/source/onf/fem2onf/fem2onf.cpp(30): error: identifier "dflmdfb" is undefined
I am uncertain whether I'm posting in the correct tread because I am not that experienced in posting in forums. Thanks in advance for you advice.
Best regards
Peter
@oBFusCATed: Thanks, I'll look into that
@killerbot: That sounds cool. I'll try to list what I use - which may only be a subset of what most people use, but hey that a starting point. There is a free Perforce-download at: http://www.perforce.com/perforce/download_eval.html
Important Perforce (p4) commands
The only thing I am really really missing is "check out current file" which is
if this can be automatically done by "Replace in files ..." I would be laughing ! :-D
Often used Perforce (p4) commands
Our usual workflow is to only checkout in the IDE. I have even done a bit of Python programming in Eclipse which has a full blown Perforce integration, but I (and my colleagues) mostly use Perforce's own client (P4v) for the rest (submit, adding files, ...).
For IDE integratino you would need to know if a file is in source control or not. This can be done in different ways but I guess following should do the job:
p4 files *
//depot/main/development/baseline/source/CMakeLists.txt#17 - edit change 46261 (text)
CMakeLists.txt~ - no such file(s).
Often used commands would be:
sync Synchronize the client with its view of the depot
Above Syncs current dir and subdirs
add Open a new file to add it to the depot
edit Open an existing file for edit
delete Open an existing file to delete it from the depot
resolve Merge open files with other revisions or files
revert Discard changes from an opened file
submit Submit open files to the depot
And also:
change Create or edit a changelist description
diff Display diff of client file with depot file
diff2 Display diff of two depot files
filelog List revision history of files
Of course Perforce is capable of much more (about 85 commands) and we are only using the outmost basics.
If I can in any way help to test I would be very happy. Compiling is no problem (I guess) but I have never done GUI-programming...
Best regards
Peter
WOW, that's pretty cool !
I've added: Tools --> Configure Tools --> Add ...
Name: P4Edit
Executable: /store2/develop/perforce/p4
Parameters: edit ${ACTIVE_EDITOR_FILENAME}
* Launch tool hidden with standard output redirect
Thus, I can edit files by just: ctrl-E using a shortcut: Settings --> Editor --> Keyboard Shortcuts
I've added the ifort regex (must be moved before the C-regexes, dont really know why)
Settings -> Compiler & Debugger -> Compiler -> Ifort -> Other settings -> Advanced button -> Output parsing...
Description: Compilation error ifort
Type: Error
Regex: fortcom:[ \t]+[Ee]rror[ \t]*:[ \t]*([{}() \t#%$~A-Za-z0-9_:+/\.-]+)[, \t]+line[ \t]+([0-9]+)[: \t]+(.*)
Message: 3
Filename: 1
Line:2
Description: Compilation warning ifort
Type: Error
Regex: fortcom:[ \t]+[Ww]arning[ \t]*:[ \t]*([{}() \t#%$~A-Za-z0-9_:+/\.-]+)[, \t]+line[ \t]+([0-9]+)[: \t]+(.*)
Message: 3
Filename: 1
Line:2
Thumbs up and thanks guys! Could you add this to the Intel-compiler options by default? I do not see why not...
One minor issue: If line nr is 0 (happens when Fortran names are too long) then Code::Blocks cant jump to file. Example compiler output:
fortcom: Warning: /scratch/users/clausen/Repository/main/development/baseline/source/prog_dev/prog_mod/s_cell_reg.f90, line 0: Global name too long, shortened from: cell_raster_mp_s_get_nd_in_area_gad_brute_force_$BLK.coordinate_transformation_mp_command_id_name_ to: ll_raster_mp_s_get_nd_in_area_gad_brute_force_$BLK.coordinate_transformation_mp_command_id_name_
I'll be back when I have some more experience with C::B
/Peter
Its been a while - and I still like Code::Blocks :D
Could you show your some source code? I don't know what "Fortran names are too long"'s meaning is. I think "Fortran names are too long" may occur some error as "This symbol has too many characters".
The code is:
MODULE CELL_RASTER
.....
contains
subroutine s_get_nd_in_area_gad_brute_force (minp, &
& maxp)
use coordinate_transformation
...
end subroutine
Generates the warning:
fortcom: Warning: /scratch/users/clausen/Repository/main/development/baseline/source/prog_dev/prog_mod/s_cell_reg.f90, line 0: Global name too long, shortened from: cell_raster_mp_s_get_nd_in_area_gad_brute_force_$BLK.coordinate_transformation_mp_design_cycle_aktuell_ to: ster_mp_s_get_nd_in_area_gad_brute_force_$BLK.coordinate_transformation_mp_design_cycle_aktuell_
I fixed it by including the USE-statement in the top of module statement - the way it should be! Still, Code::Blocks chokes on the "line 0"
Still, Code::Blocks chokes on the "line 0"
I don't see a possibility to do anything other.
If C::B does not get a valid line-number it can not jump to the error.
In this cases (line <= 0) the DoGotoError-function just returns.
hmm, well, I would have expected C::B to go to the file, which it does not. In my humble opinion the behavior should be:
if (line <=0) {line = 1;}
. But its no biggy...