我將CEDET配置爲自動完成MinGW gcc,它工作的很好,但是我無法獲得完成STL庫成員的g ++工作。舉例來說,我不能自動完成的std :: string變量獲得c_str()或其它功能:如何配置CEDET以自動完成MinGW g ++
#include <string>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
string s;
s. // no pop up member functions here
return 0;
}
這裏是我的.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))
我的配置有問題嗎? MinGW g ++的正確配置是需要的。
你有沒有看過Alex Ott撰寫的這篇文章:[CEDET的簡單介紹](http://alexott.net/en/writings/emacs-devenv/EmacsCedet.html)? – Francesco 2013-03-19 07:12:22
@Francesco是的,我讀過它(也許我跳過了一些東西),我定義的類成員可以自動完成,但STL lib的成員函數或成員函數不能自動完成。 – toolchainX 2013-03-19 08:52:35