[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] Er det Linux eller Windows ?



>>...
> > På Windows bruger jeg CygWin til at compile mit program med, og for at
> > genkende at jeg er i Windows har jeg et:
> > #ifdef __CYGWIN__
> > direktiv som omslutter den Windows specifikke kode.
> > Definierer gcc en tilsvarende makro når man er på linux platformen?
> >...
> Du kan selv definere et directive du vil kompilere til Linux. Giv gcc fx
> en -D__MY_DIRECTIVE_LINUX__
>
> og i din kode:
>
> #ifdef __MY_DIRECTIVE_LINUX__
> /* linux kode*/
> #endif
> ...
Det er rigtigt, men jeg ville gerne have det således at jeg ikke behøvede
ændre på mine makefiler(eller andre filer for den sags skyld) for at compile
til de forskellige platforme. Hvis det kunne ordnes i Makefile'n ville det
selvfølgelig også være fint, men der ved jeg heller ikke hvordan man finder
ud af platformen.
Slutresultatet skulle gerne være at:
make all
compilede det hele ligemeget hvilken platform det var.

- Peter





 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:09 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *