delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/07/21/09:25:12

Date: Thu, 21 Jul 94 08:48:25 -0400
From: dj AT ctron DOT com (DJ Delorie)
To: faratinp AT cs DOT man DOT ac DOT uk
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: including files

> I've managed to succesfully compile a .S file. But when I include this
> file within another .C source file I get parser error (usually just at
> the beginning of the .S file) saying that the .S file included has an
> error in it. Can anybody help me please?

You can't include a file of one language in the source for another.
What would you expect if you #included a fortran source file into a C
program?  If you want to write in assembler, you have two choices:

1. Write the whole file in assembler, assemble it, and link it with
the other objecs.

2. Use inline assembler (see the gcc manual).


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019