Paul,
I extensively use conditional compile statements in my code and I am having many issues with firefly in this respect. One issue I just discovered is that you build your own declares file in an attempt to forward declare variables and structures. The trouble I am encountering is involved with conditional includes that are buried within other includes. It seems the algo you use to determine the types and globals does not scan into conditional include files. There are also issues with conditional statements inside of type structures, for instance:
TYPE t_TEST
a as long
#IF %VERSION < 6
b = long
#ELSE
b = single
#ENDIF
END TYPE
The conditional is left out of your copy over to your _DECLARES.INC generated file. Is there a way that I can bypass this copy that you do? I applaude your efforts in an attempt to forward declare for the user but it would be great for more advanced users if there was an area where you dont try to second guess what their trying to do and just compile there code as is. Can I do this somehow?
Cheers,
Michael
Hi Michael,
I understand the problem and it can be frustrating for sure. I think that you can bypass FireFly grabbing your data by #Include'ing it in the project rather than adding the Module through 'Project', 'Add Module'.
For example, try adding the #Include at the top of your main Form.
#INCLUDE "myroutines.inc"
The next FireFly will have a much better algorithm (hopefully), :)
Thanks for suggestion Paul but that did not work. I tried that first before I posted. Seems the issue that raises is that you do copy some strucs over and you algo is actually forward declaring code that should not be declared yet. For instance, I have a structure that references a structure that is added during a compile based on conditional statement and you pull the referenced structure but not the type declare. Did I just say that???? :) sounds pretty convoluted but in short, the conditionals are not working. It is a huge library that I have been working on for a long time (DirectX includes) and I really dont want to have to restrucuture all that code. Any other ideas?
Cheers,
Michael
Hi Michael,
Any chance that you could email me the problem include file? I could then trace through my code and make the necessary fixes in order to make it work.