如何使用emacs的gcc-code-assist?

时间:2014-07-29 13:53:52

标签: c++ gcc emacs g++ intellisense

我已经成功地从源代码构建并安装了gccsense和gcc-code-assist 我已经确认他们已正确安装。
但是,现在使用c和c ++文件的emacs行为方式没有变化(还没有intellisense!)

如何更正此问题?

我使用这些instructions来正确构建和安装gccsense和gcc-code-assist

PS:在阅读了关于这个问题的更多内容之后,我发现要测试一切是否正确安装,我们必须运行命令M-x gccsense-diagnose和一条消息"一切正常!"将出现在迷你缓冲区中。

我尝试了上面的命令但不是消息"一切正常",我在新的缓冲区中收到以下错误消息: -

     Cannot obtain completions for std::string
     You may not use code-completion 

PPS:这是我的#34; .emacs" `file: -

        (add-to-list 'load-path "~/.emacs.d/")  
(load "gccsense.el") 
(load "auto-complete.el") 

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(default ((t (:inherit nil :stipple nil :background "black" :foreground "gainsboro" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 128 :width normal :foundry "unknown" :family "Ubuntu Mono")))))
(defun switch-fullscreen nil
  (interactive)
  (let* ((modes '(nil fullboth fullwidth fullheight))
         (cm (cdr (assoc 'fullscreen (frame-parameters) ) ) )
         (next (cadr (member cm modes) ) ) )
    (modify-frame-parameters
     (selected-frame)
     (list (cons 'fullscreen next)))))

(define-key global-map [f11] 'switch-fullscreen)

 ; (global-auto-complete-mode t) 

1 个答案:

答案 0 :(得分:0)

你做到了吗? 将以下代码写入〜/ .emacs

(require 'gccsense)