# Performance SDL 1.2.7 vs Allegro

**URL:** <https://discourse.libsdl.org/t/performance-sdl-1-2-7-vs-allegro/11153>\
**Category:** SDL Development\
**Created:** [August 13, 2004, 4:03am UTC](https://discourse.libsdl.org/t/performance-sdl-1-2-7-vs-allegro/11153 "2004-08-13T04:03:42Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![Santi\_Ontanon](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@Santi\_Ontanon](https://discourse.libsdl.org/u/Santi_Ontanon)\
**Post date:** [August 15, 2004, 11:31am UTC](https://discourse.libsdl.org/t/performance-sdl-1-2-7-vs-allegro/11153/21 "2004-08-15T11:31:51Z")

</div>

Hello,

I’m trying to compile SDL\_sound for windows with VC++6.0, only with  
support for WAV and OGG files. Therefore, I modify the config.h file to  
have this:

#undef DEBUG  
#undef DEBUG\_CHATTER  
#undef NDEBUG  
#undef SOUND\_SUPPORTS\_AIFF  
#undef SOUND\_SUPPORTS\_AU  
#undef SOUND\_SUPPORTS\_MIKMOD  
#undef SOUND\_SUPPORTS\_MODPLUG  
// #undef SOUND\_SUPPORTS\_OGG  
#undef SOUND\_SUPPORTS\_RAW  
#undef SOUND\_SUPPORTS\_SHN  
#undef SOUND\_SUPPORTS\_VOC  
// #undef SOUND\_SUPPORTS\_WAV  
#undef SOUND\_SUPPORTS\_MIDI  
#undef SOUND\_SUPPORTS\_FLAC  
#undef SOUND\_SUPPORTS\_SMPEG  
#undef SOUND\_SUPPORTS\_MPGLIB  
#undef SOUND\_SUPPORTS\_QUICKTIME  
#undef SOUND\_SUPPORTS\_SPEEX  
#undef SOUND\_USE\_ALTCVT

I’ve added the HAVE\_CONFIG\_H definition

When I try to link, the compiler tried to link also SMPEG, MIKMOD,  
LibFLAC and MODPLUG. As I don’t want any of that things, I’ve removed  
them from the link. Then, everything compiles well, the SDL\_sound.lib  
file is generated, but it fails to generate the SDL\_sound.dll file saying:

Linking…  
Creating library win32lib/sdl\_sound.lib and object win32lib/sdl\_sound.exp  
instrum.obj : error LNK2001: unresolved external symbol \_load\_instrument\_dls  
win32lib/sdl\_sound.dll : fatal error LNK1120: 1 unresolved externals  
Error executing link.exe.

I’ve also tried to get the binary files of SMPEG, MIKMOD, LibFLAC and  
MODPLUG in order to link everything, but I’ve failed to find LibFLAC and  
MODPLUG (only source code distributions that fail to build in VC++6.0…)

Any clues on the error?

thanks in advance

---

<div class="post-metadata">

**Author:** ![grembo](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/g/cab0a1/32.png) [@grembo](https://discourse.libsdl.org/u/grembo)\
**Post date:** [August 15, 2004, 11:43am UTC](https://discourse.libsdl.org/t/performance-sdl-1-2-7-vs-allegro/11153/22 "2004-08-15T11:43:06Z")

</div>

well, by the looks of this file, it would seem you have to comment the  
things you would like to leave in… but I have never used SDL\_sound.

Santi Onta??n wrote:\> Hello,

> I’m trying to compile SDL\_sound for windows with VC++6.0, only with  
> support for WAV and OGG files. Therefore, I modify the config.h file  
> to have this:
> 
> #undef DEBUG  
> #undef DEBUG\_CHATTER  
> #undef NDEBUG  
> #undef SOUND\_SUPPORTS\_AIFF  
> #undef SOUND\_SUPPORTS\_AU  
> #undef SOUND\_SUPPORTS\_MIKMOD  
> #undef SOUND\_SUPPORTS\_MODPLUG  
> // #undef SOUND\_SUPPORTS\_OGG  
> #undef SOUND\_SUPPORTS\_RAW  
> #undef SOUND\_SUPPORTS\_SHN  
> #undef SOUND\_SUPPORTS\_VOC  
> // #undef SOUND\_SUPPORTS\_WAV  
> #undef SOUND\_SUPPORTS\_MIDI  
> #undef SOUND\_SUPPORTS\_FLAC  
> #undef SOUND\_SUPPORTS\_SMPEG  
> #undef SOUND\_SUPPORTS\_MPGLIB  
> #undef SOUND\_SUPPORTS\_QUICKTIME  
> #undef SOUND\_SUPPORTS\_SPEEX  
> #undef SOUND\_USE\_ALTCVT
> 
> I’ve added the HAVE\_CONFIG\_H definition
> 
> When I try to link, the compiler tried to link also SMPEG, MIKMOD,  
> LibFLAC and MODPLUG. As I don’t want any of that things, I’ve removed  
> them from the link. Then, everything compiles well, the SDL\_sound.lib  
> file is generated, but it fails to generate the SDL\_sound.dll file  
> saying:
> 
> Linking…  
> Creating library win32lib/sdl\_sound.lib and object  
> win32lib/sdl\_sound.exp  
> instrum.obj : error LNK2001: unresolved external symbol  
> \_load\_instrument\_dls  
> win32lib/sdl\_sound.dll : fatal error LNK1120: 1 unresolved externals  
> Error executing link.exe.
> 
> I’ve also tried to get the binary files of SMPEG, MIKMOD, LibFLAC and  
> MODPLUG in order to link everything, but I’ve failed to find LibFLAC  
> and MODPLUG (only source code distributions that fail to build in  
> VC++6.0…)
> 
> Any clues on the error?
> 
> thanks in advance
> 
> * * *
> 
> SDL mailing list  
> SDL at [libsdl.org](http://libsdl.org)  
> [http://www.libsdl.org/mailman/listinfo/sdl](http://www.libsdl.org/mailman/listinfo/sdl)

---

<div class="post-metadata">

**Author:** ![Santi\_Ontanon](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@Santi\_Ontanon](https://discourse.libsdl.org/u/Santi_Ontanon)\
**Post date:** [August 15, 2004, 11:53am UTC](https://discourse.libsdl.org/t/performance-sdl-1-2-7-vs-allegro/11153/23 "2004-08-15T11:53:30Z")

</div>

Thanks for the quick reply!

But see that the lines in the config.h file say “#undef” and not  
“#define”. Actually, all those symbols are defined in the project file,  
and with the config file you can undefine them (I think)\> well, by the looks of this file, it would seem you have to comment the

> things you would like to leave in… but I have never used SDL\_sound.
> 
> Santi Onta??n wrote:
> 
> > Hello,
> > 
> > I’m trying to compile SDL\_sound for windows with VC++6.0, only with  
> > support for WAV and OGG files. Therefore, I modify the config.h file  
> > to have this:
> > 
> > #undef DEBUG  
> > #undef DEBUG\_CHATTER  
> > #undef NDEBUG  
> > #undef SOUND\_SUPPORTS\_AIFF  
> > #undef SOUND\_SUPPORTS\_AU  
> > #undef SOUND\_SUPPORTS\_MIKMOD  
> > #undef SOUND\_SUPPORTS\_MODPLUG  
> > // #undef SOUND\_SUPPORTS\_OGG  
> > #undef SOUND\_SUPPORTS\_RAW  
> > #undef SOUND\_SUPPORTS\_SHN  
> > #undef SOUND\_SUPPORTS\_VOC  
> > // #undef SOUND\_SUPPORTS\_WAV  
> > #undef SOUND\_SUPPORTS\_MIDI  
> > #undef SOUND\_SUPPORTS\_FLAC  
> > #undef SOUND\_SUPPORTS\_SMPEG  
> > #undef SOUND\_SUPPORTS\_MPGLIB  
> > #undef SOUND\_SUPPORTS\_QUICKTIME  
> > #undef SOUND\_SUPPORTS\_SPEEX  
> > #undef SOUND\_USE\_ALTCVT
> > 
> > I’ve added the HAVE\_CONFIG\_H definition
> > 
> > When I try to link, the compiler tried to link also SMPEG, MIKMOD,  
> > LibFLAC and MODPLUG. As I don’t want any of that things, I’ve removed  
> > them from the link. Then, everything compiles well, the SDL\_sound.lib  
> > file is generated, but it fails to generate the SDL\_sound.dll file  
> > saying:
> > 
> > Linking…  
> > Creating library win32lib/sdl\_sound.lib and object  
> > win32lib/sdl\_sound.exp  
> > instrum.obj : error LNK2001: unresolved external symbol  
> > \_load\_instrument\_dls  
> > win32lib/sdl\_sound.dll : fatal error LNK1120: 1 unresolved externals  
> > Error executing link.exe.
> > 
> > I’ve also tried to get the binary files of SMPEG, MIKMOD, LibFLAC  
> > and MODPLUG in order to link everything, but I’ve failed to find  
> > LibFLAC and MODPLUG (only source code distributions that fail to  
> > build in VC++6.0…)
> > 
> > Any clues on the error?
> > 
> > thanks in advance
> > 
> > * * *
> > 
> > SDL mailing list  
> > SDL at [libsdl.org](http://libsdl.org)  
> > [http://www.libsdl.org/mailman/listinfo/sdl](http://www.libsdl.org/mailman/listinfo/sdl)
> 
> * * *
> 
> SDL mailing list  
> SDL at [libsdl.org](http://libsdl.org)  
> [http://www.libsdl.org/mailman/listinfo/sdl](http://www.libsdl.org/mailman/listinfo/sdl)

---

<div class="post-metadata">

**Author:** ![grembo](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/g/cab0a1/32.png) [@grembo](https://discourse.libsdl.org/u/grembo)\
**Post date:** [August 15, 2004, 12:02pm UTC](https://discourse.libsdl.org/t/performance-sdl-1-2-7-vs-allegro/11153/24 "2004-08-15T12:02:33Z")

</div>

lol, i just read what i wrote and have decided it is really way past my  
bedtime 🙂 seeing you had allready done it… sorry ! no sleep, must  
continue programming now.

Santi Onta??n wrote:\> Thanks for the quick reply!

> But see that the lines in the config.h file say “#undef” and not  
> “#define”. Actually, all those symbols are defined in the project  
> file, and with the config file you can undefine them (I think)
> 
> > well, by the looks of this file, it would seem you have to comment  
> > the things you would like to leave in… but I have never used  
> > SDL\_sound.
> > 
> > Santi Onta??n wrote:
> > 
> > > Hello,
> > > 
> > > I’m trying to compile SDL\_sound for windows with VC++6.0, only with  
> > > support for WAV and OGG files. Therefore, I modify the config.h file  
> > > to have this:
> > > 
> > > #undef DEBUG  
> > > #undef DEBUG\_CHATTER  
> > > #undef NDEBUG  
> > > #undef SOUND\_SUPPORTS\_AIFF  
> > > #undef SOUND\_SUPPORTS\_AU  
> > > #undef SOUND\_SUPPORTS\_MIKMOD  
> > > #undef SOUND\_SUPPORTS\_MODPLUG  
> > > // #undef SOUND\_SUPPORTS\_OGG  
> > > #undef SOUND\_SUPPORTS\_RAW  
> > > #undef SOUND\_SUPPORTS\_SHN  
> > > #undef SOUND\_SUPPORTS\_VOC  
> > > // #undef SOUND\_SUPPORTS\_WAV  
> > > #undef SOUND\_SUPPORTS\_MIDI  
> > > #undef SOUND\_SUPPORTS\_FLAC  
> > > #undef SOUND\_SUPPORTS\_SMPEG  
> > > #undef SOUND\_SUPPORTS\_MPGLIB  
> > > #undef SOUND\_SUPPORTS\_QUICKTIME  
> > > #undef SOUND\_SUPPORTS\_SPEEX  
> > > #undef SOUND\_USE\_ALTCVT
> > > 
> > > I’ve added the HAVE\_CONFIG\_H definition
> > > 
> > > When I try to link, the compiler tried to link also SMPEG, MIKMOD,  
> > > LibFLAC and MODPLUG. As I don’t want any of that things, I’ve  
> > > removed them from the link. Then, everything compiles well, the  
> > > SDL\_sound.lib file is generated, but it fails to generate the  
> > > SDL\_sound.dll file saying:
> > > 
> > > Linking…  
> > > Creating library win32lib/sdl\_sound.lib and object  
> > > win32lib/sdl\_sound.exp  
> > > instrum.obj : error LNK2001: unresolved external symbol  
> > > \_load\_instrument\_dls  
> > > win32lib/sdl\_sound.dll : fatal error LNK1120: 1 unresolved externals  
> > > Error executing link.exe.
> > > 
> > > I’ve also tried to get the binary files of SMPEG, MIKMOD, LibFLAC  
> > > and MODPLUG in order to link everything, but I’ve failed to find  
> > > LibFLAC and MODPLUG (only source code distributions that fail to  
> > > build in VC++6.0…)
> > > 
> > > Any clues on the error?
> > > 
> > > thanks in advance
> > > 
> > > * * *
> > > 
> > > SDL mailing list  
> > > SDL at [libsdl.org](http://libsdl.org)  
> > > [http://www.libsdl.org/mailman/listinfo/sdl](http://www.libsdl.org/mailman/listinfo/sdl)
> > 
> > * * *
> > 
> > SDL mailing list  
> > SDL at [libsdl.org](http://libsdl.org)  
> > [http://www.libsdl.org/mailman/listinfo/sdl](http://www.libsdl.org/mailman/listinfo/sdl)
> 
> * * *
> 
> SDL mailing list  
> SDL at [libsdl.org](http://libsdl.org)  
> [http://www.libsdl.org/mailman/listinfo/sdl](http://www.libsdl.org/mailman/listinfo/sdl)

---

<div class="post-metadata">

**Author:** ![icculus](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/icculus/32/81_2.png) [@icculus](https://discourse.libsdl.org/u/icculus)\
**Post date:** [August 15, 2004, 2:56pm UTC](https://discourse.libsdl.org/t/performance-sdl-1-2-7-vs-allegro/11153/25 "2004-08-15T14:56:13Z")

</div>

> I’m trying to compile SDL\_sound for windows with VC++6.0, only with  
> support for WAV and OGG files. Therefore, I modify the config.h file to  
> have this:

config.h isn’t used on Windows; modify the project file through Visual  
C++ (the appropriate things are defined in the project’s properties or  
whatever VC++6 calls it); you can undefine them there, and remove  
unwanted libraries from the link properties.

–ryan.

---

<div class="post-metadata">

**Author:** ![Santi\_Ontanon](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@Santi\_Ontanon](https://discourse.libsdl.org/u/Santi_Ontanon)\
**Post date:** [August 15, 2004, 5:04pm UTC](https://discourse.libsdl.org/t/performance-sdl-1-2-7-vs-allegro/11153/26 "2004-08-15T17:04:01Z")

</div>

Yes, I noticed that in the VC++6.0 the project didn’t have the  
HAVE\_CONFIG\_H symbol defined. I defined it in order to use the config.h  
Anyway, I’ve tried to simply undefine the symbol from the project  
properties so that I have only defined these symbols:

WIN32,\_WINDOWS,\_MBCS,\_USRDLL,SDL\_SOUND\_DLL\_EXPORTS,NDEBUG,\_LIB,SOUND\_SUPPORTS\_WAV,SOUND\_SUPPORTS\_OGG

and I still get this error:

--------------------Configuration: sdl\_sound\_dll - Win32  
Release--------------------  
Linking…  
Creating library win32lib/sdl\_sound.lib and object win32lib/sdl\_sound.exp  
instrum.obj : error LNK2001: unresolved external symbol \_load\_instrument\_dls  
win32lib/sdl\_sound.dll : fatal error LNK1120: 1 unresolved externals  
Error executing link.exe.

sdl\_sound.dll - 2 error(s), 0 warning(s)

Moreover, this error only appears when I want to compile the DYNAMIC  
version of the library (i.e. the DLL file), If I compile the STATIC one,  
everything works fine…

Ryan C. Gordon wrote:\>\>I’m trying to compile SDL\_sound for windows with VC++6.0, only with

> > support for WAV and OGG files. Therefore, I modify the config.h file to  
> > have this:
> 
> config.h isn’t used on Windows; modify the project file through Visual  
> C++ (the appropriate things are defined in the project’s properties or  
> whatever VC++6 calls it); you can undefine them there, and remove  
> unwanted libraries from the link properties.
> 
> –ryan.
> 
> * * *
> 
> SDL mailing list  
> SDL at [libsdl.org](http://libsdl.org)  
> [http://www.libsdl.org/mailman/listinfo/sdl](http://www.libsdl.org/mailman/listinfo/sdl)

---

<div class="post-metadata">

**Author:** ![icculus](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/icculus/32/81_2.png) [@icculus](https://discourse.libsdl.org/u/icculus)\
**Post date:** [August 15, 2004, 8:07pm UTC](https://discourse.libsdl.org/t/performance-sdl-1-2-7-vs-allegro/11153/27 "2004-08-15T20:07:51Z")

</div>

> Moreover, this error only appears when I want to compile the DYNAMIC  
> version of the library (i.e. the DLL file), If I compile the STATIC one,  
> everything works fine…

That symbol is in the Timidity (MIDI support) code; try removing all the  
files in decoders/timidity from the build.

This really wasn’t meant to be chopped up like this on Windows;  
SDL\_sound is designed for this case, but Visual Studio really  
isn’t…this is why this is less than obvious to accomplish. Sorry about  
that.

–ryan.

---

<div class="post-metadata">

**Author:** ![Stephane\_Marchesin](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/a183cd/32.png) [@Stephane\_Marchesin](https://discourse.libsdl.org/u/Stephane_Marchesin)\
**Post date:** [August 15, 2004, 9:25pm UTC](https://discourse.libsdl.org/t/performance-sdl-1-2-7-vs-allegro/11153/28 "2004-08-15T21:25:54Z")

</div>

Fred wrote:

> > One way to get around this issue is to use a set of buffer surfaces  
> > of various sizes. To update an area of the screen, pick a buffer  
> > surface of a suitable size, lock it, render into it, unlock it, and  
> > then blit it to the screen. The unlock operation will invalidate the  
> > buffer surface, and the next blit will force the new graphics to be  
> > uploaded.
> 
> Does this mean that you could support a GL accelerated display with a  
> software display surface being updated with SDL\_UpdateRects with no  
> extra copying of textures out of video RAM?

No, David just says that you can try do do something smart and upload  
only the parts that changed using a set of pre existing buffers.  
However, these buffers will still need to be uploaded (but since they  
are smaller than the total surface, you can hope there will be a speedup).

> Or is it the case that only complete textures can be updated at a time  
> via OpenGL?

Standard OpenGL can update only parts of a texture. See the  
glTexSubImage2D call for this.  
However, whether the full texture is uploaded again or just the modified  
part is implementation-dependent.

Stephane

[Previous page](https://discourse.libsdl.org/t/performance-sdl-1-2-7-vs-allegro/11153.md?page=1)
