Note that there are some explanatory texts on larger screens.

plurals
  1. POemacs cedet semantic with Qt4 how to configure
    primarykey
    data
    text
    <p>I use emacs 23.1.1 on X86_64-pc-gnu-linux (ubuntu 10.04) and follow the famous link <a href="http://alexott.net/en/writings/emacs-devenv/EmacsCedet.html" rel="nofollow">http://alexott.net/en/writings/emacs-devenv/EmacsCedet.html</a> to add all config to .emacs. But it can NOT do even basic job. There must be sth wrong with my setup or configue.</p> <p>If I try to let it display the member function, it NOT be able to find. [ auto complete use clang as parser. So what the parser semantic uses? ]</p> <pre><code>;; Load CEDET (load-file "~/backup/cedet-trunk/common/cedet.el") (global-ede-mode 1) ;(semantic-load-enable-code-helpers) (semantic-load-enable-excessive-code-helpers) ;(semantic-load-enable-semantic-debugging-helpers) (global-srecode-minor-mode 1) (global-semantic-tag-folding-mode 1) (require 'semantic-tag-folding) (global-semantic-idle-scheduler-mode 1) (global-semantic-idle-completions-mode 1) (global-semantic-idle-summary-mode 1) (global-semantic-idle-completions-mode) (require 'semantic-ia) (require 'eassist) (require 'semantic-gcc) (require 'semanticdb-global) (semanticdb-enable-gnu-global-databases 'c-mode) (semanticdb-enable-gnu-global-databases 'c++-mode) (setq qt4-base-dir "/usr/include/qt4") (setq qt4-gui-dir (concat qt4-base-dir "/QtGui")) (setq qt4-core-dir (concat qt4-base-dir "/QtCore")) (semantic-add-system-include qt4-base-dir 'c++-mode) (semantic-add-system-include qt4-gui-dir 'c++-mode) (semantic-add-system-include qt4-core-dir 'c++-mode) (add-to-list 'auto-mode-alist (cons qt4-base-dir 'c++-mode)) (add-to-list 'semantic-lex-c-preprocessor-symbol-file (concat qt4-base-dir "/Qt/qconfig.h")) (add-to-list 'semantic-lex-c-preprocessor-symbol-file (concat qt4-base-dir "/Qt/qconfig-large.h")) (add-to-list 'semantic-lex-c-preprocessor-symbol-file (concat qt4-base-dir "/Qt/qglobal.h")) (defun my-cedet-hook () (local-set-key [(control return)] 'semantic-ia-complete-symbol-menu) (local-set-key "\C-c?" 'semantic-ia-complete-symbol) (local-set-key "\C-c&gt;" 'semantic-complete-analyze-inline) (local-set-key "\C-c=" 'semantic-decoration-include-visit) (local-set-key "\C-cj" 'semantic-ia-fast-jump) (local-set-key "\C-cb" 'semantic-mrub-switch-tags) (local-set-key "\C-cd" 'semantic-ia-show-doc) (local-set-key "\C-cs" 'semantic-ia-show-summary) (local-set-key "\C-cp" 'semantic-analyze-proto-impl-toggle) (local-set-key "\C-cr" 'semantic-symref) (local-set-key "\C-c\-" 'senator-fold-tag) (local-set-key "\C-c\+" 'senator-unfold-tag) ) (add-hook 'c-mode-common-hook 'my-cedet-hook) (add-hook 'lisp-mode-hook 'my-cedet-hook) (add-hook 'emacs-lisp-mode-hook 'my-cedet-hook) (ede-cpp-root-project "Test" :name "Test Project" :file "~/project/shared/test-qt-semantic.cpp" :include-path '("/" ) :system-include-path '("/usr/include/qt4" "/usr/include/qt4/Qt" "/usr/include/qt4/QtGui" "/usr/include/qt4/QtCore" )) </code></pre> <p>This is the source file:</p> <pre><code>#include &lt;QApplication&gt; #include &lt;QPushButton&gt; #include &lt;QString&gt; int main (int argc, char ** argv) { QApplication app (argc, argv); QPushButton hello ("Hello, World!"); hello.resize (100, 30); hello.show (); QString id("hi"); return app.exec (); } </code></pre> <blockquote> <p>Unable to find datatype for: "class QPushButton hello ()".<br> Declared type is: "class QPushButton {}"<br> Raw data type is: ("QPushButton" type (:type "class") nil nil)</p> <p>Semantic could not find this data type in any of its global tables.</p> <p>Semantic locates datatypes through either the local scope, or the global typecache.</p> <p>Local Scope Information:<br> * Tag Class Constraint against SCOPE: (type)<br> * No known parents in current scope.<br> * No known symbols currently in scope.<br> * No known symbols declared locally.<br> Semantic creates and maintains a type cache for each buffer.<br> If the type is a global type, then it should appear in they typecache.<br> To examine the typecache, type:</p> <p>M-x semanticdb-typecache-dump RET [ Do It ]</p> <p>Current typecache Statistics:<br> 0 types global in this file<br> 0 types from includes.</p> <p>If the datatype is not in the typecache, then your include path may be incorrect. </p> <p>Include Path Summary:</p> <p>This file's project include search is handled by the EDE object:<br> Buffer Target: #ede-cpp-root-target /home/mike/project/shared/><br> Buffer Project: #ede-cpp-root-project Test><br> Backup Locator: #ede-locate-base Loc> </p> <p>The system include path is:</p> <pre><code>/usr/include/qt4/ /usr/include/qt4/QtGui/ /usr/include/qt4/QtCore/ /usr/include/c++/4.4/ /usr/include/c++/4.4/x86_64-linux-gnu/ /usr/include/c++/4.4/backward/ /usr/local/include/ /usr/lib/gcc/x86_64-linux-gnu/4.4.3/include/ /usr/lib/gcc/x86_64-linux-gnu/4.4.3/include-fixed/ /usr/include/ </code></pre> <p>Include Summary: /home/mike/project/shared/test-qt-semantic.cpp</p> <p>test-qt-semantic.cpp contains 3 includes.<br> Unknown Includes: 0<br> Unparsed Includes: 0<br> Parsed Includes: 3<br> No unknown includes.</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload