kuangdash
kuangdash

Reputation: 37

When cedet semantic parsing c header files of my system, here comes "Idle Parse Error":

No method definition: semanticdb-add-reference, (nil (\"stdio.h\" include (:system-flag t) (unlink-copy-hook (semantic--tag-unlink-copy-secondary-overlays) link-hook (semantic--tag-link-secondary-overlays) secondary-overlays (# #) unlink-hook (semantic--tag-unlink-secondary-overlays) dependency-file \"d:/MinGW/include/stdio.h\") #))"

I use mingw in windows 7 system, c.c is the file name, and there are two sentence in init.el which are relevant to the problem:

(semantic-add-system-include "D:/MinGW/include" 'c-mode)
(setq semantic-c-dependency-system-include-path "D:/MinGW/include")

Upvotes: 1

Views: 732

Answers (2)

kuangdash
kuangdash

Reputation: 37

"M-x customize" then search "Global Semanticdb Minor Mode" then toggle on it

Upvotes: 0

Eric
Eric

Reputation: 3949

The include path you are setting should be a list, such as:

(setq semantic-c-dependency-system-include-path '("d:/MinGW/include"))

but you don't need that line if you are using semantic-add-system-include.

While I haven't tried it, you can probably skip doing either of the above by instead using semantic-gcc-setup and ask your minGW compiler. Just make sure a command "gcc" is on your exec-path when you start Emacs, and it will be automatically detected.

No one has reported this working or not working for MinGW, so if it works out, let us know.

Upvotes: 1

Related Questions