Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ok, so this is a hard problem to explain.
- I'm trying to create a namespace that will be accessible from 2 places.
- 1) A script (could be multiple scripts at once)
- 2) The inner workings of the actual engine
- Both of these things are all c++.
- My attempt at this problem is to create a .h file as follows
- extern.h
- #ifndef EXTERN_H
- #define EXTERN_H
- namespace MyExtern{ int testME; }
- #endif
- I then include my extern.h multiple times within the inner-workings of the engine and within my scripts.
- I'm confused on why I'm getting a multiple definition of `MyExtern::testME' error, within the inner-workings of the engine .cc files where i include this .h file.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement