Advertisement
eagleoneraptor

.a/.o GResource problem

May 28th, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.52 KB | None | 0 0
  1. # CFLAGS and other irrelevant details were omitted
  2.  
  3. # Preparations
  4. gcc -c -o main.o main.c
  5. glib-compile-resources --target=foo-resources.c --generate-source --c-name foo foo.gresource.xml
  6. gcc -c -o foo-resources.o foo-resources.c
  7.  
  8. # Works (can query the resources in the executable with "gresource" CLI tool and can access those in myprogram's code)
  9. gcc -o myprogram main.o foo-resources.o
  10.  
  11. # Doesn't work (cannot see the resources in the executable)
  12. ar rcs libfoo.a foo-resources.o
  13. gcc -o myprogram main.o libfoo.a
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement