Comments (13)
Version of plugins
from emacs.d.
auto-complete-clang的版本时20120612,我下了个20120730版本的,把auto-complete-clang.el替换了,但是不行,我是个emacs新手,求指点呀
from emacs.d.
@baby-bear 看看*clang error*
buffer的头几行报什么错吧:-)
from emacs.d.
我感觉是clang-cc1的问题,首先好像没空格,而且编译c++一般好像用clang++,之后我把auto-complete-clang.el中一行 (append '("-cc1" " -fsyntax-only") 改成了 (append '("++ -cc1" " -fsyntax-only") 之后byte-compile-d,可还是不行.出现的错误都一样,而且minibuffer在开始只有一个build目录找不到的小错
from emacs.d.
@baby-bear clang的介绍页面是这样说的
Note, the -cc1 argument indicates the compiler front-end, and not the driver, should be run.
@brianjcj 原来的elisp上出错信息写得很不好,你如果信得过的话试试我这个吧https://github.com/HongxuChen/dotfiles/blob/master/_emacs.d/site-lisp/auto-complete-clang/auto-complete-clang.el ,出错的话就看echo area或者/tmp/ac-clang-stderr文件
不过我觉得auto-complete-clang响应时间上不行,所以基本上放弃了
from emacs.d.
use company-clang instead. I don't use auto-complete any more.
from emacs.d.
I will see to the auto-complete issue this weekend. besides, you know to make auto-complete-clang work in real project, you need manual set up, right?
I created another project cpputils-cmake to do that set up.
if you don't use cmake and cpputils-cmake, you need set upac-clang-flags
by yourself.
In one of my project, the value of ac-clang-flags
is:
("-I/home/cb/wxWidgets-master/build-release/lib/wx/include/gtk2-unicode-static-2.9" "-I/home/cb/wxWidgets-master/include" "-I/home/cb/projs/dumbway/src/desktop/lua-5.2.1/src" "-I/usr/include/gtk-2.0" "-I/usr/lib64/gtk-2.0/include" "-I/usr/include/atk-1.0" "-I/usr/include/cairo" "-I/usr/include/gdk-pixbuf-2.0" "-I/usr/include/pango-1.0" "-I/usr/include/glib-2.0" "-I/usr/lib64/glib-2.0/include" "-I/usr/include/pixman-1" "-I/usr/include/freetype2" "-I/usr/include/libpng15")
from emacs.d.
@redguardtoo auto-complete-clang
sucks a lot since it uses vanilla clang --code-completion-at
and cannot work well for larger projects(the flags issue is a permant headache, neither directory variables nor file local variables work well); there is also a problem with it: you cannot complete the function arguments when you are in template snippets
stats. I remembered that the author referenced a lot of code from company-clang
beforehand, which might be superior. But I think irony-mode and rtags are more suitable for C++ development. I hope you can have a try and share some customizations:-)
from emacs.d.
cool, definitely I will try irony-mode
from emacs.d.
恩,在编辑 .C 文件的时候,当想输入 struct test_stru
来定义一个结构体的时候, 输入到 struct tes
这个位置之后,就会出现这样的错误 /usr/bin/clang-cc1 -fsyntax-only -code-completion-macros -x c -code-completion-at -:2:12 -
, clang error buffer 中的内容如下
clang failed with error 1:
/usr/bin/clang-cc1 -fsyntax-only -code-completion-macros -x c -code-completion-at -:5:12 -
<stdin>:1:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^
1 error generated.
如果已经定义了这个结构体,就不会出现这样的错误。
from emacs.d.
C-h v
, check ac-clang-flags
.
from emacs.d.
应该是在 init.el 中使用了 company-mode 而不是 auto-complete 的原因。
from emacs.d.
what's your auto-complete plugin?
On Thu, Aug 1, 2013 at 4:26 PM, Imtxc [email protected] wrote:
I don't have variable name called ac-clang-flags in Debian sid amd64
Emacs24.3 and Clang 3.2-10—
Reply to this email directly or view it on GitHubhttps://github.com//issues/34#issuecomment-21917228
.
help me, help you.
from emacs.d.
Related Issues (20)
- `my-comma-leader-def` for {major/minor}-mode-map? HOT 3
- void-variable read-symbol-positions-list HOT 2
- Duplicate key binding HOT 2
- org-mode: evil-auto-indent should be set as local variable HOT 2
- 中文引号导致光标位置不准确 HOT 2
- windows下,ctags 无法使用 HOT 3
- 如何保留搜索的结果 HOT 1
- 启动的时候会出现多次 Warning: setting attribute `:background' of face `default HOT 1
- define-key碰到Wrong type argument: Commandp问题 HOT 3
- 文档中提到的any-command-in-emacs不存在了
- flymake频繁报错 HOT 5
- my-dict-simple-definition执行后显示“File not found”. HOT 3
- counsel-etags-grep-current-directory这个函数能否搜索中文? HOT 2
- 陈哥的emacs.d是我长期使用的,最近在win7上也设置了配置,但是在dired中加密中文文件名会报错,此时文件名为乱码。 HOT 1
- Advice for require-package and featurep HOT 1
- wsl2中全新使用配置,完成后打开新文件出现File mode specification error:(wrong-type-argument stringp nil)) HOT 1
- my-imenu don't show result correctly for .org file HOT 4
- 有关于sourceinsight在emacs的问题 HOT 2
- Can't not install with Emacs 29.1 on Windows 11 HOT 2
- Support open recent file in other frame? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emacs.d.