Custom Functions in SDL

I have a piece of code that manages collision. I put it into a function called CWall. Then, I put the function in my main function.

Code:

if(hasKey == false)
{
CWall(&Wall, &Player, PDir);
}

The first 2 arguments are of type SDL_Rect. The PDir is a signed char.
I get a linker error when I try to run it.

Code:
error LNK2019: unresolved external symbol “int __cdecl CWall(struct SDL_Rect *,struct SDL_Rect *,int)” (?CWall@@YAHPAUSDL_Rect@@0H at Z) referenced in function _SDL_main

This error say that CWall is called or needs a prototype before it id
defined or prototyped. Where is this function located? It looks like a
basic thing that happens when you are learning how code is structured. If
you post the code im sure any one of us could instantly see the issue and
explain how to resolve it.On Wed, Nov 23, 2011 at 8:38 AM, captacha wrote:

**
I have a piece of code that manages collision. I put it into a function
called CWall. Then, I put the function in my main function.

Code:

if(hasKey == false)
{
CWall(&Wall, &Player, PDir);
}

The first 2 arguments are of type SDL_Rect. The PDir is a signed char.
I get a linker error when I try to run it.

Code:

error LNK2019: unresolved external symbol “int __cdecl CWall(struct
SDL_Rect *,struct SDL_Rect *,int)” (?CWall@@YAHPAUSDL_Rect@@0H at Z)
referenced in function _SDL_main


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org