The ironic mode does not raise the path of inclusion

I recently started using irony-modeemacs for completion (24.3.1). However, I seem to be unable to add additional systems, including package paths.

I have this code in my configuration:

(defun ac-cc-mode-clang-hooks ()
  (yas/minor-mode-on)
  (auto-complete-mode 1)

  ;; avoid enabling irony-mode in modes that inherits c-mode, e.g: php-mode
  (when (member major-mode irony-known-modes)
       (irony-mode 1))

  ;; set compiler flags to include header files
  (setq irony-compile-flags '("-Iinc"))
  (irony-reload-flags))

(add-hook 'c++-mode-hook 'ac-cc-mode-clang-hooks)
(add-hook 'c-mode-hook 'ac-cc-mode-clang-hooks)

the irony mode loads correctly, and the termination works fine for included paths that the compiler knows explicitly (i.e. all printed echo "" | g++ -v -x c++ -E -), but no additional include path incis matched (it doesn't matter if its relative or absolute path).

However, if I add the information to a file .clang_completeand upload it using C-c C-b, then the recognized path will be recognized and used. Obviously, this is a less than ideal setting because

  • .clang_complete ,
  • .clang_complete .

- ( , ), irony-mode, ?

+4
1

: https://github.com/Sarcasm/irony-mode#i-got-an-error-due-to-stdargh-how-to-solve-this

irony-libclang-additional-flags . irony-reload-flags.

, .

:

(setq irony-libclang-additional-flags
      (append '("-I" "inc") irony-libclang-additional-flags))
+4

All Articles