LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-29-2015, 07:22 PM   #1
jdhthegr8
LQ Newbie
 
Registered: Nov 2015
Posts: 5

Rep: Reputation: Disabled
Newbie trying to recompile after editing source code- no change to bin


Hello all, I am a student in a relatively introductory UNIX/Linux Single Systems class running CentOS 6.7 in VMWare. I am trying to edit the source code of a simple Rock, Paper, Scissors game to correct a typo in a string.

The file I am editing is in ~/src/papercut-0.1.1/src/ and the config file is in the directory above that. I have already compiled the program (with typo) in ~/bin/ and edited ~/src/papercut-0.1.1/src/main.c, which is what I want to change in the recompile. However, after running the config file followed by make, sudo make install, and then going to home and running ./bin/papercut I still see the typo (Youe lose). What could I be missing here? Help for this newbie would be greatly appreciated, I'm having a lot of fun with all the things I've been learning so far!

Link to show what I'm looking at :
http://imgur.com/a/qAqcm
 
Old 11-30-2015, 11:48 AM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
sudo make install ?

What you think where it installs your binary?
 
Old 11-30-2015, 12:18 PM   #3
jdhthegr8
LQ Newbie
 
Registered: Nov 2015
Posts: 5

Original Poster
Rep: Reputation: Disabled
I got it! sudo make install wasn't doing the job for me but logging into root with su and then running make install worked
 
Old 11-30-2015, 12:48 PM   #4
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
What I really wanted to say sudo make install will unlikely install it into ~/bin/, unless you set it as install directory during configure. By default sudo make install will install it in /usr/local/bin/, where it can be executed by all users.
 
Old 11-30-2015, 04:38 PM   #5
jdhthegr8
LQ Newbie
 
Registered: Nov 2015
Posts: 5

Original Poster
Rep: Reputation: Disabled
Good point. Installing it into usr/local/bin worked for my purposes, but for future reference would I set the directory by editing the config file in a text editor?
 
Old 11-30-2015, 04:56 PM   #6
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
There is more than one way to skin this cat, do a google for "configure prefix destdir" to learn more.
 
Old 11-30-2015, 05:12 PM   #7
jdhthegr8
LQ Newbie
 
Registered: Nov 2015
Posts: 5

Original Poster
Rep: Reputation: Disabled
Got it, thanks for the advice!
 
  


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
Get Ubuntu source code, and recompile it san_man Ubuntu 5 09-26-2014 07:37 PM
Editing Maelstrom source code dave247 Linux - Software 12 10-26-2010 09:56 AM
how to recompile any source code of a software to install it?? sushmita Linux - Newbie 2 03-23-2010 03:02 PM
Recompile kernel after editing some code flobadob Ubuntu 2 12-18-2009 01:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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