[anjuta] language-support-cpp-java: fixed linking problems with sourceview.



commit 256821de7ca15e1d2c9b6a056576cd9ec24c3975
Author: Massimo Corà <mcora src gnome org>
Date:   Sun Dec 13 17:06:54 2009 +0100

    language-support-cpp-java: fixed linking problems with sourceview.
    
    It was missing -lstdc++.

 plugins/language-support-cpp-java/Makefile.am      |    6 ++++--
 .../cxxparser/Makefile.am                          |   10 +++-------
 .../cxxparser/engine-parser-priv.h                 |    3 +++
 .../cxxparser/engine-parser.cpp                    |   15 ++++++++-------
 4 files changed, 18 insertions(+), 16 deletions(-)
---
diff --git a/plugins/language-support-cpp-java/Makefile.am b/plugins/language-support-cpp-java/Makefile.am
index 05d0c2f..98c06b5 100644
--- a/plugins/language-support-cpp-java/Makefile.am
+++ b/plugins/language-support-cpp-java/Makefile.am
@@ -35,6 +35,7 @@ AM_CPPFLAGS = \
 	$(WARN_CFLAGS) \
 	$(DEPRECATED_FLAGS) \
 	$(LIBANJUTA_CFLAGS) \
+	$(EXTRA_CFLAGS) \
 	-DG_LOG_DOMAIN=\"language-support-cpp-java\"
 
 # Where to install the plugin
@@ -50,14 +51,15 @@ libanjuta_language_cpp_java_la_SOURCES = \
 	cpp-java-assist.h \
 	cpp-java-assist.c \
 	cpp-java-utils.c \
-	cpp-java-utils.h
+	cpp-java-utils.h 
 
 libanjuta_language_cpp_java_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
 
 # Plugin dependencies
 libanjuta_language_cpp_java_la_LIBADD = \
 	$(LIBANJUTA_LIBS) \
-	cxxparser/libcxxparser.la
+	cxxparser/libcxxparser.la \
+	-lstdc++
 	
 prefs_ui_files = anjuta-language-cpp-java.ui
 include $(top_srcdir)/scripts/build-schemas.mk
diff --git a/plugins/language-support-cpp-java/cxxparser/Makefile.am b/plugins/language-support-cpp-java/cxxparser/Makefile.am
index ccf97d7..9399c6b 100644
--- a/plugins/language-support-cpp-java/cxxparser/Makefile.am
+++ b/plugins/language-support-cpp-java/cxxparser/Makefile.am
@@ -5,13 +5,8 @@
 AM_CPPFLAGS = \
 	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
 	-DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
-	$(WARN_CFLAGS) \
 	$(DEPRECATED_FLAGS) \
-	$(LIBANJUTA_CFLAGS) \
-  	-lc \
-	-DDEBUG \
-	-DCURR_DIR=\"`pwd`\" \
-	-fPIC
+	$(LIBANJUTA_CFLAGS) 
 
 noinst_LTLIBRARIES = libcxxparser.la
 
@@ -41,5 +36,6 @@ libcxxparser_la_SOURCES = \
         scope-parser.h \
         variable-parser.h 
  
-libcxxparser_la_LIBADD = $(LIBANJUTA_LIBS) 
+libcxxparser_la_LIBADD = $(LIBANJUTA_LIBS) \
+	$(GTHREAD_LIBS)
 libcxxparser_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
diff --git a/plugins/language-support-cpp-java/cxxparser/engine-parser-priv.h b/plugins/language-support-cpp-java/cxxparser/engine-parser-priv.h
index 0c6354d..4a27a47 100644
--- a/plugins/language-support-cpp-java/cxxparser/engine-parser-priv.h
+++ b/plugins/language-support-cpp-java/cxxparser/engine-parser-priv.h
@@ -24,9 +24,12 @@
 #include <vector>
 
 
+#ifdef __cplusplus
 extern "C" {
 #include <libanjuta/interfaces/ianjuta-symbol-manager.h>
 }
+#endif
+
 #include "expression-result.h"
 #include "cpp-flex-tokenizer.h"
 
diff --git a/plugins/language-support-cpp-java/cxxparser/engine-parser.cpp b/plugins/language-support-cpp-java/cxxparser/engine-parser.cpp
index e77e78b..eafc164 100644
--- a/plugins/language-support-cpp-java/cxxparser/engine-parser.cpp
+++ b/plugins/language-support-cpp-java/cxxparser/engine-parser.cpp
@@ -31,7 +31,7 @@
 
 using namespace std;
 
-// Singleton pattern.
+/* Singleton pattern. */
 EngineParser* 
 EngineParser::getInstance ()
 {
@@ -106,10 +106,10 @@ EngineParser::nextMainToken (string &out_token, string &out_delimiter)
 	return false;
 }
 
+/* FIXME: to be removed. This is unused debug code */
 void 
 EngineParser::DEBUG_printTokens (const string& text)
 {
-	// FIXME
 	_main_tokenizer->setText (text.c_str ());
 
 	string op;
@@ -124,10 +124,6 @@ EngineParser::DEBUG_printTokens (const string& text)
 		token.clear ();
 	}
 	printf ("tok final %s\n", token.c_str ());	
-
-
-	// try to do a symbol search
-
 }
 
 ExpressionResult 
@@ -136,6 +132,7 @@ EngineParser::parseExpression(const string &in)
 	return parse_expression (in.c_str ());	
 }
 
+/* FIXME: to be removed. This is unused debug code */
 void
 EngineParser::testParseExpression (const string &str)
 {
@@ -323,7 +320,8 @@ EngineParser::getTypeNameAndScopeByToken (ExpressionResult &result,
 		 * just above to the statement line 
 		 */
 		cout << "variables found are..." << endl;
-		for (VariableList::reverse_iterator iter = li.rbegin(); iter != li.rend(); iter++) {
+		for (VariableList::reverse_iterator iter = li.rbegin(); iter != li.rend(); iter++) 
+		{
 			Variable var = (*iter);
 			var.print ();
 			
@@ -338,6 +336,9 @@ EngineParser::getTypeNameAndScopeByToken (ExpressionResult &result,
 			}
 		}
 
+		// FIXME: test also with function definition in case the variable is defined there....
+		
+		
 		/* if we reach this point it's likely that we missed the right var type */
 		cout << "## Wrong detection of the variable type" << endl;
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]