Tuesday, 18 September 2012

Re: [gccsdk] GCC file format not recognized

On 18/09/2012 08:21, Antoni Sawicki wrote:
> I'm new to the list and RiscOS in general. I have a quick question. I
Welcome.
> *gcc hello/c
> hello/c: file not recognized: file format not recognized
> collect2: ld returned 1 exit status
Have a look at the Examples directory that came with !GCC, for how to
organise your files, and also !GCC.!Help, particularly section 1.2.

gcc uses Unix filename semantics - these are translated behind the
scenes. Also, for historical reasons (old limits on leafname length and
number of files per directory), gcc uses a non-obvious source file
organisation. Name your file c.hello (RISC OS semantics), i.e. a file
'hello' in directory 'c'. Then use 'gcc hello.c' to compile it - from
the directory with 'c' in it. Similarly, header files will go in a
directory 'h'. When including headers though, use #include "abc.h" as
you would normally.



_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

No comments:

Post a Comment