-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VS2017 and multiple versions of an object. #11
Comments
The scenes in the example are header-only as they are relatively simple. You can, of course, move the implementation into a matching .cpp file and put your includes there. |
sorry, maybe I was unclear, or just don't understand. Ill try to re-phrase: Is there a way to add all my includes to a single file that all my scene files can see and will result in the obj files being compiled only once? |
Make a single header that is included by the scenes and/or use pointers and forward class declarations? Also, make sure your headers have ifdef guards or pragma once. Sounds like something similar to the classic circular include problem, except I wouldn't know the VS linker-specific aspect you are experiencing. I don't have a Windows setup to test anything. It seems like this may be more of a general C++, OF, & VS issue than ofxAppUtils-specific. |
Yes, you are right, I think it is a VS issue, I have the exact code working perfectly on OSX (thanks for your work btw). It seems it is this issue of VS overwriting obj files in compilation. It seems it is not related to this addon specifically as I have now found it with some other addons and much simpler structures. Many thanks, I will mark this as closed, sorry for the distraction. |
I am having an issue related to a problem with VS2017 and OF, the VS/OF issue can be seen here:
openframeworks/openFrameworks#6122
Maybe I am using the wrong approach for setting up my scenes. Some of my scenes use a few addons, and in some cases, they use the same addon, or an addon that has the same dependancy as another addon. To this end, it seems VS is compiling the objects twice in the same location and then overwriting the first and it is not able to link as the original is not there.
If I make this all in a single app, it seems to work, but when i split out the apps into scenes and have my includes in each scenes .h file I get these problems.
Is there a way to add all my includes to a single file and result in the scenes to have access to all of them that they need, but only have the obj files compiled once? Or do I need to add the #include "addon.h" to each scene.h file I create?
The text was updated successfully, but these errors were encountered: