LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Creating portable exe using automake and autoconf (http://www.linuxquestions.org/questions/programming-9/creating-portable-exe-using-automake-and-autoconf-917578/)

chocopie1986 12-07-2011 11:32 AM

Creating portable exe using automake and autoconf
 
Hello,

I have used automake and autoconf in my program. Now I am facing a problem that my exe can be opened in a vim editor and also that when I copy my exe to some other location it does not run as there comes a relink_path in my exe which points to that location where I had compiled my code. Thus, unless I create the same heirarchy of folders, my application does not run. Please help....

Thanks.

Snark1994 12-08-2011 11:45 AM

Are you running windows or linux? .exe files are only in windows, but autoconf and automake tend to be used only in *nix (as far as I'm aware). If you can open your .exe (?) file in vim (and it's not just a bunch of random symbols) then it sounds like you haven't managed to compile it properly...

chocopie1986 12-11-2011 12:59 AM

Am using linux(red hat)

John VV 12-11-2011 02:25 AM

red hat what ? RHEL5 or RHEL6
and seeing as it is red hat you are paying $299USD per year for support
a support contract IS REQUIRED - RHEL is not free
you might want to start with searching the RHN knowledge base
( your RHN username and pass you set up with the paid license WILL be needed )

https://access.redhat.com/knowledge/search

also post WHAT this unnamed program is and HOW you built it
the full commands you used

some basics might be in order
http://www.howtoforge.com/
centOS is a free rebuild of RHEL
http://www.howtoforge.com/howtos/linux/centos
------
http://tldp.org/LDP/Bash-Beginners-G...tml/index.html


Quote:

Now I am facing a problem that my exe can be opened in a vim editor
i am assuming you are using the HEX code editor that is in vi

there is almost NEVER anything that can be manually edited in HEX ( sometimes there are a few hacks - like the unlocking of windows dll's )


Quote:

and also that when I copy my exe to some other location it does not run
WHAT location
from where to where????
is it on the same computer? or someplace in a lan ?

Quote:

as there comes a relink_path in my exe which points to that location where I had compiled my code.
the name of this program AND the full commands you use to build it would help in that
as it is we can only guess that you HARD coded in a location


also a Linux executable binary file is not an "exe" .Linux dose NOT use file extensions ( they only help in seeing what it is) ,but the file properties

Reuti 12-12-2011 05:42 AM

I assume you mean by relink_path the rpath and runpath setting in the created ELF binary. In principle you can change it by editing it in a hex editor. But more convenient and safe is using the command chrpath. Or to set LD_LIBRARY_PATH before executing the application. There is an order, how the different entries will be used.


All times are GMT -5. The time now is 04:50 AM.