SDL_image with MSVC++ 6.0 problem

Hello.
There are some errors when I try to compile a program that uses SDL and
SDL_image under Win32 (MS Visual C++ 6.0)
It’s ok without SDL_image.

SDL_image.h(46) : error C2146: syntax error : missing ‘;’ before
identifier 'IMG_LoadTyped_RW’
SDL_image.h(46) : fatal error C1004: unexpected end of file found

What does it mean?
Thanks in advance,
Evgeny

I’d say that somehow, MSVC++6 is getting to that line without knowledge of
what SDL_Surface or SDLSPEC are. This is usually an effect of MSVC++'s
"#pragma once," but can come about from more GNU-safe code that uses
#define’s to make sure a file in included only once per object file. Try
re-aranging your #include ordering, and see if that fixes the problem.

Note that I don’t have a copy of 6.0 to test this on, so this is just an
educated guess. (I use 7.0, and I’ve seen this behavior a few times, but not
as often as I’ve heard from some of my 6.0 user friends)

  • Silicon> ----- Original Message -----

From: bbroth@pochta.ru (Evgeny Bronnikov)
To:
Sent: Monday, December 01, 2003 2:24 AM
Subject: [SDL] SDL_image with MSVC++ 6.0 problem

Hello.
There are some errors when I try to compile a program that uses SDL and
SDL_image under Win32 (MS Visual C++ 6.0)
It’s ok without SDL_image.

SDL_image.h(46) : error C2146: syntax error : missing ‘;’ before
identifier 'IMG_LoadTyped_RW’
SDL_image.h(46) : fatal error C1004: unexpected end of file found

What does it mean?
Thanks in advance,
Evgeny


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.541 / Virus Database: 335 - Release Date: 11/14/2003