IonicWind Software

Aurora Compiler => General Discussion => Topic started by: Parker on November 09, 2005, 08:53:52 PM

Title: My thoughts on compiler includes (.inc / .incc from before)
Post by: Parker on November 09, 2005, 08:53:52 PM
It's great that you don't have to include a whole bunch of headers in your source file, but problems come up when the default files include declarations that exist in other includes. For an example, I was trying to use the control pak with ImageListApi.inc and I got "duplicate definition" messages. I understand that the linker does its choosing at the end so even if you have 30 paks installed you won't get a 10MB program, but personally I think it would be better to keep the default include files to a minimum, even the GUI library should be a #include "gui.inc" one.

If it ends up that the 'bin' directory is the default for new libraries, maybe an exclude command could be added so you could specify which includes not to include on compile time, resolving any problems. It could take the form
#exclude "somefile.inc" // I don't want the somefile.inc file included
or
#exclude all // I don't want any default inludes
I suppose if it was parsed when the subroutine definitions are it wouldn't be a big problem, but it's all up to Paul really. This is just my opinion. Anyone else is welcome to share their views on the situation so we can see what everyone else thinks.
Title: Re: My thoughts on compiler includes (.inc / .incc from before)
Post by: Ionic Wind Support Team on November 09, 2005, 10:32:35 PM
There are no command paks in Aurora, that's a different language.

The libraries included with Aurora will be a minimal set of functions needed for operation, much like the C standard library.  Anything else will be up to the programmer to include any necessary .inc files.

The Aurora standard library is separated into different modules.

fileio
strings
console
common
math
gui

There are no Windows constants defined in the .inc files located in the binary directory, doing so would not be cross platform compatible.  In fact if you look in those .inc files you'll only see external function definitions and a few constants of my own definition.

The GUI libraries are being designed so that similar functions are used on both OS's. 
Title: Re: My thoughts on compiler includes (.inc / .incc from before)
Post by: Parker on November 10, 2005, 08:20:44 AM
Thanks for clearing that up. It sounds a lot better now.
Title: Re: My thoughts on compiler includes (.inc / .incc from before)
Post by: Bruce Peaslee on December 13, 2005, 02:33:04 PM
Quote from: Parker on November 10, 2005, 08:20:44 AM
Thanks for clearing that up. It sounds a lot better now.
Well, I just got confusedÂÃ,  ;)

This is my first effort:

Global sub main()
{
writeln (str$(AWS_CAPTION));
While getkey()="";
Return 0;
}


In other languages the constant AWS_CAPTION has to be explicitly defined in the code or in an include. This doesn't appear to be the case here. Where are these definitions?
Title: Re: My thoughts on compiler includes (.inc / .incc from before)
Post by: Ionic Wind Support Team on December 13, 2005, 02:42:15 PM
Its in "gui.inc"

They are named as not to interfere with constants used by either OS.  On Window the constant AWS_CAPTION will be a one to one correlation to WS_CAPTION.  On Linux it will be a one to one correlation with the constant used there.

Your code won't change, only mine.

Paul.

Title: Re: My thoughts on compiler includes (.inc / .incc from before)
Post by: Bruce Peaslee on December 13, 2005, 02:50:32 PM
Thanks, Paul.

You know I looked at those files and had thought I opened them all.ÂÃ,  :P