我在Windows 7上使用Emacs 24.3。我使用ELPA安裝了auto-complete-mode
和autocomplete-c-headers
。Emacs自動完成c頭。 Symbol作爲變量的值爲void
要.emacs
我說:
(require 'auto-complete)
(add-to-list 'load-path "~/.emacs.d/elpa/auto-complete-20140208.653") ; This may not be appeared if you have already added.
(add-to-list 'ac-dictionary-directories "~/.emacs.d/elpa/auto-complete-20140208.653/dict")
(require 'auto-complete-config)
(ac-config-default)
;|---------------------------------------------------------------+
;|auto-complete c/c++ headers
;|---------------------------------------------------------------+
(add-to-list 'load-path
"~/.emacs.d/elpa/auto-complete-c-headers-20140325.835")
(defun my:ac-c-headers-init()
(require 'auto-complete-c-headers)
(add-to-list 'ac-sources 'ac-source-c-headers)
(add-to-list 'aсhead:include-directories '"d:/DevTools/env/MinGW/lib/gcc/mingw32/4.8.1/include")
)
(add-hook 'c++-mode-hook 'my:ac-c-headers-init)
(add-hook 'c-mode-hook 'my:ac-c-headers-init)
當我在C++運行 - 模式,它顯示的錯誤
Symbol's value as variable is void
切換到您的.cpp文件,並使用M-:評估(調試(C++ - 模式t)),這將打開調試器的錯誤,並希望告訴你哪個變量導致問題。 –