Borland C++'s tools + SDL_image linker Problem

Started by
8 comments, last by Al MacInnis 22 years ago
Too many days I can''t really go ahead due to this problem : Here''s a summary of the problem : I am working on a SDL program, and there are no problems. Recently, I included the SDL_image library in order to load PNG, JPG... images in my program. I put the #include <SDL_image.h> as required. Compilation , no problems. Link : Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland Error: Unresolved external ''_IMG_Load'' referenced from C:\PROGRAMMATION\C++\SDL\SPRITES.OBJ I am using the IMG_load (char *file) function... The linker command line is the following : ilink32 -aa -Tpe -L"c:\Programmation\Compil~1\Lib" %P%N.obj import32.lib SDL_image.lib sdl.lib zlib.lib libpng1.lib c0w32.obj cw32.lib I added SDL_image.lib zlib.lib, libpng1.lib in the command line, since my programs without SDL_image (which run very fine). I tried also without zlib and libpng1 I also tried to put SDL_image.lib in the command line everywhere, after before SDL.lib. SDL_image.lib was created with Borland''s implib from SDL_image.dll picked on the SDL website... Where is the trick ? "Everyday above ground is a good day" (Mel in Scarface)
"Everyday above ground is a good day" (Mel in Scarface)
Advertisement
You might want to use Dependency Walker or ShowDepends to see what the DLLs need for import libraries - that might help.

Thank you...
Where can I get that tool ?


"Everyday above ground is a good day" (Mel in Scarface)
"Everyday above ground is a good day" (Mel in Scarface)
What is the format of the SDL_image.lib file? Lib file are usually made for MSVC, so you have to create a lib file using the implib utility.
Tip:
One more thing, why do you have to have a big command line. Use the #pragma comment (lib,"lib_name") in you source and you don''t have to type in so much.

Amresh
ramresh@dsqsoft.com
dArkteMplaR of Delphi
@amrehr
Instead of using #pragma comments in the source code,
I guess it is better to get in touch with Borlands make.
Here is a fine tutorial about the borlands free command line tools.
http://www.pharo.onlinehome.de/Bcc55.html

@Al MacInnis
SDL_Image is open source, so you could also get the source from CVS, and compile it with your compiler.
@amrehsr
I use implib to create the DLL from the site''s .lib

"Everyday above ground is a good day" (Mel in Scarface)
"Everyday above ground is a good day" (Mel in Scarface)
quote:I use implib to create the DLL from the site's .lib

???
Isn't this the other way around? Create the .lib file from the dll and use it. It should work.

[edited by - amreshr on March 25, 2002 3:41:03 AM]
dArkteMplaR of Delphi
You''re right of course
I''ve done the .lib the right way, just a misspelling.


"Everyday above ground is a good day" (Mel in Scarface)
"Everyday above ground is a good day" (Mel in Scarface)
up

"Everyday above ground is a good day" (Mel in Scarface)
"Everyday above ground is a good day" (Mel in Scarface)
Is that so difficult

"Everyday above ground is a good day" (Mel in Scarface)
"Everyday above ground is a good day" (Mel in Scarface)

This topic is closed to new replies.

Advertisement