{"action":"opened","issue":{"url":"https://api.github.com/repos/tschoonj/xraylib/issues/23","labels_url":"https://api.github.com/repos/tschoonj/xraylib/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/tschoonj/xraylib/issues/23/comments","events_url":"https://api.github.com/repos/tschoonj/xraylib/issues/23/events","html_url":"https://github.com/tschoonj/xraylib/issues/23","id":67627368,"number":23,"title":"About compiling with gcc ","user":{"login":"tontyoutoure","id":3072098,"avatar_url":"https://avatars.githubusercontent.com/u/3072098?v=3","gravatar_id":"","url":"https://api.github.com/users/tontyoutoure","html_url":"https://github.com/tontyoutoure","followers_url":"https://api.github.com/users/tontyoutoure/followers","following_url":"https://api.github.com/users/tontyoutoure/following{/other_user}","gists_url":"https://api.github.com/users/tontyoutoure/gists{/gist_id}","starred_url":"https://api.github.com/users/tontyoutoure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tontyoutoure/subscriptions","organizations_url":"https://api.github.com/users/tontyoutoure/orgs","repos_url":"https://api.github.com/users/tontyoutoure/repos","events_url":"https://api.github.com/users/tontyoutoure/events{/privacy}","received_events_url":"https://api.github.com/users/tontyoutoure/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-10T16:06:52Z","updated_at":"2015-04-10T16:06:52Z","closed_at":null,"body":"In wiki it is suggested to compile a C program like this\r\n```\r\ngcc `pkg-config --cflags libxrl` program.c `pkg-config --libs libxrl`\r\n```\r\nwhich makes I view this wiki or use ```history``` command literally everytime I compile my program. I think containing this sort of shell script could be helpful for those who compile their program with gcc:\r\n```bash\r\n#!/bin/bash\r\nPARAMETERS=\"\"\r\nFILES=\"\"\r\nwhile [[ $# -gt 0 ]]; do\r\n\tif [[ $1 =~ \".c\" ]]; then\r\n\t\tFILES=$(echo $FILES $1)\r\n\telif [[ $1 == -o ]]; then\r\n\t\tPARAMETERS=$(echo $PARAMETERS $1)\r\n\t\tshift\r\n\t\tPARAMETERS=$(echo $PARAMETERS $1)\r\n\telse\r\n\t\tPARAMETERS=$(echo $PARAMETERS $1)\r\n\tfi\r\n\tshift\r\ndone\r\n#gcc -L /usr/local/lib -I /usr/local/include/xraylib $FILES $PARAMETERS -lxrl\r\ngcc `pkg-config --cflags libxrl` $FILES `pkg-config --libs libxrl` $PARAMETERS\r\n```"}}