Compiler directives seem not working well in uses clauses.

Beta Testing discussion on mikroPascal PRO for PIC.
Post Reply
Author
Message
Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Compiler directives seem not working well in uses clauses.

#1 Post by Dany » 22 Apr 2011 19:29

Compiler directives seem not working well in uses clauses, this is already a very "old" issue, and mentioned before -- as a sideeffect of something else -- but I could not find back where:

Code: Select all

uses
{$IFDEF SDMMC_Yo2lio}
     SDMMC_SPI1                  
{$ELSE}
     __Lib_Mmc   // original mE lib
{$ENDIF}
     , BitUtils;
In above uses clause only one of two units are used: either "SDMMC_SPI1" or " __Lib_Mmc". If however "SDMMC_Yo2lio" is not defined then still the file "SDMMC_SPI1" is compiled (the source file is available), and if the source file (or the .mcl) is not found then an error 'file "SDMMC_SPI1" not found' is given.

Please make it so that a unit in the "not defined" part of a uses clause has no effect at all, it should be ignored completely: it should not be compiled or searched for.

I think all text in a "non defined" part of an "$IFDEF" clause should always be treated as comments.

p.s. - In the case above the unit "SDMMC_SPI1" was also not in the project manager's source files.
- I have "rebuild all sources" always on.

Thanks in advance!
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

User avatar
srdjan
mikroElektronika team
Posts: 1552
Joined: 28 Dec 2005 12:47
Location: Serbia

Re: Compiler directives seem not working well in uses clause

#2 Post by srdjan » 06 May 2011 16:17

Hi,
Could not reproduce it.
Sample project to my email would be nice :)

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: Compiler directives seem not working well in uses clause

#3 Post by Dany » 06 May 2011 20:20

srdjan wrote:Hi,
Could not reproduce it.
Sample project to my email would be nice :)
I will do so asap. :D
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: Compiler directives seem not working well in uses clause

#4 Post by Dany » 07 May 2011 16:20

Dany wrote:
srdjan wrote:Hi,
Could not reproduce it.
Sample project to my email would be nice :)
I will do so asap. :D
Sent. :D
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

User avatar
srdjan
mikroElektronika team
Posts: 1552
Joined: 28 Dec 2005 12:47
Location: Serbia

Re: Compiler directives seem not working well in uses clause

#5 Post by srdjan » 09 May 2011 11:50

Hi,
Dany wrote:
Dany wrote:
srdjan wrote:Hi,
Could not reproduce it.
Sample project to my email would be nice :)
I will do so asap. :D
Sent. :D
Got it.
Found and fixed the error.
Thanks.

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: Compiler directives seem not working well in uses clause

#6 Post by Dany » 09 May 2011 16:14

srdjan wrote:Hi,
Got it. Found and fixed the error.
Thanks.
Aha! Thanks! :D :D
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

Post Reply

Return to “mikroPascal PRO for PIC Beta Testing”