-
Notifications
You must be signed in to change notification settings - Fork 56
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
#define EXPORT causing macro redefinition warning #108
Comments
looks like both projects just define it with no value unless you're static-linking, in which case WJE sets it to __declspec(dllexport) maybe just wrapping our definition in include/xpl.h:
would make your build happy? it's not the tidiest change (and it leaves unsolved the case of static linking and including sqltypes.h) but i think i'd rather go with that than find-and-replace EXPORT to something else. (internally, we've got enough XPL code and macros for that to be troublesome.) |
When I get some free time I'll apply your changes and see how it likes it. |
Mostly I'm concerned about our upgrade path. For now I've just renamed the symbol to prevent the collision, but the next time we update WJElement it will come back. |
I think you misread the code
We're compiling the code directly into the project, not as an external DLL/SO so we're not defining the above. I'm getting the
I changed it to
and all is good. For a quick fix maybe something more like
And I can just add that to our project -DXPL_DONT_DEFINE_EXPORT |
You're right, I had it backwards. I'm glad you found a local fix; we'll mull over what might be the best solution. After looking through our stuff, I think we should indeed be able to change it to XPLEXPORT or something. It's interesting that you've basically told it to not bother defining EXPORT anymore, and everything still works; I'm not much of a windows guy, so I do not know what __declspec(dllexport) does (or did) for us. Maybe it's obsolete at this point? |
Have you tried something like:
|
I knew I was overthinking this. :^) |
__declspec(dllexport) : I found this snippet in our code
With 3 different uses (wjelement, ours, sqltypes.h) I'm starting to think that EXPORT is going to be a "natural" choice for anyone wanting to make that define. That said, my preferred fix at this point would be to rename it. I'm probably going to go rename ours as well shortly. |
In xpl.h EXPORT is being defined. This conflicts with a Microsoft lib
Perhaps a namespace could be added or just a rename of the symbol?
The text was updated successfully, but these errors were encountered: