Setting dependencies to compile generated .c files
Hi,
Wow - long time since using visual studio and my brain is incredibly rusty! :)
So... I have a VC++ project - it's all C++, except for a couple of .c files generated by flex and bison (I got the flexbison.rules file from Microsoft: http://msdn.microsoft.com/en-us/libr...ustombr_topic3).
How do I tell Visual Studio (2008), that the .c files are part of the project and must be compiled so that the linker can link them to produce the .exe? Of course I could add the to the source file section, but that doesn't seem quite right somehow, as they are generated anew each time the .y and .l files (the flex and bison sources) are modified.
Thanks in advance
Mark
Re: Setting dependencies to compile generated .c files
Quote:
Of course I could add the to the source file section, but that doesn't seem quite right somehow, as they are generated anew each time the .y and .l files (the flex and bison sources) are modified.
Don't understand what these 2 have to do together. The studio compiles the c-files in your project, so, or you add them like you do with all your files that you want to compile, or you include them in another file. Big drawback of that is that c-files aren't supposed to be included in other files.
Re: Setting dependencies to compile generated .c files
OK, but they are not really sources - they are generated files that I never want to open in the editor. Also "Build/Clean Solution" should delete them.
Re: Setting dependencies to compile generated .c files
Adding files to a project doesn't mean that you have to open (edit) them, it just mean that they shall be built and linked with your other files.