Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Emacs 24.2, Cedet 1.1, Windows 7

Visual Studio 10.0 Include directory

(add-to-list 'load-path " ~/.emacs.d/cedet-1.1/common")
(load-file "~/.emacs.d/cedet-1.1/common/cedet.el")


(require 'semantic-decorate-include)

(require 'semantic-ia)

(global-ede-mode nil)

(setq-mode-local c-mode semanticdb-find-default-throttle
                 '(project local unloaded system recursive))
(setq-mode-local c++-mode semanticdb-find-default-throttle
                 '(project local unloaded system recursive))

(semantic-add-system-include "C:/Program Files/Microsoft Visual Studio 10.0/VS/Include" 'c++-mode)

When writing c++ program and include, say, iostream, it navigates to this include file, but is not able to parse it. On the other hand when include, say, stdlib.h it parses successfully such an include.

How to fix this?

share|improve this question
up vote 1 down vote accepted

Found some workaround. Need to tell C lexer to parse Microsoft include files with defines like this

(setq microsoft-base-dir 
    "C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include")

(add-to-list 'semantic-lex-c-preprocessor-symbol-file 
     (concat microsoft-base-dir "/crtdefs.h"))
(add-to-list 'semantic-lex-c-preprocessor-symbol-file 
     (concat microsoft-base-dir "/yvals.h"))
(add-to-list 'semantic-lex-c-preprocessor-symbol-file 
     (concat microsoft-base-dir "/vadefs.h"))
(add-to-list 'semantic-lex-c-preprocessor-symbol-file 
     (concat microsoft-base-dir "/comdefsp.h"))

Now semantic parser feels better (but not completely good) and is able to parse some includes like <string>

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.