This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to use environment variables within armcc -I option (Windows)

I'd like to have a Windows environment variable like MYINCDIR=c:\myincdir that specifies the root of a set of include directories and then use that variable within the -I command-line option of the compiler. I've tried these without success:

-I%MYINCDIR%\foo
-I"%MYINCDIR%\foo"
-I"%MYINCDIR%"\foo

to no avail.

Is there any way to pick up an environment variable into the -I option?

Thanks,
Andrew

Parents
  • I'm trying to use this from uVision 4.10. In the C/C++ tab of the "Target Options" dialog I modify the "Include Paths" entry and can see that the "Compiler control string" has the needed -I options.

    I was hoping that the shell spawned by uVision would expand the variables for me. I'll do some experiments on the command line to see what works.

    I'll probably end up using a makefile so I don't have to battle the IDE...

    Thanks,
    Andrew

Reply
  • I'm trying to use this from uVision 4.10. In the C/C++ tab of the "Target Options" dialog I modify the "Include Paths" entry and can see that the "Compiler control string" has the needed -I options.

    I was hoping that the shell spawned by uVision would expand the variables for me. I'll do some experiments on the command line to see what works.

    I'll probably end up using a makefile so I don't have to battle the IDE...

    Thanks,
    Andrew

Children