I was running into a small issue that even though my application successfully compiled in QT Creator it was not creating a clickable executable. This was happening even though “allow executing file as program” was enabled. When I clicked it would come up with the error. “There is no application installed for ‘shared library’ files”. I did some googling and found that this was a problem with newer ubuntu distros.
Solved it by putting the following into the qps file :
And now it generates the clickable executable successfully and I can set it up in crontab to start automatically.
Just noting it here incase anyone else has the same problem. Perhaps in future OF versions it could be the default to have that linker flag enabled!
Thanks! I’ve noticed this before but never found a way to solve it. I’ll look into it and add it to the default flags if it’s not a problem with something else
btw, if you could open a github issue explaining this that would be really helpful
thanks for the tip
@arturo if (according to this post) it’s a security feature, is it still relevant to have this flag set as default, knowing it could be set per project ?
and so maybe this information could be emphasized somewhere.
or, if you think it’s an unexpected behavior, i can open a issue on github ?
I know it’s a security features but it’s just related to avoiding buffer overflows or somthing similar which is probably not super important for OF and being able to run applications by double clicking on them is pretty useful.
My main concern is that libraries are compiled with this flag so it might be that more complex applications that call into c++ libraries like poco or opencv might fail to link when this is enabled.
In any case if you can open a github issue that would be useful so i remember to look into it
@Caroline_Record what is qps file and how to solve this problem
A qps file is a project settings file for the IDE QT Creator! You can find instructions on how to get set up with qt creator here.
Once you generate your QT project there will be a myApp.qps (or whatever your app is called). You can then add the linker flag as I described in my original post.
Thank you Caroline for the tip
I’ve just had the same issue and solved by appending this line in project config.make
PROJECT_LDFLAGS += -no-pie