← Back to team overview

instant team mailing list archive

Re: csrcs

 

On Mon, Apr 20, 2009 at 4:53 PM, Ilmar Wilbers <ilmarw@xxxxxxxxx> wrote:
> 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?

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
> .c files are not supported?
>
> ilmar
>
> Kent Andre wrote:
>> We don't need csrcs I think. Having cppsrcs is enough.
>>
>> Kent
>>
>> On ma., 2009-04-20 at 15:22 +0200, Ilmar Wilbers wrote:
>>
>>> 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
>>> _______________________________________________
>>> Instant-dev mailing list
>>> Instant-dev@xxxxxxxxxx
>>> http://fenics.org/mailman/listinfo/instant-dev
>>>
>>
>>
> _______________________________________________
> Instant-dev mailing list
> Instant-dev@xxxxxxxxxx
> http://fenics.org/mailman/listinfo/instant-dev
>


References