Custom Build Actions?

Please consider a beginner/intermediate question for which searching Google has provided me no results. I am attempting to write a program that compiles a script program into an assembly language module that I will then link to the main C++ program using Visual Studio. How is it possible for a file (i.e. with the extension .script) that is included in the VS project to be interpreted then compiled previous to the compilation of the main C++ program and then linked to the build of that C++ program. What general options must be covered in any Visual Studio build action settings and what must I take into consideration for the outside program that interprets and compiles the .script file to be able to interact with the build process. Thanks.
I think you right-click on the element in the Project Tree, select Properties->Custom Build Step.

If that fails, add the script that builds it as a pre-build step for the project.
Not possible. A "script" implies that the language it is written in is 'interpreted' meaning that does not actually compile to anything. So if somehow any part of the rest were magically possible it still wouldn't work.

We can probably help you replace the script though. What is it supposed to do?

EDIT: Also if we look at this another way. Would calling the script from your application be an option?
Last edited on
I'm trying to write a program that reads a file and then produces code for a simple parser. The file would be included in the project appearing in the solution explorer. After that I would need to compile and link it to the main C++ program. In other words, I'm attempting to write my own interpretation of what Lex and Yacc do in a more simplified way that I can understand and attempt a very simple compiler. What I'm trying to do is just to gain an insight while reading Compilers by Aho et al. Thanks if you have any suggestions.
Ah, my bad. I misunderstood the problem. This is happening to me a lot recently.
Topic archived. No new replies allowed.