-
March 22nd, 2011, 09:46 AM
#1
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
-
March 22nd, 2011, 09:54 AM
#2
Re: Setting dependencies to compile generated .c files
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.
-
March 22nd, 2011, 09:58 AM
#3
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.
-
March 22nd, 2011, 01:12 PM
#4
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.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|