- Jul 6, 2001
- 2,740
- 0
- 0
I have a bunch of C++ Source(.cpp) and Header files(.h) in a directory.
I am building an tool using VB.
A user will select any C++ Source file, we'll call it "SeedFile"
i have to find all the source and header files required by the SeedFile inorder to compile that "seedfile".
How would you do it?
I was thinking..
1. Read in SeedFile search for the any string that has #include
2. parse out the #include to get the xxx.h
3. using my list of xxx.h file, find all the corresponding xxx.cpp files, since they typically have the same name.
4. Read in each .cpp file.
5. repeat.
doesn't sound very efficient. any suggestions, problems???
I am building an tool using VB.
A user will select any C++ Source file, we'll call it "SeedFile"
i have to find all the source and header files required by the SeedFile inorder to compile that "seedfile".
How would you do it?
I was thinking..
1. Read in SeedFile search for the any string that has #include
2. parse out the #include to get the xxx.h
3. using my list of xxx.h file, find all the corresponding xxx.cpp files, since they typically have the same name.
4. Read in each .cpp file.
5. repeat.
doesn't sound very efficient. any suggestions, problems???
