Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic can not use -E to extend macro (Read 1790 times)
henryHe
Newbies
*
Offline


Posts: 3
Joined: Dec 8th, 2018
can not use -E to extend macro
Dec 8th, 2018 at 9:15am
Print Post  
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?
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


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


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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: can not use -E to extend macro
Reply #3 - Dec 9th, 2018 at 12:41pm
Print Post  
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.
« Last Edit: Dec 9th, 2018 at 12:42pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
henryHe
Newbies
*
Offline


Posts: 3
Joined: Dec 8th, 2018
Re: can not use -E to extend macro
Reply #4 - Dec 9th, 2018 at 2:19pm
Print Post  
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 TopicPrint