On 10/26/2010 07:33 PM, David Engster wrote:
> Eugen Dahm writes:
>> http://sourceforge.net/mailarchive/message.php?msg_name=1254376813.8450.16.camel%40nkn-laptop
>> Hi, according to this post, with the proposed fixes, cedet "should" find
>> all wxWidgets symbols. I pretty much copied the config and tried
>> to get it to run with my installed wxWidgets version (2.8.something ..
>> Fedora13). I'm wondering, why cedet seems to not see all symbols.
>> I'm using the posted DE-implied-whatever function, but it seems some
>> Symbols like Centre (a method in wxFrame .. according to the wxWidgets
>> documentation) can't be found by cedet. Atm, I'm compiling 2.9.1 to see
>> if this one works, but somehow assuming 2.9.1 works for me, the thought
>> kinda irritates me that 2.8 doesn't work perfectly, but 2.9 does.
> Please try the following:
>
> * Delete all cache files in ~/.semanticdb
>
> * Unless you're already using the GTk binding, install them (stable
> version, currently 2.8.11). The following assumes that all includes
> are located in /usr/include/wx-2.8.
>
> * Use the following setup:
>
> (add-to-list 'semantic-lex-c-preprocessor-symbol-map '("WXDLLIMPEXP_CORE" . ""))
> (add-to-list 'semantic-lex-c-preprocessor-symbol-map '("WXDLLIMPEXP_FWD_CORE" . ""))
> (add-to-list 'semantic-lex-c-preprocessor-symbol-map '("WXDLLIMPEXP_BASE" . ""))
> (add-to-list 'semantic-lex-c-preprocessor-symbol-map '("WXDLLIMPEXP_FWD_BASE" . ""))
> (add-to-list 'semantic-lex-c-preprocessor-symbol-map '("WXDLLIMPEXP_FWD_XML" . ""))
> (add-to-list 'semantic-lex-c-preprocessor-symbol-map '("WXDLLIMPEXP_ADV" . ""))
> (add-to-list 'semantic-lex-c-preprocessor-symbol-map '("WXDLLEXPORT" . ""))
> (add-to-list 'semantic-lex-c-preprocessor-symbol-map '("__WXGTK20__" . "1"))
> (add-to-list 'semantic-lex-c-preprocessor-symbol-map '("wxWindow" . "wxWindowGTK"))
> (DE-imply-includes-in-directory "/usr/include/wx-2.8/wx/gtk")
>
> At least in the hello world example
>
> http://www.wxwidgets.org/docs/tutorials/hworld.txt
>
> in MyApp::OnInit(), completing after frame-> now shows me 'Center'.
>
> -David
>
>
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
> Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> Cedet-devel mailing list
> Cedet-devel@...
> https://lists.sourceforge.net/lists/listinfo/cedet-devel
Unfortunately, I already tried to recreate the .semanticdb several times
with no luck. Right now I'm using the cedet version from cvs
and the 2.9.whatever wxWidgets build.
frame-> shows me: Create, GetClientAreaOrigin, IsClientAreaChild, New,
OnAbout, OnInternalIdle, OnQuit, ProcessCommand, ShowFullScreen and
UpdateWindowUI. frame-> only shows me Center when I type frame->Ce +
semantic-ia-complete-symbol-menu. frame->C +
semantic-ia-complete-symbol-menu only shows Create, while
semantic-complete-self-insert (->) never shows me Center. There are some
strange inconsistencies :(. Maybe it helps if I post my config. I don't
see any mistakes compared to what you posted.
>
;Here is the CEDET initialization file looks like:
;; Handles the CEDET configuration
(load-file "~/cedet/common/cedet.el")
(semantic-load-enable-excessive-code-helpers)
(require 'semantic-ia)
(require 'semantic-gcc)
(defvar wx-base-dir "/opt/wxWidgets-2.9.1/include/wx-2.9/wx")
;; custom key bindings for smart completion
(global-set-key "\C-x\C-m" 'semantic-ia-complete-symbol-menu)
;; Loading EDE package
(require 'ede)
(global-ede-mode t)
;; Function to load all include files in the specified directory
(defun DE-imply-includes-in-directory (dir)
"Add all header files in DIR to `semanticdb-implied-include-tags'."
(let ((files (directory-files dir t "^.+\\.h[hp]*$" t)))
(defvar-mode-local c++-mode semanticdb-implied-include-tags
(mapcar (lambda (header)
(semantic-tag-new-include
header
nil
:filename header))
files))))
;initialization file for wxWidgets:
;; include files for wxwidgets
(semantic-add-system-include wx-base-dir 'c++-mode)
(semantic-add-system-include wx-base-dir 'c-mode)
;; preprocessor macro
(add-to-list 'semantic-lex-c-preprocessor-symbol-map '("WXDLLEXPORT" . ""))
(add-to-list 'semantic-lex-c-preprocessor-symbol-map
'("WXDLLIMPEXP_CORE" . ""))
(add-to-list 'semantic-lex-c-preprocessor-symbol-map
'("WXDLLIMPEXP_FWD_CORE" . ""))
(add-to-list 'semantic-lex-c-preprocessor-symbol-map
'("WXDLLIMPEXP_BASE" . ""))
(add-to-list 'semantic-lex-c-preprocessor-symbol-map
'("WXDLLIMPEXP_FWD_BASE" . ""))
(add-to-list 'semantic-lex-c-preprocessor-symbol-map
'("WXDLLIMPEXP_FWD_XML" . ""))
(add-to-list 'semantic-lex-c-preprocessor-symbol-map '("WXDLLIMPEXP_ADV"
. ""))
(add-to-list 'semantic-lex-c-preprocessor-symbol-map '("__WXGTK20__" . "1"))
(add-to-list 'semantic-lex-c-preprocessor-symbol-map '("wxWindow" .
"wxWindowGTK"))
(defun cedet-commands ()
(local-set-key [(control return)] 'semantic-ia-complete-symbol)
(local-set-key "\C-c?" 'semantic-ia-complete-symbol-menu)
(local-set-key "\C-c>" 'semantic-complete-analyze-inline)
(local-set-key "\C-cp" 'semantic-analyze-proto-impl-toggle)
(local-set-key "\C-cj" 'semantic-complete-jump-local)
(local-set-key "\C-cJ" 'semantic-complete-jump)
(local-set-key "\C-cf" 'semantic-ia-fast-jump)
(local-set-key "\C-cw" 'semantic-symref)
(local-set-key "\C-cW" 'semantic-symref-symbol)
(local-set-key (kbd "C-c <left>") 'semantic-tag-folding-fold-block)
(local-set-key (kbd "C-c <right>") 'semantic-tag-folding-show-block)
)
(defun cedet-self-insert ()
(local-set-key "." 'semantic-complete-self-insert)
(local-set-key ">" 'semantic-complete-self-insert)
; (local-set-key "::" 'semantic-complete-self-insert)
)
(defun c_coding()
(cedet-commands)
(cedet-self-insert)
)
(setq-mode-local c-mode
semanticdb-find-default-throttle
'(project unloaded system recursive))
(setq-mode-local c++-mode
semanticdb-find-default-throttle
'(project unloaded system recursive))
(add-hook 'c-mode-common-hook 'c_coding)
;; Implicitly adding the header files to get completion working
;; Adding all include files in gtk directory
(DE-imply-includes-in-directory (concat wx-base-dir "/gtk"))
(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.
'(inhibit-startup-screen t))
(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.
)
;; END
And yes, I exported $CPATH with export
CPATH=/opt/wxWidgets-2.9.1/include/wx-2.9/wx and configured the library
path with ldconfig /opt/wxWidgets-2.9.1/lib (linking and executing
works, which ldd shows .... libwx_gtk2u_xrc-2.9.so.1 =>
/opt/wxWidgets-2.9.1/lib/libwx_gtk2u_xrc-2.9.so.1 .
So it is definitely linked with the new compiled version (although not
really the main issue here).
I had to export CPATH, because without it, cedet didn't find the
libraries (which means it definitely sees them in emacs).
With this config now, I get the exact same symbols with the F13
wxWidgets-2.8.x and with the compiled version@ /opt/wxWidgets-2.9.1.
I'm out of ideas right now.
|