3. In the main function, define a variable: vector <int> v;Notice that you'll need to save the file for CC to "know" about the newly added code fragments. CC does only know what's been saved.
4. The next line, enter the 'v.', at the point, after there has been no intelligence tips.
To handle the STL in later gccs (4.0+) C::B needs a patch to be applied (I think).Nope, not anymore. This is working fine in SVN trunk meanwhile... soon to be in scintilla / wxpropgrid_debugger branch, too.
can not reproduce it.Me not, either. Working just fine here... however, I saved before. ;-)
Me not, either. Working just fine here... however, I saved before. Wink
I can confirm this issue, if I start with an empty project (even with saving the file, reparsing and whatever).So an empty project with no file, then you create a new (cpp) file and add it to the project?
I can confirm this issue, if I start with an empty project (even with saving the file, reparsing and whatever).
So an empty project with no file, then you create a new (cpp) file and add it to the project?
Exactly.I can confirm this issue, if I start with an empty project (even with saving the file, reparsing and whatever).So an empty project with no file, then you create a new (cpp) file and add it to the project?
<frame level="0"/>
<frame level="1" function="TokensTree::FindTokensInFile(wxString const&, std::set<int, std::less<int>, std::allocator<int> >&, short)" offset="00000111"/>
<frame level="2" function="Parser::FindTokensInFile(wxString const&, std::set<int, std::less<int>, std::allocator<int> >&, short)" offset="000000b9"/>
<frame level="3" function="NativeParser::FindCurrentFunctionStart(cbEditor*, wxString*, wxString*, int)" offset="0000015a"/>
<frame level="4" function="NativeParser::FindCurrentFunctionToken(cbEditor*, std::set<int, std::less<int>, std::allocator<int> >&, int)" offset="000000df"/>
<frame level="5" function="NativeParser::ParseFunctionArguments(cbEditor*, int)" offset="0000010d"/>
<frame level="6" function="NativeParser::MarkItemsByAI(std::set<int, std::less<int>, std::allocator<int> >&, bool, bool, bool, int)" offset="0000018f"/>
<frame level="7" function="CodeCompletion::CodeComplete()" offset="00000174"/>
<frame level="8" function="CodeCompletion::OnCodeCompleteTimer(wxTimerEvent&)" offset="00000068"/>
<frame level="9" function="wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)" offset="00000050"/>
<frame level="10" function="wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)" offset="000000a4"/>
<frame level="11" function="wxEvtHandler::ProcessEvent(wxEvent&)" offset="000000c7"/>
<frame level="12" function="wxTimerBase::Notify()" offset="00000068"/>
<frame level="13"/>
<frame level="14"/>
<frame level="15" function="g_main_context_dispatch" offset="0000024a"/>
<frame level="16"/>
<frame level="17" function="g_main_loop_run" offset="000001bd"/>
<frame level="18" function="gtk_main" offset="000000a7"/>
<frame level="19" function="wxEventLoop::Run()" offset="00000048"/>
<frame level="20" function="wxAppBase::MainLoop()" offset="0000004b"/>
Although I cannot reproduce both (it really works here!) I've submitted a possible bug-fix for the crash.Exactly.I can confirm this issue, if I start with an empty project (even with saving the file, reparsing and whatever).So an empty project with no file, then you create a new (cpp) file and add it to the project?
[...]
Next thing: I just closed the first created project and tried the cc in the secondly created one (only this project is open at this moment) and C::B crashed !
Initialize EditColourSet .....
Initialize EditColourSet: done.
Loading toolbar...
AStylePlugin: loaded
Autosave: loaded
BrowseTracker: loaded
Cccc: loaded
ClassWizard: loaded
CodeCompletion: loaded
CodeSnippets: loaded
CodeStat: loaded
Compiler: loaded
CppCheck: loaded
Debugger: loaded
FilesExtensionHandler: loaded
HelpPlugin: loaded
cbKeyBinder: loaded
OpenFilesList: loaded
ProjectsImporter: loaded
ScriptedWizard: loaded
ThreadSearch: loaded
ToDoList: loaded
wxSmith: loaded
wxSmithMime: loaded
wxSmithAui: loaded
wxSmithContribItems: loaded
WindowsXPLookNFeel: loaded
Source code formatter (AStyle) plugin activated
Autosave plugin activated
BrowseTracker plugin activated
Cccc plugin activated
Class wizard plugin activated
Code completion plugin activated
Code snippets plugin activated
Code statistics plugin activated
Added compiler "GNU GCC Compiler"
Parsing stage done (0 total parsed files, 0 tokens in 0 minute(s), 0.0 seconds).
Updating class browser...
Class browser updated.
Added compiler "Microsoft Visual C++ Toolkit 2003"
Added compiler "Microsoft Visual C++ 2005/2008"
Added compiler "Borland C++ Compiler (5.5, 5.82)"
Added compiler "Digital Mars Compiler"
Added compiler "OpenWatcom (W32) Compiler"
Added compiler "GNU GCC Compiler for MSP430"
Added compiler "Cygwin GCC"
Added compiler "LCC Compiler"
Added compiler "Intel C/C++ Compiler"
Added compiler "SDCC Compiler"
Added compiler "Tiny C Compiler"
Added compiler "GDC D Compiler"
Added compiler "Digital Mars D Compiler"
Added compiler "GNU ARM GCC Compiler"
Added compiler "GNU AVR GCC Compiler"
Added compiler "GNU GCC Compiler for PowerPC"
Added compiler "GNU GCC Compiler for TriCore"
Compiler plugin activated
CppCheck plugin activated
Debugger plugin activated
Files extension handler plugin activated
Help plugin plugin activated
Keyboard shortcuts plugin activated
Foreign projects importer plugin activated
Project wizard added for 'Empty project'
Project wizard added for 'Console application'
Project wizard added for 'D application'
Project wizard added for 'Direct/X project'
Project wizard added for 'Dynamic Link Library'
Project wizard added for 'Kernel Mode Driver'
Project wizard added for 'FLTK project'
Project wizard added for 'GLFW project'
Project wizard added for 'GLUT project'
Project wizard added for 'GTK+ project'
Project wizard added for 'Irrlicht project'
Project wizard added for 'Lightfeather project'
Project wizard added for 'Matlab project'
Project wizard added for 'OpenGL project'
Project wizard added for 'Ogre project'
Project wizard added for 'Code::Blocks plugin'
Project wizard added for 'QT4 project'
Project wizard added for 'SDL project'
Project wizard added for 'SmartWin project'
Project wizard added for 'Static library'
Project wizard added for 'STL port application'
Project wizard added for 'Shared library'
Project wizard added for 'Win32 GUI project'
Project wizard added for 'wxWidgets project'
Build-target wizard added for 'Console'
Build-target wizard added for 'Static library'
Build-target wizard added for 'Dynamic Link Library'
Build-target wizard added for 'wxWidgets'
Project wizard added for 'ARM Project'
Project wizard added for 'AVR Project'
Project wizard added for 'TriCore Project'
Project wizard added for 'PowerPC Project'
File(s) wizard added for 'Empty file'
File(s) wizard added for 'C/C++ source'
File(s) wizard added for 'C/C++ header'
Scripted wizard plugin activated
ThreadSearch plugin activated
Todo List plugin activated
wxSmith plugin activated
wxSmith - MIME plugin plugin activated
wxSmith - Aui plugin activated
wxSmith - Contrib Items plugin activated
Initializing plugins...
0 user templates loaded
Caching internal gcc dirs for adding to parser...
Caching GCC dir: d:\LoveDEV\lib\gcc\mingw32\4.4.1\include\c++
Caching GCC dir: d:\LoveDEV\lib\gcc\mingw32\4.4.1\include\c++\mingw32
Caching GCC dir: d:\LoveDEV\lib\gcc\mingw32\4.4.1\include\c++\backward
Caching GCC dir: d:\LoveDEV\lib\gcc\mingw32\4.4.1\include
Caching GCC dir: d:\LoveDEV\lib\gcc\mingw32\4.4.1\include-fixed
Caching GCC dir: d:\LoveDEV\include
Add project ddd in parsing queue
Project's base path: D:\Projects\ddd\
Project's common toplevel path: D:\Projects\ddd\
Passing list of files to batch-parser.
Batch-parsing 1 files...
Passing list of files to batch-parser.
Batch-parsing 1 files...
Starting batch parsing...
Text seems to be pure ASCII!
We use user specified encoding: Unicode 8 bit (UTF-8) (ID: 41)
Final encoding detected: Unicode 8 bit (UTF-8) (ID: 41)
Parsing stage done (137 total parsed files, 28673 tokens in 0 minute(s), 2.422 seconds).
Updating class browser...
Class browser updated.
Reparsing saved files...
Starting batch parsing...
Parsing stage done (152 total parsed files, 29144 tokens in 0 minute(s), 0.125 seconds).
Updating class browser...
Class browser updated.
Reparsing saved files...
Starting batch parsing...
Parsing stage done (152 total parsed files, 29144 tokens in 0 minute(s), 0.94 seconds).
Updating class browser...
Class browser updated.
Reparsing saved files...
Starting batch parsing...
Parsing stage done (152 total parsed files, 29144 tokens in 0 minute(s), 0.0 seconds).
Updating class browser...
Class browser updated.
Reparsing saved files...
Starting batch parsing...
Parsing stage done (152 total parsed files, 29144 tokens in 0 minute(s), 0.0 seconds).
Updating class browser...
Class browser updated.
Operation steps:
1. Create a new C + + project
2. Add # include <vector>
3. In the main function, define a variable: vector <int> v;
4. The next line, enter the 'v.', at the point, after there has been no intelligence tips.
5. Close the current project, and then re-open this project.
6. Repeat step 4, and all normal!
#include <iostream>
using namespace std;
int main()
{
cout << "Hello world!" << endl;
return 0;
}
#include <iostream>
#include <vector>
using namespace std;
int main()
{
vector <int> v;
v.
cout << "Hello world!" << endl;
return 0;
}
@Loaden.Only one item.
What is your macro replacement map contains?
You can view them in
Settings->Editor->CodeCompletion and Symbols browser
then in the "C/C++ parser", see the "replacement tokens" list.
You should have several entries.
Notice that you'll need to save the file for CC to "know" about the newly added code fragments. CC does only know what's been saved.I confirm that the file has been saved! And when I close the project, and then open the project (Note: do not exit CB), still fail to prompt any information.
If I start a console-project with the wizard and add vector to the includes it works without error (without saving).However, even though I was not built in an empty project, CC does not work properly.
Hi, ollydbg, I know you are from China, I am also from China. Can QQ, MSN or GTalk on the exchange about this issue?Operation steps:
1. Create a new C + + project
2. Add # include <vector>
3. In the main function, define a variable: vector <int> v;
4. The next line, enter the 'v.', at the point, after there has been no intelligence tips.
5. Close the current project, and then re-open this project.
6. Repeat step 4, and all normal!
I can not reproduce this.
When you create a new C++ project. I have already one cpp file in the project. some thing like below:Code#include <iostream>
using namespace std;
int main()
{
cout << "Hello world!" << endl;
return 0;
}
Then adding some code as you said.(I don't save that file)Codeyou can see the screen shot below:#include <iostream>
#include <vector>
using namespace std;
int main()
{
vector <int> v;
v.
cout << "Hello world!" << endl;
return 0;
}
So, it seems I can't reproduce this bug. :D
windowsXP SVN rev 6056.
@Loaden.Only one item.
What is your macro replacement map contains?
You can view them in
Settings->Editor->CodeCompletion and Symbols browser
then in the "C/C++ parser", see the "replacement tokens" list.
You should have several entries.
@LoadenThanks! Do you mean let me add a few more conversions?
maybe the error come from this.
see the attachment.
@LoadenThanks! Do you mean let me add a few more conversions?
maybe the error come from this.
see the attachment.
However, I added in the process encountered a problem, as shown.
Nice! When I was in default.conf where to add these rules, CC has been work well now.@LoadenThanks! Do you mean let me add a few more conversions?
maybe the error come from this.
see the attachment.
However, I added in the process encountered a problem, as shown.
Ok, you should manually change the "default.conf" file.
By the way, I think we should remove this kind of check when adding new macro replacement rules. right?
if I remember right.the configuration file is in somewhere of c:(search it if you using windows.)Yes. I am using SVN5731 configuration. I just tried it, when the default.conf does not exist, the default is generated, there will be six replacement rule, not the old versions of one replacement rule.
Yes, this is quite simple, you can see these code inif I remember right.the configuration file is in somewhere of c:(search it if you using windows.)Yes. I am using SVN5731 configuration. I just tried it, when the default.conf does not exist, the default is generated, there will be six replacement rule, not the old versions of one replacement rule.
void CodeCompletion::LoadTokenReplacements()
{
ConfigManager* cfg = Manager::Get()->GetConfigManager(_T("code_completion"));
ConfigManagerContainer::StringToStringMap& repl = Tokenizer::GetTokenReplacementsMap();
repl.clear();
if (!cfg->Exists(_T("token_replacements")))
{
// first run; add default replacements string
Tokenizer::SetReplacementString(_T("_GLIBCXX_STD"), _T("std"));
Tokenizer::SetReplacementString(_T("_GLIBCXX_BEGIN_NESTED_NAMESPACE"), _T("+namespace"));
Tokenizer::SetReplacementString(_T("_GLIBCXX_END_NESTED_NAMESPACE"), _T("}"));
Tokenizer::SetReplacementString(_T("_GLIBCXX_BEGIN_NAMESPACE"), _T("+namespace"));
Tokenizer::SetReplacementString(_T("_GLIBCXX_END_NAMESPACE_TR1"), _T("}"));
Tokenizer::SetReplacementString(_T("_GLIBCXX_BEGIN_NAMESPACE_TR1"), _T("-namespace tr1 {"));
}
else
cfg->Read(_T("token_replacements"), &repl);
}
Very strange, how not to work.But if i remove:
It has just one was successful.
using namespace std;
Now, i re-config CB, and vector parser well.Very strange, how not to work.But if i remove:
It has just one was successful.Codeit's work fine.using namespace std;
I think, i need re-config CB.
#include <iostream>
#include <string>
using namespace std;
int main()
{
string s;
s. // HERE, show nothing...
cout << "Hello world!" << endl;
return 0;
}