User forums > Using Code::Blocks

Code completion with new compiler : no suggestion for header files and classes

<< < (3/4) > >>

Scr3amer:
Oh oki ^^. It did not work too.

@odst By the way, do you save the same problem than mine ? Or am I the only one ?

As a reminder :

->With provided TDM-GCC, I do not have autocompletion with C++11 features like array, even if I enable std=c++11 option in build properties of the project

->With a new compiler I added myself, no header completion nor std::thread and other C++11 classes (when I add manually include path of the new MinGW to have partial header completion) etc.

Maybe I should record a tiny video of the way I create project and set up it and the way I add a new compiler. That may help you to see if I did something wrong.

I downloaded latest revision with SVN, now I try to understand how to set up dependencies because the wxWidget lib I downloaded is very special, with .a .dll but only 2 header files in special folders. And there are lots of projects : x86 or x64, wX2.8 or wX3.0 etc ... I think I will try x86 with TDM 4.7.1.

@ollydbg Were you speaking of this version of MinGW ? http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.7.3/ ? Because C::B does not recognize it directly on my computer, even if I extract it in C:/MinGW. What is the revision of your screenshot C::B and version of CC ? I think I have these issues because I use an old version of C::B (but why do I have same problem on the build 10503 ?)

Btw, may you upload your C::B build + mingw  as an archive ? So that I can try from my computer ?

EDIT : One of my idea seems correct, detection of TDM-MinGW is better than other MinGW builds : I installed TDM 5.1.0 in MinGW and C::B recognized it immediately, not like what happened with my others MinGW builds. But still no C++11 autocompletion...

ollydbg:
Sent from my phone:
Yes, I test exact mingw-build 4.7
I use the trunk head revision
Normally CC use compiler setting from Compiler plugin.
You can open the CC debug dialog to see whether the predefined macros are correct.
See our wiki to know how to open this dialog.
I build wx myself, there's wiki page shows how to build CB.

Scr3amer:
Ok thanks for the information. Give me 48H, I will be back with what I tried to do :) !

EDIT : Ok I did a trial on an old revision of C::B (9854). i managed to have header autocompletion with different compilers but for c++11, I had to add manually #define __cplusplus 201509L because otherwise CC did not parse properly the preprocessor condtions. Now I will try on last rev.

EDIT 2 : 16-10-2015
I tried the last nightly 10528, code completion works. So it is maybe a problem of the 13.12.

I am still trying to understand why I have some issues with some MinGW toolchains though :
For example, i included iostream but I had no cout in CC with one toolchain (TDM 5.1.0) . I tried another toolchain (4.9.3) and I had cout by CC XD ...

Just one more question : is it normal that __cplusplus macro is updated by CC only when I restart C::B and reopen the project ? I activated c++11, I had 1997 value, I closed and opened C::B and the project and only after that the macro had the right value 2011.


I am still trying to build C::B from source but I have a link error whereas the wxWidget build was OK.
http://forums.codeblocks.org/index.php/topic,19779.0.html

norragak:
Is there a conclusion? I have some similar problems with mingw-builds' GCC 5.2.0 + Code::Blocks svn 10595.
I've enabled C++14 and added

--- Quote ---D:\mingw\i686-w64-mingw32\include
D:\mingw\i686-w64-mingw32\include\c++
D:\mingw\i686-w64-mingw32\include\c++\bits

--- End quote ---
respectively into both the global Compiler Settings and Compiler Include Search Paths as well as the project's local Build Options and C/C++ Parser Options Additional Search Paths, and while I've finally got the STL header files like <vector> to be CC'ed, I still can't CC a std::vector.

Weird is that things like std::bad_alloc can be CC'ed. What's going on? Doe this have anything to do with HeaderFixup in Environment Settings?

ollydbg:

--- Quote from: norragak on December 10, 2015, 12:59:31 pm ---Is there a conclusion? I have some similar problems with mingw-builds' GCC 5.2.0 + Code::Blocks svn 10595.
I've enabled C++14 and added

--- Quote ---D:\mingw\i686-w64-mingw32\include
D:\mingw\i686-w64-mingw32\include\c++
D:\mingw\i686-w64-mingw32\include\c++\bits

--- End quote ---
respectively into both the global Compiler Settings and Compiler Include Search Paths as well as the project's local Build Options and C/C++ Parser Options Additional Search Paths, and while I've finally got the STL header files like <vector> to be CC'ed, I still can't CC a std::vector.

Weird is that things like std::bad_alloc can be CC'ed. What's going on? Doe this have anything to do with HeaderFixup in Environment Settings?

--- End quote ---
Why do you add those paths manually? Our CC's parser will automatically call the GCC command with the "-E" option, and grab the GCC's search paths.
If you have enabled the C++11, then CC will call GCC command with the C++11 option.
Maybe, you may see the bug here Re: Release 15.12, RC1 has arrived, I'm going to commit a fix soon.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version