IonicWind Software

Aurora Compiler => General Discussion => Topic started by: Rock Ridge Farm (Larry) on August 15, 2006, 11:57:41 AM

Title: Strange error while compiling
Post by: Rock Ridge Farm (Larry) on August 15, 2006, 11:57:41 AM
I have a program that tells me there are errors when compiling but does not list any errors.
Any idea what this means?
Title: Re: Strange error while compiling
Post by: kryton9 on August 15, 2006, 12:16:51 PM
Delete the .opts files in the folder. The files must have been moved or reorganized. Happens to me all the time.
Title: Re: Strange error while compiling
Post by: Rock Ridge Farm (Larry) on August 15, 2006, 12:32:33 PM
Did that - same error - compiler says there are errors but does not list anything.
Title: Re: Strange error while compiling
Post by: Ionic Wind Support Team on August 15, 2006, 01:05:41 PM
Project or single compile? 

Check your resources too.
Title: Re: Strange error while compiling
Post by: Rock Ridge Farm (Larry) on August 15, 2006, 02:30:27 PM
Just a single compile - that is what is strange.
I am going to start commenting out code to see if I can find what it is.
Title: Re: Strange error while compiling
Post by: Rock Ridge Farm (Larry) on August 15, 2006, 02:42:21 PM
Found the offending code:
struct squadron {
   int row, col;
   int course;
   int type;
   int from;
   squadron s_next;
   squadron previous;
   int planes;
   int fuel;
   int attack;
}

squadron federation;

No idea what is wrong with this.
Title: Re: Strange error while compiling
Post by: Ionic Wind Support Team on August 15, 2006, 02:54:41 PM
The two lines

   squadron s_next;
   squadron previous;

Should be:

   squadron *s_next;
   squadron *previous;

If your attempting to make your own list.  Better to use the linked list functions for that anyway.  As for why it's just exiting instead of giving you and error message I'll find out and fix it.

Basically if you embed a structure within itself it ends up in an endless loop trying to calculate the infinate size of the structure.  Think about it for a moment.  The member s_next contains the member s_next wich contains the member s_next and so on. 

Paul.
Title: Re: Strange error while compiling
Post by: Rock Ridge Farm (Larry) on August 15, 2006, 03:34:57 PM
You are right they should have been pointers - my bad.