Author Topic: Using glpng in windows with codeblocks  (Read 5880 times)

xanas3712

  • Guest
Using glpng in windows with codeblocks
« on: June 04, 2006, 11:17:40 pm »
I am coming as a user of kdevelop in linux, but I wanted to build a windows version of my application so I went ahead and setup code::blocks for this purpose.

Anyway, I've got everything working (I think anyway) except glpng, which is something I use to make loading png graphics easier.  I have never loaded them manually so I'd hate to have to change what I'm using here.

I get the following errors when trying to use the glpng.lib file (which I have put in code::blocks lib directory)

Code
C:\Program Files (x86)\CodeBlocks\lib\glpng.lib(./Release/pngerror.obj):D:\Work\glpng\Lib\:(.text[_png_default_error]+0xb): variable '_iob' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.
C:\Program Files (x86)\CodeBlocks\lib\glpng.lib(./Release/pngerror.obj):D:\Work\glpng\Lib\:(.text[_png_default_warning]+0x13): variable '_iob' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.
Warning: .drectve `-defaultlib:glpng.lib ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
C:\Program Files (x86)\CodeBlocks\lib\glpng.lib(./Release/glpng.obj):D:\Work\glpng\Lib\:(.text[_pngLoadF@16]+0x110): undefined reference to `_imp__glGetIntegerv@8'
C:\Program Files (x86)\CodeBlocks\lib\glpng.lib(./Release/glpng.obj):D:\Work\glpng\Lib\:(.text[_pngLoadF@16]+0x13b): undefined reference to `_imp__glGetString@4'
C:\Program Files (x86)\CodeBlocks\lib\glpng.lib(./Release/glpng.obj):D:\Work\glpng\Lib\:(.text[_pngLoadF@16]+0x16d): undefined reference to `_imp__wglGetProcAddress@4'
C:\Program Files (x86)\CodeBlocks\lib\glpng.lib(./Release/glpng.obj):D:\Work\glpng\Lib\:(.text[_pngLoadF@16]+0x374): undefined reference to `_imp__glGetIntegerv@8'
C:\Program Files (x86)\CodeBlocks\lib\glpng.lib(./Release/glpng.obj):D:\Work\glpng\Lib\:(.text[_pngLoadF@16]+0x390): undefined reference to `_imp__glPixelStorei@8'
C:\Program Files (x86)\CodeBlocks\lib\glpng.lib(./Release/glpng.obj):D:\Work\glpng\Lib\:(.text[_pngLoadF@16]+0x7ef): undefined reference to `_imp__glTexImage2D@36'
C:\Program Files (x86)\CodeBlocks\lib\glpng.lib(./Release/glpng.obj):D:\Work\glpng\Lib\:(.text[_pngLoadF@16]+0x885): undefined reference to `_imp__glTexImage2D@36'
C:\Program Files (x86)\CodeBlocks\lib\glpng.lib(./Release/glpng.obj):D:\Work\glpng\Lib\:(.text[_pngLoadF@16]+0x88e): undefined reference to `_imp__glPixelStorei@8'
C:\Program Files (x86)\CodeBlocks\lib\glpng.lib(./Release/glpng.obj):D:\Work\glpng\Lib\:(.text[_ExtSupported]+0x26): undefined reInfo: resolving __iob by linking to __imp___iob (auto-import)
ference to `_imp__glGetString@4'
C:\Program Files (x86)\CodeBlocks\lib\glpng.lib(./Release/glpng.obj):D:\Work\glpng\Lib\:(.text[_Build2DMipmaps]+0x51): undefined reference to `_imp__glTexImage2D@36'
C:\Program Files (x86)\CodeBlocks\lib\glpng.lib(./Release/glpng.obj):D:\Work\glpng\Lib\:(.text[_Build2DMipmaps]+0xaf): undefined reference to `_imp__glTexImage2D@36'
C:\Program Files (x86)\CodeBlocks\lib\glpng.lib(./Release/glpng.obj):D:\Work\glpng\Lib\:(.text[_SetParams]+0xc): undefined reference to `_imp__glGenTextures@8'
C:\Program Files (x86)\CodeBlocks\lib\glpng.lib(./Release/glpng.obj):D:\Work\glpng\Lib\:(.text[_SetParams]+0x26): undefined reference to `_imp__glTexParameteri@12'
nmth000000.o:: undefined reference to `_nm___iob'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 41 warnings
 


Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Using glpng in windows with codeblocks
« Reply #1 on: June 04, 2006, 11:54:31 pm »
From the output I guess you're using MinGW, but trying to link against a VC library.

You'll need to build a library for MinGW (.a extension) for this purpose. I guess that information can be found somewhere in glpng's documentation/README/website :)

xanas3712

  • Guest
Re: Using glpng in windows with codeblocks
« Reply #2 on: June 05, 2006, 12:02:02 am »
 :shock:  Actually not! (glpng is a pretty small project and is not too complex, but it does what I want and that's why I have been using it).

But I figured out how to compile a static lib with codeblocks after reading that someone else had the same issue with DevC++

So it's all good

However, I noticed that I can't resize the application whenever I want to like I can in linux (I use the window resize event with sdl)..

Not sure what is up with it, but it will just create a white screen if I try to resize the display.

« Last Edit: June 05, 2006, 12:21:25 am by xanas3712 »