On GCC Linux, is there a way I can add a file resource to be embedded statically into the C program, and then how would I expand that out to /tmp from main()?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use objcopy to embed the resource, and then normal file operations to create the file in /tmp.
If you compile this program:
with this makefile:
I believe you will get what you want.