Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
can not use -E to extend macro (Read 506 times)
henryHe
Newbies
*
Offline



Posts: 3
can not use -E to extend macro
Dec 8th, 2018 at 9:15am
 
Hi everyone,
    I am trying to use -E flag to extend all macros in the cpp source file by adding "Extra cpp flags". My settings are shown below. However, the ide continues to throw "No such file" error, but the file is in the project directory and can be compiled successfully. I also tried to set /P parameter in visual studio's project properties and it did not work. Can anyone help me with this problem?
Back to top
 

res.png (5 KB | )
res.png
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10310
United Kingdom
Re: can not use -E to extend macro
Reply #1 - Dec 8th, 2018 at 8:00pm
 
What do you expect the -E flags to do?
Back to top
 
WWW  
IP Logged
 
henryHe
Newbies
*
Offline



Posts: 3
Re: can not use -E to extend macro
Reply #2 - Dec 9th, 2018 at 7:18am
 
Thanks for replying. I am trying to use the -E flag to expand C/C++ #define macros.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10310
United Kingdom
Re: can not use -E to extend macro
Reply #3 - Dec 9th, 2018 at 12:41pm
 
You can use the flags as you have done or you can override any build command using a local project board.txt file.

You need to understand what you are trying to achieve with the -E request. In fact the deep search compiler uses -E to find all libraries.

I can't see why using the same defs.h file would make sense for every file that is compiled and also if the output of the compiler is changed by the -E so that an object file is no longer outputted.

I suggest you switch on "vMicro>Compiler>Show build properties" and also "Verbose" so that you can see how the build works and what variables can be overridden in a board.txt. You will also see the way unique names are created during the build process using the current file or folder name {variable}

I hope this helps, it is a GCC question and little outside of the support this forum provides.


ps: The "Deep Search" gcc -E results are cached below the temp build folder that you will discover using the above suggestions.
Back to top
« Last Edit: Dec 9th, 2018 at 12:42pm by Visual Micro »  
WWW  
IP Logged
 
henryHe
Newbies
*
Offline



Posts: 3
Re: can not use -E to extend macro
Reply #4 - Dec 9th, 2018 at 2:19pm
 
Thank you very much!  I will try the suggestion and learn more about the compiling process. Thanks again!
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print