The MASM Forum

Projects => Easy Code IDE 32/64-bit => Topic started by: K_F on March 15, 2016, 12:51:51 AM

Title: Scope of include files ?
Post by: K_F on March 15, 2016, 12:51:51 AM
Hi Ramon..
Just curious about the scope of the projects include files. - Are the include files visible to all modules and windows ?
Asking as when I move my data variables ect.. into a 'private' include file which is in the include section of the project explorer, the assembler throws what seems visibility errors.

There's also another problem of accessing structure variables across modules
- I set a structure variable to TRUE (1).
- Pass a pointer of the structure to another modules procedure.
- This procedure accesses the structure variable (via ASSUME statement) and get a FALSE (0) result ?
This project assembles with no errors

Still playing with EC1.... converting the project to EC2 is a problem at the moment.
I think EC2 is assuming 32bit projects to be 64bit when importing, as I cannot see this info in the project properties.

Also wondering what the effect would be if I place Include statements in each module, or just the projects main include file.

Thanks for any input
Van
Title: Re: Scope of include files ?
Post by: dedndave on March 15, 2016, 09:37:37 AM
if you assemble several modules, then add them to a library....

create a common INC, then include it in all the module sources

generally...

an INC file is essentially a series of added text
if i have a source file, half-way down...

include somefile.inc

it's as though all the text in the INC file were pasted into the source at that location
Title: Re: Scope of include files ?
Post by: K_F on March 15, 2016, 06:21:20 PM
Ja. I'm busy doing this at the moment..
Just organising it into a structured way is taking more time  :icon_exclaim:

I was at a 'milestone' in this development.. only to be cut short... frustration!! ;)
Title: Re: Scope of include files ?
Post by: K_F on March 15, 2016, 11:22:07 PM
OK, resolved the scope problem... seems like EC1 and/or the assembler/linker doesn't work well with multiple custom INC files.
Dumped everything into one large INC file.

Now my GDI+ module has given up on me....... I'm going to cry in the corner  :icon_confused:
I might have to rewrite it.... waaaahhhh!!
:biggrin:
Title: Re: Scope of include files ?
Post by: dedndave on March 15, 2016, 11:30:53 PM
the masm32 package is a fine example of several working library modules
\masm32\m32lib folder   :P
Title: Re: Scope of include files ?
Post by: rsala on March 16, 2016, 04:50:08 AM
Hi K_F,

First of all, sorry for all the inconveniences.

- An include file added to "Include" section of the project explorer should be visible to all windows/modules.
- When passing the address of a structure to another module procedure, the structure should be read "as is".
- In all my tests, converting a project to EC2 has been succesful.
- If you place include statements in a module, the included file will only be visible in that module.

So, I would be very grateful if you could send me a project firing the errors you report, so that I could see the problem and fix it. :t

Regards,

Ramon
Title: Re: Scope of include files ?
Post by: K_F on March 16, 2016, 05:31:32 PM
Not to worry Ramon..

I've already rearranged the code so much that it's not recognisable at the moment  :biggrin:
It's all working now except my GDI module, which I think is my fault...

I do need to clean it up a lot, so this is an opportunity.
If it persists I'll send the problem your way ! ;)

Thanks
Van
:t


Title: Re: Scope of include files ?
Post by: rsala on March 17, 2016, 07:26:51 AM
Ok Van, thank you!
:t