Arm Community
Site
Search
User
Site
Search
User
Support forums
Arm Development Studio forum
Precompiled Header
Jump...
Cancel
Locked
Locked
Replies
5 replies
Subscribers
118 subscribers
Views
4164 views
Users
0 members are here
Options
Share
More actions
Cancel
Related
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
Precompiled Header
andredz
over 12 years ago
Note: This was originally posted on 8th June 2010 at
http://forums.arm.com
Problem:
I've been trying to utilize precompiled header option, but with no luck. Even after installing patch 771 for RVCT 4.0.
Here what I'm trying to do.
Assume I have 3 source files and 1 header:
0. /myproject/inc/aaa.h
-----------------------------------
// a bunch of definitions
1. /myproject/src/AAA.c (created this file to include only the header file and compiled with --create_pch=AAA.pch)
------------------------------
#include "aaa.h" // this is a very large file
//eof
2. /myproject/src/File1.c (compiled with --use_pch=AAA.pch)
---------------------------------
#include "aaa.h"
// some codes
3. /myproject/differentsrc/File2.c (compiled with --use_pch==AAA.pch)
---------------------------------
#include "aaa.h"
// some codes
So the problem:
File1.c is using AAA.pch and compiled in a snap without any problem.
But File2.c can't use AAA.pch and does a regular compile (long compile). It gives warning:
"no source": Warning: #629-D: the command line options do not match those used when precompiled header file "AAA.pch" was created
Questions:
- Is this a limitation for the precompiled header option? Files must be in the same directory.
- Are there any other options on how to solve this?
Thank you,
-a
Parents
andredz
over 12 years ago
Note: This was originally posted on 23rd June 2010 at
http://forums.arm.com
Thanks algrant,
The switch (--sys_include) does the job. Now files can use the pch file.
Though, I have to make sure the order of #include match with the one used for creating the pch file.
For my example above,
#include "aaa.h" must be declared first on the top of c files.
Cancel
Vote up
0
Vote down
Cancel
Reply
andredz
over 12 years ago
Note: This was originally posted on 23rd June 2010 at
http://forums.arm.com
Thanks algrant,
The switch (--sys_include) does the job. Now files can use the pch file.
Though, I have to make sure the order of #include match with the one used for creating the pch file.
For my example above,
#include "aaa.h" must be declared first on the top of c files.
Cancel
Vote up
0
Vote down
Cancel
Children
No data