Jump to content
  • Advertisement


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


Problem Compiling ( I already tried allot of things BUT ...)

This topic is 5978 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

Ok... Using SDL ... Sdl works but sdl_image gives error when I include ... I get this error : "d:\visualc\Include\sdl\sdl_image.h(46) : error C2146: syntax error : missing '';'' before identifier ''IMG_LoadTyped_RW''" Tools>options>directories : include : d:\visualc\INCLUDE d:\visualc\Include\sdl d:\visualc\MFC\INCLUDE d:\visualc\ATL\INCLUDE Library: d:\visualc\LIB d:\visualc\Lib\sdl d:\visualc\MFC\LIB Object/Librarie modules: kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib sdl.lib sdlmain.lib SDL_image.lib I''m using Multithreaded DLL... What I''m doing wrong ( I have sdl_image on the right dir''s)?? Thanks ... ernest_bauld@yahoo.co.uk

Share this post

Link to post
Share on other sites
i dunno if this is the problem here, but i had soemthing similar happen the first time i set up directx in vc++. move the include/lib directories for whatever api you''re using above the visual c++ default directories. the files are checked for in order and the stock includes/libs are often out of date.

Share this post

Link to post
Share on other sites
thanks ... but I already did that ...
I have windows.h included to :

#include <windows.h>
#include <stdio.h>
#include <gl\gl.h>
#include <gl\glu.h>
#include <stdlib.h>
#include <math.h>
#include <iostream.h>
#include "string.h"
#include "font.h"
#include "SDL.h"
#include "SDL_image.h"

Already tested allot of positions to !

Share this post

Link to post
Share on other sites
SDL must be first here ...


and here ...


and since the error is a SYNTAX error, than you know it can only involve the INCLUDE locations, the INCLUDE files, or YOUR source file''s contents ABOVE the #include line ... because the linker and LIB stuff would only be relevant AFTER the compile has successfully completed ... so if the changes above don''t help ... at least you know you can quit looking at the LIB files, the DLL options, the modules your using ETC ... because they will only matter later in the build process.

Good Luck

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!