c++cvisual-studio

Pass parameters when compiling a dll in c


It is possible to send parameters when compiling a project in VS?

I have a .dll and it has to be compiled for more countries. The country id it is needed the code, that's why I need separated builds for every country. So, I was thinking if there is a way to send the country id as a parameter at compilation, no to modify the code every time I need to do a build for a certain country?


Solution

  • I will briefly tackle some descriptions of the pros and cons of each approach mentioned above, although I would tend to use the locale file approach unless there were a very strong case, or requirement, for obfuscation via separate compiled dlls.