[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] linux/win forskelle



On Sat, 2 Sep 2000, Egon Andersen, Talura wrote:

> Sune Fischer wrote:
> > 
> > Hej folkens
> > 
> > Jeg har skevet en (stor) stump kode som jeg efter en del debugging har fået til at køre rigtigt
> > godt i windoze (Visual har en bedre debugger end gdb), men nu virker det ikke i Linux (hvor det
> > skal bruges :-(.
> 
> På hvilket tidspunkt optræder problemerne? Compile-time eller Run-time
> og hvad er fejlbeskrivelsen?
> 
> Udfra din beskrivelse tyder det på, at du har debugget en hel del for at
> få programmet til at køre på windoze. At det kan køre er jo langt fra
> ensbetydende med at der er fejlfrit! Og det er måske der problemerne er!
> Fx. har nogle windoze compilere det med at initialisere alle variable
> til et eller andet (vistnok 0). 

Så vidt jeg husker er det en del af C standarden. Alle globale variable
skal initialiseres til 0.

Som jeg har forstået det, er det faktisk typisk linkeren der gør
dette. Det giver god mening, for de allokeres jo "statisk" og tager den
samme plads op i hele programmets levetid. Derfor skal der jo stå et eller
andet til at starte med, så hvorfor ikke 0.

Lokale variable er selvklart noget andet.

Resten af Egons mail kan jeg helt tilslutte mig: At dit program virker,
betyder ikke det er korrekt. En af fordelene ved at portere programmer er
ofte at man ser fejl i programmet forskellige steder på de forskellige
platforme.

Hvad er det egentlig der går galt?

Mads

-- 
Mads Bondo Dydensborg.                               sslug@sslug
Smoking kills. If you're killed, you've lost a very important part of your
life.  
            - Brooke Shields, during an interview to become spokesperson for a
                                               federal anti-smoking campaign.



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 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] *