View Full Version : [SOLVED] Running program after compilation
needeffexor
October 28th, 2009, 03:22 PM
I built a Gtkmm project with Anjuta IDE, and am having a little difficulty installing it in Ubuntu. I am certain that the solution is simple, but I can't seem to figure out what I am doing wrong.
This is my first project targeted for Ubuntu. It is a simple utility that won't need a .deb for distribution. After running 'make install' the program is saved in /usr/local/bin. From the console, I can cd to /usr/local and run ./program, and the program runs fine; however, I cannot get the program to run using alt+F2 or a launcher.
I have tried to make a script that runs the program, and am successful from shell.
Thanks in advance for any assistance you can offer.
dinxter
October 29th, 2009, 01:44 AM
What happens when your run from alt-f2? you could try checking the run in terminal checkbox and setting the terminal to not close after execution (profile-preferences->Title & Command if using gnome-terminal).
bribera
October 29th, 2009, 02:05 AM
It seems unlikely, but could you have removed /usr/local/bin from your $PATH?
needeffexor
October 29th, 2009, 11:18 AM
Thank you dinxter for your reply. If I keep the terminal up, the program terminates by throwing a Glib::FileError exception. Apparently, the program cannot load the glade file. I haven't figured out why yet. If I run '/usr/local/bin/program' from command-line it works but running '/usr/local/bin/program' from alt+f2 does not. I will keep trying.
Thanks again.
What happens when your run from alt-f2? you could try checking the run in terminal checkbox and setting the terminal to not close after execution (profile-preferences->Title & Command if using gnome-terminal).
Anonymousable
October 31st, 2009, 04:26 PM
It looks like the paths are messed up. You haven't got the right working directory, but your program is looking for the glade file in the working directory (probably your home folder).
This can only be fixed by cd'ing to the correct folder manually before running the program (cd /usr/local/; ./program ) or adding in a line of code that chdir's to the correct folder automatically, as far as I know.
Don't trust me all the way, wait for someone else to reply confirming what I've said first please, as I am NOT entirely sure. Shouldn't do damage trying what I said though ;)
needeffexor
November 8th, 2009, 04:19 AM
This was just a noob error on my part. I didn't anticipate the problems of relative paths to the resources in the code.
Once I used the full path to the glade file in the source code, everything works great!
Thanks everyone.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.