joeGrammar
Programmer
If any of you find yourself creating a DLL in which you are going to create several console applications in which you wish to define a class, but don't wish to declare it several times, you may wish to do the following
1. declare the class within the dll
(this will save you from repeating code in each application)
2. Conditionally compile it so that it is ignored by the dll
( create a preprocessor variable which will disable the section of code, but here's the catch, you can't define the variable in the code, you'll have to put it in under preprocessor definitions in your project/settings/'C/C++' tab)
3. Include the file in your console application and define each member function as you would normally.
(You're able to do this because the preprocessor variable is not in the code, so this time, your code will not be ignored)
This will save you time and energy
1. declare the class within the dll
(this will save you from repeating code in each application)
2. Conditionally compile it so that it is ignored by the dll
( create a preprocessor variable which will disable the section of code, but here's the catch, you can't define the variable in the code, you'll have to put it in under preprocessor definitions in your project/settings/'C/C++' tab)
3. Include the file in your console application and define each member function as you would normally.
(You're able to do this because the preprocessor variable is not in the code, so this time, your code will not be ignored)
This will save you time and energy