LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-07-2011, 10:32 AM   #1
chocopie1986
LQ Newbie
 
Registered: Sep 2011
Posts: 8

Rep: Reputation: Disabled
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.
 
Old 12-08-2011, 10:45 AM   #2
Snark1994
Senior Member
 
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
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...
 
Old 12-10-2011, 11:59 PM   #3
chocopie1986
LQ Newbie
 
Registered: Sep 2011
Posts: 8

Original Poster
Rep: Reputation: Disabled
Am using linux(red hat)
 
Old 12-11-2011, 01:25 AM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
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
 
Old 12-12-2011, 04:42 AM   #5
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
autoconf and automake usage problems Synesthesia *BSD 1 05-01-2006 08:19 AM
M4, Automake, Autoconf, Binaries? lectraplayer SUSE / openSUSE 2 02-06-2006 02:30 AM
A problem about autoconf and automake icoming Programming 1 06-02-2005 02:52 AM
automake and autoconf troubles... liljim Linux - Software 5 07-28-2004 09:18 PM
Autoconf and Automake are broken... Nigh Unstoppabl Mandriva 0 07-18-2004 10:49 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration