Golevka / emacs-clang-complete-async

An emacs plugin to complete C and C++ code using libclang
360 stars 71 forks source link

Various compilation problems and solutions. "-Wcovered-switch-default", "cannot find -lz", etc... #61

Closed deb0ch closed 7 years ago

deb0ch commented 10 years ago

Hi everybody,

I'm posting here because I had much trouble compiling this project on my brand new Opensuse 13.10 64 bit, so I wanted to share the solutions i found to help those who might be experiencing the same problems.

Since my Opensuse was freshly installed, I think that I'm going to list about all the various stuff needed on your computer to be able to use the command "make" on that project.

First, after having cloned the repo, you find out that gcc doesn't recognize the "-Wcovered-switch-default" flag. It's normal, you need to compile with clang, using the command : make CC=clang

You will need various clang-llvm packages, libs, development packages (I don't remember exactly which ones, but i trust you to figure it out).

The last one you will need is the zlib-development package (if you have the error 'cannot find -lz' at linkage).

In my case, i was able to compile the project only after having installed all those packages. I used YaST2 with the default repos to find all of them.

I hope this post will be of some help for some people. Please correct me if anything I stated here is wrong or inaccurate.

Have a good day and a good compilation =)

Banzaï.

EDIT: I got less lazy, and here are the exact packages I downloaded to make it work:

libclang 3.3-6.4.1 llvm-clang 3.3-6.4.1 llvm-clang-devel 3.3-6.4.1 llvm 3.3-6.4.1 libLLVM 3.3-6.4.1 llvm-devel 3.3-6.4.1 zlib-devel