Fix linking with gcc to use g++ to link in C++ libs.
authorStewart Smith <stewart@flamingspork.com>
Wed, 18 Nov 2009 01:05:53 +0000 (12:05 +1100)
committerCarl Worth <cworth@cworth.org>
Wed, 18 Nov 2009 13:34:02 +0000 (05:34 -0800)
Previously, Ubuntu 9.10, gcc 4.4.1 was getting:

/usr/bin/ld: lib/notmuch.a(database.o): in function global
constructors keyed to BOOLEAN_PREFIX_INTERNAL:database.cc(.text+0x3a):
error: undefined reference to 'std::ios_base::Init::Init()'

Makefile.local

index 016805e0039123374021a6974d61be7076184c6a..16bbb1e4d7ea976b3ccf441fb9a2e588bf9106ca 100644 (file)
@@ -18,7 +18,7 @@ notmuch_client_srcs =         \
 
 notmuch_client_modules = $(notmuch_client_srcs:.c=.o)
 notmuch: $(notmuch_client_modules) lib/notmuch.a
-       $(CC) $(LDFLAGS) $^ -o $@
+       $(CXX) $(LDFLAGS) $^ -o $@
 
 notmuch.1.gz: notmuch.1
        gzip --stdout notmuch.1 > notmuch.1.gz