Register / Login

openframeworks – installation dev-c++

step 1 – Download dev-c++
step 2 – Download devpaks
step 3 – Using openFrameworks devCpp compile notes

1) Download dev-c++

the Dev-c++ version we are using is 4.9.9.2. You can find that version here: bloodshed.net/devcpp.html

devCppDownload

download the EXE to your computer (approx 9mb):

devCppIcon

Now, double click and start the installation process. In the process, you should be asked what folder you want to install dev-cpp to, choose something like “c:/dev-cpp” since the dev-cpp path can’t use spaces, so folders like “Documents and Settings” don’t work. (we don’t exactly know why this is).

devCppInstallDir

the dev-cpp installer will ask you what kind of installation you want. Choose “full”.

devCppFull

Once you are done with that, you should be able to check the directory that dev-cpp was installed into. Here’s what it looks like:

devCppDirCheck

Also, you should now be able to see dev-c++ in your start menu. Find it and try running dev-c++. (note the “zlib” and “directx” directories shown in the picture below will come after step 2 below)

devCppMenuCheck

If everything worked out, dev-cpp will start up.

To add: when you start dev-c++ for the first time, it asks you to compile headers (I think). need a screenshot

2) Download devpaks

download the devpacks: directx and zlib. These can be found on devpaks.org. The direct downloads for the two devpacks are: here and here.

devCppDevPacks

Once you have downloaded these devpaks, use the “Package Manager” from within dev-c++ to install these libraries. This will install the zlib library and headers (for compression, needed for freeType) and the directx libraries and headers (needed for rtAudio, which was compiled for directSound).

devCppPackageManager

From the package manager, you can install the two devpaks:

devCppPackageInstalling

Once installed, you should see both “zlib” and “directx” in the package manager

devCppPackagesInThere

3) Using openframeworks

Ok cool, now we should be able to load one of the ofExamples. You can load the “.dev” file that comes with the apps. When it loads, it looks like this:

devCppAppUp

Under the execute menu, you can choose “compile” to compile the code and “run” to execute the code.

devCppAppCompile

Or choose the corresponding icons:

devCppAppRunIcondevCppAppCompileIcon

When you compile, you may see these warnings the first time.

Warning: .drectve `-defaultlib:LIBCMT ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:uuid.lib ' unrecognized

These warning can be simply disregarded – they all have to do with Quicktime’s library, and the fact that it was compiled in visual studio. We haven’t found a way to disable these warnings, but we are searching.

devCppAppWarnings

dev-cpp compiling notes

while you should be in good shape if you follow the above instuctions for creating a new project (and thus not have to change any settings, the following notes are some of the options for the dev-cpp openframeworks application, with some explanations about the settings:

project > project options > parameters

additonal command line options
compiler and c++ compiler
:
-Wno-multichar

this is because the apple ‘.h’ files are full of multichar definitions, this diables that warning (or else, dev-cpp will go nuts)

linker :
../../libs/freeImage/FreeImage.lib
../../libs/RtAudio/RtAudio.a
../../libs/quicktime/Libraries/qtmlClient.lib
../../libs/freetype/lib/libfreetype.a
../../libs/glut/libglut.a
-l opengl32
-l glu32
-l dsound
-l winmm
-l dxguid
-l strmbase
-l strmiids
-l z
-l uuid

these are the actual libraries that openFrameworks uses, plus plenty of the necessary windows, direct-x, and other libraries that the openFrameworks libraries need to link against. They should all be installed with dev-cpp, after following the above steps. the ../../ refers to libraries that are locally within the “libs” folder. -l refers to dev-cpp libraries, that can be found within the dev-cpp installation directory (ie c:/dev-cpp)

note, can this list be shorter, ie possible to link to less libs?

project > project options > directories > include directories

../../libs/freeType/include
../../libs/freeType/include/freetype2
../../libs/quicktime/CIncludes
../../libs/RtAudio
../../libs/freeImage
../../libs/glut
../../libs/openFrameworks
../../libs/openFrameworks/app
../../libs/openFrameworks/graphics
../../libs/openFrameworks/utils
../../libs/openFrameworks/sound
../../libs/openFrameworks/video

these are the directories where the ‘.h’ files that openframeworks library will be referencing can be found. all of them are locally, in the “libs” folder (thus the ../../)