Arm Community
Site
Search
User
Site
Search
User
Support forums
Arm Development Studio forum
__FILE__ macro
Jump...
Cancel
Locked
Locked
Replies
4 replies
Subscribers
118 subscribers
Views
3582 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
__FILE__ macro
Steven Logan
over 12 years ago
Note: This was originally posted on 8th May 2013 at
http://forums.arm.com
When using the __FILE__ macro in RVDS4, it only expands to "source/file.cpp". It won't ever expand to more than just the directory the file is in.
It seems everyone has problems shortening the path from __FILE__ rather than getting it to show more.
Is there anyway to resolve this?
Loggie
Parents
Steven Logan
over 12 years ago
Note: This was originally posted on 9th May 2013 at
http://forums.arm.com
You are right in that __FILE__ is what is given on the command line. At least for me this is the case. I would be able to achieve what I require by using a longer path as it currently stands I only require the name of the folder the source directory is in, each of these folders are respective of their separate project. i.e. project_name/source/file.cpp. However trying to adjust the supplied paths to give me what I need could potentially cause a whole load of other problems.
Currently I am trying to define a macro called FILE_NAME using -DFILE_NAME="project_name/source/file.cpp" however I get no end of errors, mostly telling me that FILE_NAME is undefined.
Cancel
Vote up
0
Vote down
Cancel
Reply
Steven Logan
over 12 years ago
Note: This was originally posted on 9th May 2013 at
http://forums.arm.com
You are right in that __FILE__ is what is given on the command line. At least for me this is the case. I would be able to achieve what I require by using a longer path as it currently stands I only require the name of the folder the source directory is in, each of these folders are respective of their separate project. i.e. project_name/source/file.cpp. However trying to adjust the supplied paths to give me what I need could potentially cause a whole load of other problems.
Currently I am trying to define a macro called FILE_NAME using -DFILE_NAME="project_name/source/file.cpp" however I get no end of errors, mostly telling me that FILE_NAME is undefined.
Cancel
Vote up
0
Vote down
Cancel
Children
No data