Stop it with the “Binary Not Found” Error!

Everything have a learning curve, that includes Eclipse, however popular it may be. I am used to command line, but I really should learn an IDE as the codes I make will be bigger and bigger. In those cases, debugging per line would be very useful.

Here is some small bump on my learning curve that turn out to be pretty common according to a quick google search, and the solutions that works for me:

1) Problem: Ctr+C Freezes: When I first began, I had a problem with Eclipse freezing every time I quit via Ctr+C or Ctr+D. It was particularly frustrating when I was trying out the codes and exercises in The C++ Programming Language by Bjarne Stroustrup (whom, by the way, is the developer behind C++), which uses Ctr+C several times. Eventually, I decided to go with a different book, namely C++ Primer.

Solution: I can input a character that is not accepted by the type, such as a letter if it is an int type variable. In cases where in the input type is a string, I output a statement saying what is the “quit word” (e.g “Type in ‘q’ to quit”), then I did an if-else statement where the if clause designates the “quit word” (e.g. if (input == ‘q’) {cout << ‘exiting’; return 1;}).

Though for the life of me, I can’t think of a reason why Eclipse haven’t fix a bug that, according to Google search, has existed for years!

2) Problem: “Binary Not Found”: Anyhow, now that one problem is dealt with, here’s a second one that I noticed several people online had problems with:”Binary Not Found” error when I try to run a program.

Solution: A quick glance online will reveal various solutions that works for some but useless for some, including:

  • Not having a compiler, having the wrong one, or system running the wrong one.
  • Change the binary parser.
  • Change the tool chain.
  • Change the link under “C/C++ Application” in “Run Configuration”
  • Save the file before build.
  • Forgot to click on build before make.

After doing/checking all of the above, the source of my pain and the move that solve it? Change the damn source file name to “src”.

Course Progress for C++ & WP

So far for C++, I have successfully churn through 1/3 of C++ Primer by¬†Stanley B. Lippman in a month (It’s a really, really thick book. If it wasn’t softcover, you can probably knock someone out with it.). It is quite the intense reading – very detail but clear in its explanation. I can see why several Amazon reviews raved about it being an excellent book but emphasizes that it is not a beginner book (Seriously, do not read this if you have never touched OOP). Despite having skipped Intro to C++, I am doing fine in class as a result. I am so glad I am such a fast reading bookworm!

WordPress/Drupal have so much more assigned reading than any of my other programming classes! I literally read through 4 chapters of the textbook (Professional WordPress: Design and Development by Brad Williams, David Damstra, Hal Stern) in a week, plus 2 web pages in WordPress documentation about Core and Loop. I thought my brain was going to fried – who knows there is so much about WordPress? Core, content, admin, include, etc, etc.

Doing some extra self-challenge added some… challenge, to the class as well. I decided to run the whole LAMP stack natively when I got my new Macbook last year. I did had MAMP in my old Macbook, which was indeed a convenient program, but I was taking Linux when I got my new Mac and I was getting more and more interested in OS. Running my own LAMP, with all the troubleshooting and exploring sounded fun.

As a result, several error message came up with my second class assignment, and here is the notes about the problems I got to solved!


1) WordPress was asking for connection information when I try to update and upload the class’s assigned Underscore theme. At first, I just manually updated WP and upload the theme. Then I got asked again after trying to install plugin too, so I decided to look up for some better solution. After some research, I learned that I need to change WordPress’s filesystem method so it stops using FTP, so I added this in the wp-config.php:

/** Change filesystem method when localhost */
if ($_SERVER[‘REMOTE_ADDR’] == ‘127.0.0.1’||’::1′) {
define(‘FS_METHOD’, ‘direct’);
}

Just define(‘FS_METHOD’, ‘direct’) also works, but I thought I would add an if statement to check if the file is in localhost, I don’t have to worry about removing the line if I need to move the page from development to production mode.

Note that ‘127.0.0.1’ is the localhost ip for IPv4 system, while ‘::1’ is for IPv6. Including both allow the code to go into both system. For my Macbook, the code do not work if ‘::1’ is not included.

2) I got permission error, which was not fix by chmod 775 or 777. In that case, I thought it may be an chown issue instead of chmod. I looked up which user is localhost apache running as for in Mac OS, and the user turned out to be _www (MAMP users may have a different user). So I did chown -R _www wordpress. Now everything works.