2012-11-24

Eclipse + QMake - general purpose building system

Eclipse CDT: great C++ IDE
QMake: simple but powerful make-based build system

QMake does not work only for Qt toolkit, it could be used for other projects.

How I set up CDT + QMake:

  1. get CDT and Qt
  2. configure CDT to what you like (e.g. showing line number, etc.)
  3. add 2 external tools running at project location, one runs qmake -project, and another does qmake -spec macx-g++
    1. qmake -project is used to scan the folders, and pick out what will be c++ compile. It will generate a .pro file
    2. qmake alone (or with -spec) will read the .pro file and generate the actual Makefile.
  4. make a qmake.conf file to be included in the .pro file (with a line of include(qmake.conf)). This is to separate special settings from the .pro file, which would get erased when qmake -project is run.
  5. Sample qmake.conf

    CONFIG -= qt
    CONFIG += release
    TARGET = test2
    DESTDIR = build
    MOC_DIR = build
    RCC_DIR = build
    OBJECTS_DIR = build
    INCLUDEPATH += /my/own/include
    #LIBS += -L/usr/local/lib -L/opt/local/lib -lglfw -lGLEW -lglut -lGLU -lGL
    QMAKE_CXXFLAGS += -F/System/Library/Frameworks
    QMAKE_LFLAGS += -F/System/Library/Frameworks
    LIBS += -framework GLUT -framework OpenGL
    

Eclipse CDT resolves Mac Framework include path

Including framework's headers in CDT might encounter issues:
#include <GLUT/glut.h>
CDT indexer doesn't understand this since there is no actual path called "GLUT", but the GLUT.framework/Headers
Use soft links:
  • Create a include folder (e.g. ~/include) or cd /usr/include
  • ln -s /System/Library/Framworks/GLUT.framework/Headers ${your_include}/GLUT

Android Instant Upload

You need to enable Google Plus app to enable this feature.

http://support.google.com/plus/bin/static.py?hl=en&page=ts.cs&ts=2769098

Mac OS X 10.8: Undefined symbols for architecture x86_64 when using libglfw.a

Simple solution -- make libglfw.dylib available for linking

2012-11-11

Chrome/-ium omni bar I'm feeling lucky search

Create a search engine "http://www.google.com/search?sourceid=navclient&gfns=1&q=%s"

2012-11-04

Gnome move window key

Install gconf-edior
/apps/metacity/general/mouse_button_modifier
Change it to "<super>" (default: <alt>)