Quasar Jarosz Posted November 8, 2006 Share Posted November 8, 2006 Has anyone encountered a situation where #include-once seems to be ignored? I have a script that #include's File A and File B, and File A include's File B (becuase of course File A depends on File .. however, once this happens a few times (ie, Files A, B, C, and D all #include File Z) i begin to get "duplicate function def" errors. Has anyone seen anything like this? Or is it a known issue at any point? I have been solving it by just removing the #include from the main script if one of it's dependant files already includes it.. but, i assumed #include-once would allow me to try to include it as often as i want? I'll try to build a simple example to illustrate this if anyone would like.. Thanks! Link to comment Share on other sites More sharing options...
PaulIA Posted November 8, 2006 Share Posted November 8, 2006 Can you post a small example to show the problem? Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
Quasar Jarosz Posted November 8, 2006 Author Share Posted November 8, 2006 Can you post a small example to show the problem?Alright, i figured out what the problem was when i tried to recreate it.What i had was this..In one file:#include <Misc\Beep.au3>And in another:#include "..\..\..\..\lib\Misc\Beep.au3"The lib path is set in the registry as one of the paths to search for included files.So, it's the same file, but it's been refered to two different ways, and that seems to be the source fo the problems.I don't know if this is the intended behavior or not, but it doesn't look like a major issue. Link to comment Share on other sites More sharing options...
Valik Posted November 8, 2006 Share Posted November 8, 2006 The fully expanded path is used to enforce #include-once. It doesn't matter how you specify the file, if it's really the same file, it will only be included once. So you still need to provide a way to reproduce the problem because the way you describe does not reproduce it. Link to comment Share on other sites More sharing options...
WhiteTiger Posted November 8, 2006 Share Posted November 8, 2006 he is saying that its working now , so i think he's right Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now