Subject: [Instant-dev] csrcs

From: Ilmar Wilbers <[email-masked]>
Date: Mon, 20 Apr 2009 15:22:55 +0200

Hi,

Currently, there is no support for building .c files in write_setup in 
codegeneration, and this is marked with FIXME several places. But we can 
we not treat the .c files just as the .cpp files, am I missing something?

ilmar

---

From: Kent Andre <[email-masked]>
Date: Mon, 20 Apr 2009 16:30:03 +0200

We don't need csrcs I think. Having cppsrcs is enough.  

Kent

On ma., 2009-04-20 at 15:22 +0200, Ilmar Wilbers wrote:
> _______________________________________________
> Instant-dev mailing list
> [email-masked]
> http://fenics.org/mailman/listinfo/instant-dev

---

From: Ilmar Wilbers <[email-masked]>
Date: Mon, 20 Apr 2009 16:53:12 +0200

Its just that if I want to compile in a existing .c file, I get the 
following error:
RuntimeError: FIXME: setup.py doesn't use the C sources.

Why not just add .c files to sources? Otherwise the error should be that 
.c files are not supported?

ilmar

---

From: Martin Sandve Alnæs <[email-masked]>
Date: Mon, 20 Apr 2009 17:03:18 +0200

On Mon, Apr 20, 2009 at 4:53 PM, Ilmar Wilbers <[email-masked]> wrote:
> Why not just add .c files to sources?

I think that's what Kent means should be done.

Just a little note though. Although gcc will usually
dispatch C or C++ sources to the right compiler based
on their file extension or something, be aware that
a C++ compiler and a C compiler is not the same thing,
even when operating on the same source code.

One basic example is

  void foo(int a, int b);

which is not the same signature in C and C++
(arguments get the opposite ordering).
That's one of the reasons C declarations in C++ code
needs to be wrapped in 'extern "C" { /* declarations */ }'.

> Otherwise the error should be that