User forums > Using Code::Blocks

Getting GRX to work with Code::blocks?

(1/2) > >>

mconsidine:
Apologies in advance if this is not the right place for this question.  Having checked the archives, though, I can't think of where else to ask.

I am returning to some programming after a long lay off and want to get a borland/graphics.h type app recompiled using code::blocks.  The GRX graphics library found here http://grx.gnu.de/ would seem to allow that.  And it's install seems to work fine.

The problem is cropping up when I try to compile under cb (svn build #3337, Dec 4, 2006).  After copying the GRX header files to mingw/include and the library file to mingw/lib, I get the following errors :
:vd_win32.c:: undefined reference to `SetDIBColorTable@16'
:vd_win32.c:: undefined reference to `CreateDIBSection@24'
:vd_win32.c:: undefined reference to `SelectObject@8'
:vd_win32.c:: undefined reference to `CreateSolidBrush@4'
:vd_win32.c:: undefined reference to `DeleteObject@4'
:vd_win32.c:: undefined reference to `DeleteObject@4'
:vd_win32.c:: undefined reference to `CreateCompatibleDC@4'
:vd_win32.c:: undefined reference to `BitBlt@36'
:vd_win32.c:: undefined reference to `SetDIBColorTable@16'
:vd_win32.c:: undefined reference to `GetStockObject@4'
:vd_win32.c:: undefined reference to `DeleteObject@4'
:vd_win32.c:: undefined reference to `DeleteDC@4'
:vd_win32.c:: undefined reference to `BitBlt@36'
:fdw32_8.c:: undefined reference to `GetPixel@12'
:fdw32_8.c:: undefined reference to `SetPixelV@16'
:fdw32_24.c:: undefined reference to `GetPixel@12'
:fdw32_24.c:: undefined reference to `SetPixelV@16'
:: === Build finished: 17 errors, 0 warnings ===

My gut tells me I'm missing a compiler directive, but looking at the makefile that is with the GRX install doesn't seem to help.  (More likely : I'm completely overlooking something).

Can anyone here tell me what I'm likely doing wrong or missing?  Can anyone who has successfully integrated GRX with cb tell me what they did?

Thanks in advance,
Matt

(fwiw, running on cb on winxp)

raph:
You need to link against libgdi32. Add "gdi32" to Build options->Linker settings->Link libraries.

mconsidine:
Thanks.  That did the trick ...

Den:
I have a problem with the GRX library. I work os Windows XP Sp2.
I have downoload the GRX graphics library from http://grx.gnu.de/
I don't know how to instal this library.
Could anybody explain how to do it by steps?

Thank for attention.

Den.

Deschamps:
Hello.


--- Quote from: Den ---I don't know how to instal this library.
Could anybody explain how to do it by steps?
--- End quote ---

1) Unzip the package you've downloaded
2) Look for a text file named 'readme'
3) Open and read it

4) If something fails, ask for help trying to provide all the info you think will be relevant, as the compiler you're using, etc.

Regards.

Navigation

[0] Message Index

[#] Next page

Go to full version