I configed the CEDET to auto-complete for MinGW gcc, it works great, however I can't get the g++ work for the completion of member of STL libs. For example, I can't auto-complete the std::string variable to get the c_str() or other functions:
#include <string>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
string s;
s. // no pop up member functions here
return 0;
}
Here is the config part of my .emacs:
;; setting up for semantic-mode
(semantic-mode 1)
(require 'semantic/bovine/c)
(setq MinGW-64-base-dir
"D:/MinGW/x86_64-w64-mingw32/include")
(add-to-list 'semantic-lex-c-preprocessor-symbol-file
(concat MinGW-64-base-dir "/crtdefs.h"))
(add-to-list 'semantic-lex-c-preprocessor-symbol-file
(concat MinGW-64-base-dir "/yvals.h"))
(add-to-list 'semantic-lex-c-preprocessor-symbol-file
(concat MinGW-64-base-dir "/vadefs.h"))
(add-to-list 'semantic-lex-c-preprocessor-symbol-file
(concat MinGW-64-base-dir "/comdefsp.h"))
(semantic-c-reset-preprocessor-symbol-map)
(defconst user-include-dirs
(list ".." "../include" "../inc" "../common" "../public"
"../.." "../../include" "../../inc" "../../common" "../../public"))
(defconst win32-include-dirs
(list "D:/MinGW/include"
"D:/MinGW/x86_64-w64-mingw32/include"
"D:/MinGW/lib/gcc/x86_64-w64-mingw32/4.7.2/include"
"D:/MinGW/lib/gcc/x86_64-w64-mingw32/4.7.2/include/c++"
"D:/MinGW/lib/gcc/x86_64-w64-mingw32/4.7.2/include-fixed"
))
(let ((include-dirs user-include-dirs))
(when (eq system-type 'windows-nt)
(setq include-dirs (append include-dirs win32-include-dirs)))
(mapc (lambda (dir)
(semantic-add-system-include dir 'c++-mode)
(semantic-add-system-include dir 'c-mode))
include-dirs))
Is there something wrong with my configuration? A right configuration for the MinGW g++ is wanted.