Wednesday, August 22, 2012

Windows 7: Eclipse CDT + OpenGL + MinGW Part 2

Eclipse CDT C++ plugin( 4.2.0 = Juno )
  1. Open Eclipse.
  2. Go to Help > Install new software > Work with.
  3. Paste in: http://download.eclipse.org/tools/cdt/releases/juno
  4. Press Enter.
  5. Expand "CDT Main Features".
  6. Turn on "C/C++ Development Tools"
  7. Expand "CDT Optional Features"
  8. Turn on: " C/C++ GCC Cross Compiler Support", "C/C++ GDB Hardware Debugging", "C/C++ Memory View Enhancements", "C/C++ Unit Testing Support", "C99 LR Parser", "CDT Visual C++ Support".
  9. Press Next, Finish, w/e. Just go through the installation steps, accept things, until it tells you that it needs to restart.
  10. Allow Eclipse to restart.
MinGW
  1. Go to: http://sourceforge.net/downloads/mingw/MinGW/
  2. Click on (The link will look something like this)"Download mingw-get-inst-20120426.exe (662.7 kB)"
  3. Run the installer.
  4. Say that you want the latest version from teh webz.
  5. Let it do it's thing. Go grab a drink or something.
  6. Go to wherever you installed it and make note of the path to the mingw bin (by default this is C:\MinGW\bin).
  7. Also make note of the mingw msys bin (by default this is C:\MinGW\msys\1.0\bin).
  8. Copy these 2 paths onto the end of your system PATH.
  9. To append these to the path, go to windows start and enter the string "advanced".
  10. Click "View advanced system settings".
  11. Click "Environment Variables".
  12. Go to the "System variables" region at the bottom.
  13. Scroll down to "PATH" and click edit.
  14. Go to the end of this possibly long bigass string and enter a semicolon ";" to separate the last entry from the ones you want to add.
  15. Add the two paths to mingw bin and msys bin (separate these by ";").
  16. Test if you have mingw working now by opening up the console and running make.
  17. Press WindowsKey + R. This will open up RUN.
  18. Type cmd.
  19. Press enter.
  20. Run the command: "make --version".
  21. Run the command: "g++ --version".
  22. If these commands don't error out and complain about something then you are good to go with mingw!

Windows 7: Eclipse CDT + OpenGL + MinGW Part 1

So, I get tired of Visual Studio.

I get tired of it in general, I get tired of it's look, I get tired of it bugging out... And with all the Windows 8 stuff I've been reading about with the "you will develop for Metro or gtfo" what not, I just feel like now is a good time to take my OpenGL preferring self and get away from Visual Studio.

I really like Eclipse. It's easy to work with, it's free, it's got ton's of plug-ins, and it's easy to change the look with templates that don't break everything. Also the code completion is great. In Visual Studio I use Wild Tomato's Visual Assistant X. In Eclipse, I get a free and awesome code completion solution. Score.

Anyway, setting up Eclipse to develop C++ meant installing the CDT plugin. Painless.
Getting OpenGL's spinning cube hello world working... Painful.

But, it always is painful to get OpenGL started up on some dev environment you aren't experienced at working with yet.

So, let me distill the knowledge I have acquired by mentally cartwheeling nude through numerous forums and guides to you, the consumer, so that you may immediately get an OpenGL Spinning Cube application up and working using not only FreeGLUT, but also GLFW and GLEW.

Tuesday, August 21, 2012

Windows: CMake can't find QT? Whaaaattttt....

I got this error while checking out a project.

I found the solution on StackOverflow (http://stackoverflow.com/questions/9933939/cmake-not-finding-qt4).

Plain and simple: add the path "C:\QtSDK\Desktop\Qt\4.8.0\msvc2010\bin" to your advanced system settings PATH variable.

If you're using Qt 4.8.1 or w/e else change it accordingly. Just make sure you get the msvc2010\bin path.

Wednesday, July 11, 2012

Eclipse + Egit + Remote Repo + Add new project

I use Git. I use Eclipse. I use Egit. I use Bitbucket. I needed to add an Eclipse project to my repo. I couldn't find how to do it anywhere. Here is how I did it (roughly).


  • Open Eclipse (4.2+).
  • Install Egit:  http://www.vogella.com/articles/EGit/article.html.
  • File > Import > Git > Projects from Git > URI.
  • Put your Bitbucket repo address in (for example: https://username@bitbucket.org/username/blahblah.git )
  • Go to Window > Show View > Git Repositories.
  • Make note of the repo structure.
  • Copy/Move your project to the repo directory (it should be in your eclipse workspace directory).
  • In Git Repositories view, right click the name of the repo and "commit" then "push".
  • Done.
Hopefully this is helpful.

Tuesday, July 10, 2012

Easily rename batches of files on Windows

http://www.den4b.com/

This guy has made an amazing application called "ReNamer". Get it here: http://www.den4b.com/?x=downloads.

Basically you drag/drop your files into the app, then you tell it what text you want to find/replace, hit go, and wham you're done.

I use Windows 7 and it has done an amazing job so far. Definitely get it, great file renaming tool with a gui.

Wednesday, June 13, 2012

iOS Xcode 4.X : Build Fail "My 64-bit Mac"

This error arose when I began working on a project that a co-worker of mine started. The project was on the iPad using iOS but xcode key yabbering on about how it couldn't build for 64bit desktop. Painful and maddening. Stackoverflow.com showed that this problem happens a lot for several reasons (subversion, files touched outside of xcode, crashes, etc ), but none of the presented solutions were helpful. All except for one.

To resolve this for my iOS project, I went to the project target settings ( the picture of the ruler and brush ), to the"Summary" tab, and changed the "Deployment Target" to 5.0. It was set to something like 5.1, but it needed to be something that my machine had. I imagine that the "My 64-bit Mac" crud is a default that Xcode goes to when all else fails.

Monday, June 11, 2012

A definition of computer science

So after some thought about what I actually do as a computer scientist I've come up with a definition for the field that actually makes sense.

Computer science is the art of using several languages to write books that you then give to machines to tell them how to make something out of collections of content.

Sometimes you write the languages used to write the books. Other times you write about ways to write things that can be used in the books (this thing is faster or more accurate than that thing, and that thing allows us to do this new thing). Often times, these books have been written by other people and you reference them to create a new book.

Content are things created either by machines themselves, or other people. Content can include things like information about who has visited a website, the recorded wind speeds of a region of the Earth, or a picture that paints the body of a character in a 3D video game.

The essence of the definition is that what we do is write many pages of text in order to create some specific system/collection of happenings in machines.

Even if you spend much of your time using nothing but whiteboards and markers to prove equations and ideas (which is great and vital to do), at some point one would hope that you actually implement those things inside of a machine to give the theory a form that can be used.

Lol finally I can explain what I do to people who dont do what I do. I think it's intuitive also as it reminds me of writing English and History papers in high school.