Archived

This topic is now archived and is closed to further replies.

Borland C++'s tools + SDL_image linker Problem

This topic is 5736 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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)

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
@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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites