I can't find any way to add metadata to the symbols to forcibly pull them
in, so this will have to do.
#include <msp/io/file.h>
#include <msp/strings/format.h>
#include "imageloader.h"
#include <msp/io/file.h>
#include <msp/strings/format.h>
#include "imageloader.h"
+#ifdef WITH_LIBPNG
+#include "png/pngloader.h"
+#endif
+#ifdef WITH_LIBJPEG
+#include "jpeg/jpegloader.h"
+#endif
+#ifdef WITH_DEVIL
+#include "devil/devilloader.h"
+#endif
+#ifdef WITH_QUARTZ
+#include "quartz/quartzloader.h"
+#endif
ImageLoader *ImageLoader::open_io(IO::Seekable &io)
{
ImageLoader *ImageLoader::open_io(IO::Seekable &io)
{
+#ifdef WITH_LIBPNG
+ (void)RegisteredImageLoader<PngLoader>::reg;
+#endif
+#ifdef WITH_LIBJPEG
+ (void)RegisteredImageLoader<JpegLoader>::reg;
+#endif
+#ifdef WITH_DEVIL
+ (void)RegisteredImageLoader<DevilLoader>::reg;
+#endif
+#ifdef WITH_QUARTZ
+ (void)RegisteredImageLoader<QuartzLoader>::reg;
+#endif
+
list<RegisterBase *> &loaders = get_registered_loaders();
if(registered_loaders_changed)
{
list<RegisterBase *> &loaders = get_registered_loaders();
if(registered_loaders_changed)
{
template<typename T>
class RegisteredImageLoader: public ImageLoader
{
template<typename T>
class RegisteredImageLoader: public ImageLoader
{
+ friend class ImageLoader;
+
private:
class Register: public RegisterBase
{
private:
class Register: public RegisterBase
{