User forums > Using Code::Blocks
How to get a bin-file working as standalone program with GUI?
Panama:
Version : svn-r12286
OS: Linux Mint
Build my project as GUI application. Bin file is under ../my_project/bin/Release/
It works fine inside CB IDE. It is executable right from the console. It is NOT startable by double click on it.
Any hints?
Commaster:
Try opening a terminal first, navigate to ../my_project/bin/Release/ and run you app as ./appname
Maybe it starts and finishes really quick or it complains about something...
Suryavarman:
CB call your application with a working directory, a library path etc.
If you want to run your application without any parameters, in the application folder you have to copy past the dependencies and not the system dependencies. If you want to have an application without .so, you have to link your project with the static libraries. The code will be put directly in your application.
oBFusCATed:
Static linking or lib copying is not required.
To replicate what C::B does one must specify the correct value for the LD_LIBRARY_PATH environment variable.
Or change the linking to use @ORIGIN rpaths.
stahta01:
--- Quote from: oBFusCATed on January 07, 2021, 01:34:11 pm ---Or change the linking to use @ORIGIN rpaths.
--- End quote ---
For those like me who never heard of "@ORIGIN".
https://enchildfone.wordpress.com/2010/03/23/a-description-of-rpath-origin-ld_library_path-and-portable-linux-binaries/
Tim S.
Navigation
[0] Message Index
[#] Next page
Go to full version