2

Author Topic: Dev c++ compilation error  (Read 8395 times)

0 Members and 1 Guest are viewing this topic.

Offline bootstrapTopic starter

  • Full Member
  • ***
  • Posts: 61
  • Helpful? 0
Dev c++ compilation error
« on: December 03, 2007, 09:47:38 AM »
Hi ,
When I am compiling a .cpp file in Dev -C++ using certain image procesing class , I am getting the following errors:
[linker error] undefined reference to `SetDIBitsToDevice@48' 
ld returned 1 exit status 
How do i solve the errors.
I already gave
#include "CImg.h"
using namespace cimg_library;
in my source code..

Some one suggested me to do the following:
libgdi32 (just add -lgdi32 to your link options)
How shall i add this file and where is the link option in "Dev -C++ 4.9.9.2"?

Offline bootstrapTopic starter

  • Full Member
  • ***
  • Posts: 61
  • Helpful? 0
Re: Dev c++ compilation error
« Reply #1 on: December 04, 2007, 03:43:32 AM »
solved the problem

Offline Fredrik Andersson

  • Robot Overlord
  • ****
  • Posts: 216
  • Helpful? 0
Re: Dev c++ compilation error
« Reply #2 on: December 04, 2007, 04:47:07 PM »
Could you please post your solution. :)

It's good for people googling this particular error. They may find a link to this thread and the problem seems identically. Wouldn't it be great then if the solution could be find in this same thread? Just a tip.
Current project: Pirrh - Portable Intelligent Round Rolling Hexapod

Offline lepa

  • Beginner
  • *
  • Posts: 1
  • Helpful? 0
Re: Dev c++ compilation error
« Reply #3 on: December 25, 2008, 11:54:13 AM »
i have the same problem, there is anyone who know i should do?

Offline Len0

  • Beginner
  • *
  • Posts: 1
  • Helpful? 0
Re: Dev c++ compilation error
« Reply #4 on: October 03, 2009, 11:16:38 AM »
I don't see that bootstrap edited his post to give solution to this problem. As it was suggested to him, you need to link libgdi32.
In Dev-C++ -> Project>>Project Options>>Parameters>>Add Lib>>libgdi32.a
In Code::Blocks -> Project>>Build Options>>Linker Settings>>Add>>libgdi32.a

I know this thread is old, but I hope someone will find my post useful. :)

Offline mamintoosi

  • Beginner
  • *
  • Posts: 1
  • Helpful? 0
Re: Dev c++ compilation error
« Reply #5 on: July 03, 2010, 02:00:34 AM »
Hi Len0;
Thanks; tho solution was useful for me.

 


Get Your Ad Here