Hi, this is my first post, and my question is how can i compile a library adn then use it in other projects, i tried, but it didnt worked
i did the following thing:
Graphics.h
Code: Select all
void RenderSurface(SDL_Surface *src,SDL_Rect *srcrect);
Graphics.cpp
Code: Select all
#include "Graphics.h"
#include <SDL.h>
void RenderSurface(SDL_Surface *src,SDL_Rect *srcrect)
{
SDL_BlitSurface(src,NULL,SDL_GetVideoSurface(),srcrect);
}
i use codeblocks, so i created a static library project, compiled it, and it creates a Graphics.a and Graphics.o file, then i linked the Graphics.a to the compiler, but when i try to use the lib, including Graphics.h in an other project it sais the directory doesnt exist??
any suggestion?? im sure im compiling the lib wrong, so if anyone could explain me how to do it...