So, I've been working for some time on connecting hashing out a trivial application, comprising C++ and Objective-C, to prove some concepts and try and learn something.
Here's where I'm at now, my command (being run, and re-run on changes) is
$ autoreconf -vis && make clean && ./configure && make && ./src/greetings
Note, that I'm hoping that it'll run when I'm done, here's a brief file list:
$ find . | ack '\.(?:cpp|mm|h)$' ./src/darwin/greet.cpp ./src/darwin/greeting.h ./src/darwin/greeting.mm ./src/greet.h ./src/main.cpp ./src/mingw32/greet.cpp ./src/mingw32/greet.h
The files in full, can all be found in this Gist at Github.
Rather than being a problem specifically with mixing the languages ( I don't even make it that far) - I appear to stumble at the compiler not recognising that this is Objective-C
(or ObjecC++
) - for that reason, my autoconf files are in this gist.
With the complete error output here, also in a Gist.
Here's a sample:
In file included from /usr/include/c++/4.2.1/iosfwd:48, from /usr/include/c++/4.2.1/ios:43, from /usr/include/c++/4.2.1/ostream:45, from /usr/include/c++/4.2.1/iostream:45, from darwin/greet.cpp:10: /usr/include/c++/4.2.1/bits/stringfwd.h:48: error: template with C linkage /usr/include/c++/4.2.1/bits/stringfwd.h:51: error: template with C linkage /usr/include/c++/4.2.1/bits/stringfwd.h:54: error: template with C linkage /usr/include/c++/4.2.1/bits/stringfwd.h:58: error: template specialization with C linkage /usr/include/c++/4.2.1/bits/stringfwd.h:63: error: template specialization with C linkage In file included from /usr/include/c++/4.2.1/iosfwd:49, from /usr/include/c++/4.2.1/ios:43, from /usr/include/c++/4.2.1/ostream:45, from /usr/include/c++/4.2.1/iostream:45, from darwin/greet.cpp:10: