3

I'm on Debian Jessie 8.5,GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.5), and I installed irony-mode as the author said here:

irony-mode author's repository

I mean, I typed M-x package-install RET irony RET. After that, I configured my ~/.emacs file like this:

(add-hook 'c++-mode-hook 'irony-mode)
(add-hook 'c-mode-hook 'irony-mode)
(add-hook 'objc-mode-hook 'irony-mode)

;; replace the `completion-at-point' and `complete-symbol' bindings in
;; irony-mode's buffers by irony-mode's function
(defun my-irony-mode-hook ()
  (define-key irony-mode-map [remap completion-at-point]
    'irony-completion-at-point-async)
  (define-key irony-mode-map [remap complete-symbol]
    'irony-completion-at-point-async))
(add-hook 'irony-mode-hook 'my-irony-mode-hook)
(add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options)

After restarting Emacs, I opened a .cpp file, I typed M-x irony-install-server RET, and it compiled perfectly. Then, I typed irony-cdb-autosetup-compile-options, but irony doesn't work, when I try to call a function from a class included by its .h name, and I press TAB, nothing appears. And Irony mode is perfectly enabled.

  • 1
    What happened when you typed `irony-cdb-autosetup-compile-options`? Did you get any errors? Also, could you give an example of some source code so others can replicate your issue? – Wilfred Hughes Sep 12 '16 at 02:48
  • Well, when I typed `irony-cdb-autosetup-compile-options RET`, the minibuffer didn't show anything. That was unexpected, because the previous command showed a message of compilation successfully. Here you have an example of code to replicate my issue: [link] (https://github.com/byuksel/Cpp-Demo-Project-For-Emacs). Thanks for replying @WilfredHughes ! – Fabrizio Piva Sep 12 '16 at 11:30
  • in order to add more information, this is the output from typing `M-x irony-install-server`: [compilation of irony-server: part 1](https://k60.kn3.net/4F8B0A0BB.png) and [compilation of irony-server: part 2](https://k61.kn3.net/4144D4BC9.png). – Fabrizio Piva Sep 13 '16 at 00:12
  • Also, when I am on main.cpp file, and I type `M-x irony-cdb-menu RET` I get "No compilation database in use" message from minibuffer. And when I type `irony-cdb-autosetup-compile-options` nothing happens. – Fabrizio Piva Sep 13 '16 at 00:44

0 Answers0