diff -r -u a/src/editor.c b/src/editor.c
--- a/src/editor.c	2010-12-01 16:13:45.000000000 +0300
+++ b/src/editor.c	2011-03-27 13:57:48.000000000 +0400
@@ -66,7 +66,7 @@
 #include "project.h"
 #include "projectprivate.h"
 #include "main.h"
-
+#include <clang-c/Index.h>	
 
 /* Note: use sciwrappers.h instead where possible.
  * Do not use SSM in files unrelated to scintilla. */
@@ -1938,6 +1938,86 @@
 	return TRUE;
 }
 
+static gboolean autocomplete_clang(GeanyEditor *editor, gchar *root, gsize rootlen) {
+	GeanyDocument *current_doc = NULL;
+	ScintillaObject *current_doc_sci = NULL;
+	gchar *current_doc_contents;
+	size_t current_doc_length;
+	size_t current_doc_line;
+	size_t current_doc_column;
+	size_t current_doc_position;
+	size_t current_doc_start_position;
+	GString *words = g_string_new("");
+	GString *tmp = g_string_new("");
+	
+	gchar filename[] = "/path/to/nowhere/NonExistingFile.cpp";
+	gchar *str;
+	gchar *incomplete_word;
+	CXFile code_file;
+	CXIndex code_index;
+	CXTranslationUnit code_translation_unit;
+	struct CXUnsavedFile code_unsaved_file;
+	CXCodeCompleteResults *code_completion_results;
+	CXCompletionString completion_string;
+	CXString cxstring;
+	size_t i,n,m;
+	size_t len = 0;
+	
+	current_doc_sci = editor->sci;
+	current_doc_length = sci_get_length(current_doc_sci);
+	current_doc_position = sci_get_current_position(current_doc_sci);
+	current_doc_start_position = current_doc_position;
+	while (--current_doc_start_position > 0 && !isspace(sci_get_char_at(current_doc_sci,current_doc_start_position)));
+	if (isspace(sci_get_char_at(current_doc_sci,current_doc_start_position))) {
+		current_doc_start_position += 1;
+	}
+	incomplete_word = sci_get_contents_range(current_doc_sci,current_doc_start_position,current_doc_position);
+	current_doc_line = sci_get_current_line(current_doc_sci) + 1;
+	current_doc_column = sci_get_col_from_position(current_doc_sci,current_doc_position) + 1;
+	current_doc_contents = sci_get_contents(current_doc_sci,current_doc_length);
+	
+	code_index = clang_createIndex(0,0);
+	code_unsaved_file.Filename = filename;
+	code_unsaved_file.Contents = current_doc_contents;
+	code_unsaved_file.Length = current_doc_length;
+	code_translation_unit = clang_parseTranslationUnit(code_index,filename,NULL,0,&code_unsaved_file,1,CXTranslationUnit_Incomplete);
+	
+	code_completion_results = clang_codeCompleteAt(code_translation_unit,filename,current_doc_line,current_doc_column,&code_unsaved_file,1,0);
+		for (i=0; i < code_completion_results->NumResults; i++) {
+			completion_string = code_completion_results->Results[i].CompletionString;
+			for (n=0; n < clang_getNumCompletionChunks(completion_string); n++) {
+				cxstring = clang_getCompletionChunkText(completion_string,n);
+				str = (gchar *)clang_getCString(cxstring);
+				if (strncmp(str,incomplete_word,strlen(incomplete_word)) != 0) continue;
+				if (strncmp(str,incomplete_word,strlen(str)) == 0) continue;
+				g_string_erase(tmp,0,-1);
+				g_string_append(tmp,str);
+				g_string_append(tmp,"\n");
+				
+				if (strstr(words->str,str)) continue;
+				
+				g_string_append(words,str);
+				g_string_append(words,"\n");
+				clang_disposeString(cxstring);
+			}
+		}
+	
+	free(incomplete_word);
+	free(current_doc_contents);
+	
+	clang_disposeCodeCompleteResults(code_completion_results);
+	
+	g_string_free(tmp, TRUE);
+	
+	if (strlen(words->str) == 0) {
+		g_string_free(words, TRUE);
+		return FALSE;
+	}
+	g_string_truncate(words,strlen(words->str)-1);
+	show_autocomplete(current_doc_sci,rootlen, words->str);
+	g_string_free(words, TRUE);
+	return TRUE;
+}
 
 gboolean editor_start_auto_complete(GeanyEditor *editor, gint pos, gboolean force)
 {
@@ -2013,8 +2093,10 @@
 			 * editor_prefs.symbolcompletion_min_chars'th char */
 			if (force || rootlen >= editor_prefs.symbolcompletion_min_chars)
 			{
+				ret = autocomplete_clang(editor, root, rootlen);
+				
 				/* complete tags, except if forcing when completion is already visible */
-				if (!(force && SSM(sci, SCI_AUTOCACTIVE, 0, 0)))
+				if (!ret && !(force && SSM(sci, SCI_AUTOCACTIVE, 0, 0)))
 					ret = autocomplete_tags(editor, root, rootlen);
 
 				/* If forcing and there's nothing else to show, complete from words in document */
diff -r -u a/src/Makefile.in b/src/Makefile.in
--- a/src/Makefile.in	2010-12-01 19:42:18.000000000 +0300
+++ b/src/Makefile.in	2011-03-27 11:08:44.000000000 +0400
@@ -198,7 +198,7 @@
 INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
 INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
 INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
-LDFLAGS = @LDFLAGS@
+LDFLAGS = @LDFLAGS@ -lclang
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
