Quote:Original post by BreathOfLife
unfortunately thats just in the post
the namespace was added to an existing header that worked just fine before, and I cant seem to get this namespace thingy working
EDIT < more info > so this header/cpp file are in a folder that ive added to the paths and directories panal in the options menu
then I just #include <random.h> and thats it. maybe im skipping something or leaving something out. do they still need to be manually added to the project?
If I'm understanding this correctly, you are wanting to use meo::random in multiple projects. I am inferring that you are building common utility code from all your projects.
The main problem is the headers are not providing the definitions to your functions. There are a couple of solutions... :
1) Include the definitions (random.cpp) in
one of your project's .cpp to provide its definitions in random.h. This will generate the .cpp in question symbols and random.cpp symbols and combine them together into the .obj file used by the linker. Although... I'm not sure how this fairs in the "good programming practices" category.
2) Produce a static-link library and link your project to it. This will provide random.cpp's symbols in the library. However, it requires you to build the library and rebuild it each time you change it.
Hope this helps!