User forums > Help

Help Required

<< < (2/3) > >>

reazon1n1:
^^^

Hi, now its working fine without any problem.
Well, what I did was:
uninstalled the previous codeblocks 8.02, downloaded the codeblocks-10.05mingw-setup.exe setup and installed it.Now its working totally great.I didnt have to edit any of the settings. I tried to examine the new 10.05 version in my PC in every possible way, and I didnt find any problem. I'm happy that the setup with MINGW is running fine and I didnt face any of the problems that I was facing earlier and I alisted above.

thanx a LOT sebastian for ur help...

HURRAY  :D :D :D :D :D :D :D :D :D :D :D

reazon1n1:
Ok, now here comes the second problem that I'm facing with Codeblocks 10.05 mingw.
Its a minor one but i want to know if anyone here can help me out.

I am using Codeblocks10.05 to run C++ programs rather than C-programs. So everytime I write a C++ program with header files, like #include<cstdio>
             #include<cstdlib>
             #include<iostream> , and save it, the default file extension is *.C, and the saved file becomes a C source file . So after I save the file and next time run it, error messages like
error: cstdio: No such file or directory
error: cstdlib: No such file or directory
error: iostream: No such file or directory appear and the program doesnt run.

But then again, if I save the file by typing *.cpp, it saves the file as C++ source file and the same program runs smoothly.

is there any setting that I can change so that the default extension to save a file is .cpp rather than .c??? I dont want to type .cpp with my hand everytime I save a  new C++ source file. can anyone help me out with this problem???

Any ideas welcomed.

I am using Windows XP service pack 2. and Codeblocks 10.05 MINGW.

Ceniza:
I already suggested separating the extensions and having cpp as default, but it looks like no one really cared. I do not feel like doing it on my own without others giving at least their opinion.

MortenMacFly:

--- Quote from: Ceniza on February 26, 2011, 04:23:13 pm ---I do not feel like doing it on my own without others giving at least their opinion.

--- End quote ---
<opinion>Sounds good. Patch?</opinion>

Ceniza:

--- Quote from: MortenMacFly on February 26, 2011, 09:10:22 pm ---
--- Quote from: Ceniza on February 26, 2011, 04:23:13 pm ---I do not feel like doing it on my own without others giving at least their opinion.

--- End quote ---
<opinion>Sounds good. Patch?</opinion>

--- End quote ---

Issue: The filter in the save dialog is populated from the lexers, causing C and C++ to be merged into a single filter where .c comes first (a single lexer handles both).

A quick solution would be to split the lexer into lexer_c.xml and lexer_cpp.xml, but that would imply a color set for C and another one for C++. Chances are high users will want a shared color set for both C and C++ files, so it will cause complaints.

Another solution would be to extend the internal definition of the lexer files, so they can have multiple name/filemaks sets intended for the save dialog. For the open dialog it may still be handy to use them as they are right now, or also have a specific tag.

Example:

--- Code: ---<?xml version="1.0"?>
<!DOCTYPE CodeBlocks_lexer_properties>
<CodeBlocks_lexer_properties>
<Lexer name="C/C++"
index="3"
filemasks="*.c,*.cpp,*.cc,*.cxx,*.h,*.hpp,*.hh,*.hxx,*.inl">
<SaveFilter name="C" filemasks="*.c"/>
<SaveFilter name="C header" filemasks="*.h"/>
<SaveFilter name="C++" filemasks="*.cpp,*.cc,*.cxx"/>
<SaveFilter name="C++ header" filemasks="*.hpp,*.hh,*.hxx,*.inl"/>
<OpenFilter name="C/C++" filemasks="*.c,*.cpp,*.cc,*.cxx,*.h,*.hpp,*.hh,*.hxx,*.inl"/>
<Style name="Default"
index="0"
fg="0,0,0"
bg="255,255,255"
bold="0"
italics="0"
underlined="0"/>
...
--- End code ---

An extra change required would be in sdk/cbeditor.cpp at line 1722 (as today's revision):


--- Code: ---Filter = mgr->Read(_T("/file_dialogs/save_file_as/filter"), _T("C/C++ files"));
--- End code ---

The default value would most likely turn into "C++ files".

The implementation would require more time than I have at hand. At least the why and a how are known now.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version