Strange behaviour of !include
Hello,
I noticed that if I add a custom include dir to the compiler, and include once a file that lives both in the NSIS include and the custom include, the compiler includes it twice :eek: !
Is it a bug or a feature?
Archive: Strange behaviour of !include
Strange behaviour of !include
Hello,
I noticed that if I add a custom include dir to the compiler, and include once a file that lives both in the NSIS include and the custom include, the compiler includes it twice :eek: !
Is it a bug or a feature?
I'd say it's neither! How should it know which of the two to include? It's your fault for putting it in both directories!
-Stu
Originally posted by Afrow UKWell... I don't think it is right to consider a case like "it's the user fault, never mind". This situation happened to me, and I just found that the compiler behaviour was strange
I'd say it's neither! How should it know which of the two to include? It's your fault for putting it in both directories!
I see your point. But, consider that NSIS was purposfully designed to be as minimal as possible to cut down on on the overhead of the installation.
To get around this type of thing, you'll notice that most of the !includes included with NSIS put their includes in an !ifdef/!ifndef block. For example, if you have an include file a function 'foo', then the entire include file might be something like:
!ifndef foo
!define foo
...
[insert code here]
...
!endif
Thanks, fixed.
http://sourceforge.net/tracker/index...49&atid=373085