November 02, 2006

How to compile with CImg.h


The compiler that I have been using comes with bloodshed Dev C++

Dev C++ can be downloaded from
Here Dev C++

Install Dev C++ then ignore the IDE that comes with it just use the compilers that it installs in C:\Dev-C++\Bin

And CImg.h can be downloaded from (Tweaked by me to work on Windows)
Here CImg.h

Extract the files and place them in C:\Dev-C++\Bin

This is because unfortunatly I have not been able to find a way of compiling any of the examples without them being in the bin, even with the bin folder being in the enviroment variables.

To compile the tutorial example load CMD
cd C:\Dev-C++\Bin
g++ -o tutorial.exe tutorial.cpp -O2 -lgdi32

This will take about 40sec to compile but does make quite a cool program,

Give it a go let me know if you get stuck, this should allow you to then start playing around with CImg and see if we can use it for out project!


- One comment Not publicly viewable

  1. OK, third time lucky creating a comment without the blog formatting making it unreadable!

    To allow compilation with g++ without having to be in the bin directory, simply remove the dash from the folder containing the Dev C++ files, and reflect this change in the path variable accordingly.

    The path variable doesnt seem to like having dashes in it.

    Hope this helps!

    07 Nov 2006, 20:59

Add a comment

You are not allowed to comment on this entry as it has restricted commenting permissions.

November 2006

Mo Tu We Th Fr Sa Su
Oct |  Today  | Dec
      1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30         

Search this blog



Most recent comments

  • The reflective writing is submitted individually so make sure you submit it yourself tomorrow mornin… by on this entry
  • Yeh Ant's charts look great. Not sure – Ant reckons 1650 max (10% over), so if anyone has any sugges… by on this entry
  • Wow, the report looks really good :) Do you think it will matter too much if it is a couple of hundr… by on this entry
  • nice, overs better than under ;) by on this entry
  • I'll do the other bits then: introduction/overview of person tracking, testing/problems (if Ant+Hoi … by Matt on this entry

Blog archive

Not signed in
Sign in

Powered by BlogBuilder