tags:

views:

71

answers:

2

I am trying to find a way to build a C/C++ project to only include certain files depending on an input i.e, if its parameter a include files 1-5. parameter b include files 6-10, etc etc. Basically a script or something to build a project based off of an input for visual studio. Only ideas I have came up with is using preprocessor commands which dont seem to work, using namespace command but I am unsure how to even use it, or writing a script in some fashion but I dont know how I would go about that either.

The reason is because I cannot edit some of the internal files of the application and they share some of the same function names. Any help would be greatly appreciated!

+2  A: 
Magnus Skog
A: 

You might also be able to play some games to wrap the files with the same function names, i.e:

In wrapper.c:

   #define funca file1_funca
   #include "file1.c"
   #undef funca

It's a little dirty, but it could work.

Chris Arguin