Setting up on VC++

Hello,
Can someone tell me the basic steps for setting a VC++ 6.0 project
to work wiht SDL & OpenGL? I followed the steps from
http://www.gamedev.net/reference/programming/features/sdl1/page2.asp but
I get the following error:

LINK : fatal error LNK1104: cannot open file “SDL.lib”

If I remove the SDL.lib & SDLmain.lib from the linker settings and add
it to the project I get the following errors:

main.obj : error LNK2001: unresolved external symbol _gluPerspective at 32
main.obj : error LNK2001: unresolved external symbol __imp__glLoadIdentity at 0
main.obj : error LNK2001: unresolved external symbol __imp__glMatrixMode at 4
main.obj : error LNK2001: unresolved external symbol __imp__glViewport at 16
main.obj : error LNK2001: unresolved external symbol __imp__glColor3f at 12
main.obj : error LNK2001: unresolved external symbol __imp__glClear at 4
SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
_SDL_main

How can I solve this? ThanQ,

    JVFF

Add OpenGL to your list of libraries.> ----- Original Message -----

From: jvffprogramming@ieg.com.br (Janito Vaqueiro Ferreira Filho)
To: “SDL Mailing List”
Sent: Friday, January 24, 2003 12:47 PM
Subject: [SDL] Setting up on VC++

Hello,
Can someone tell me the basic steps for setting a VC++ 6.0 project
to work wiht SDL & OpenGL? I followed the steps from
http://www.gamedev.net/reference/programming/features/sdl1/page2.asp but
I get the following error:

LINK : fatal error LNK1104: cannot open file “SDL.lib”

If I remove the SDL.lib & SDLmain.lib from the linker settings and add
it to the project I get the following errors:

main.obj : error LNK2001: unresolved external symbol _gluPerspective at 32
main.obj : error LNK2001: unresolved external symbol
__imp__glLoadIdentity at 0
main.obj : error LNK2001: unresolved external symbol __imp__glMatrixMode at 4
main.obj : error LNK2001: unresolved external symbol __imp__glViewport at 16
main.obj : error LNK2001: unresolved external symbol __imp__glColor3f at 12
main.obj : error LNK2001: unresolved external symbol __imp__glClear at 4
SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
_SDL_main

How can I solve this? ThanQ,

    JVFF

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

Add OpenGL to your list of libraries.

Specifically, add “opengl32.dll”

—JoshOn Fri, 24 Jan 2003, Vitaliy Mikitchenko wrote:

You don’t add DLLs to the library list in VC, you add LIBs.
“opengl32.lib” and “glu32.lib”.

He does need to fix his SDL link, though.On Fri, Jan 24, 2003 at 04:07:43PM -0500, Josh Fishman wrote:

Add OpenGL to your list of libraries.

Specifically, add “opengl32.dll”


Glenn Maynard

Hello,

Now it’s giving just 1 error:

SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
_SDL_main

Glenn Maynard wrote:>On Fri, Jan 24, 2003 at 04:07:43PM -0500, Josh Fishman wrote:

Add OpenGL to your list of libraries.

Specifically, add “opengl32.dll”

You don’t add DLLs to the library list in VC, you add LIBs.
“opengl32.lib” and “glu32.lib”.

He does need to fix his SDL link, though.

Make sure you have a main function in your app like so:
int main(int, char **)
{
}> ----- Original Message -----

From: jvffprogramming@ieg.com.br (Janito Vaqueiro Ferreira Filho)
To:
Sent: Friday, January 24, 2003 2:20 PM
Subject: Re: [SDL] Setting up on VC++

Hello,

Now it’s giving just 1 error:

SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
_SDL_main

Glenn Maynard wrote:

On Fri, Jan 24, 2003 at 04:07:43PM -0500, Josh Fishman wrote:

Add OpenGL to your list of libraries.

Specifically, add “opengl32.dll”

You don’t add DLLs to the library list in VC, you add LIBs.
“opengl32.lib” and “glu32.lib”.

He does need to fix his SDL link, though.


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

ThanX guys. It’s working now. ThanX again,

    JVFF

Vitaliy Mikitchenko wrote:>Make sure you have a main function in your app like so:

int main(int, char **)
{
}

----- Original Message -----
From: “Janito Vaqueiro Ferreira Filho” <@Janito_Vaqueiro_Ferr>
To:
Sent: Friday, January 24, 2003 2:20 PM
Subject: Re: [SDL] Setting up on VC++

Hello,

Now it’s giving just 1 error:

SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
_SDL_main

Glenn Maynard wrote:

On Fri, Jan 24, 2003 at 04:07:43PM -0500, Josh Fishman wrote:

Add OpenGL to your list of libraries.

Specifically, add “opengl32.dll”

You don’t add DLLs to the library list in VC, you add LIBs.
“opengl32.lib” and “glu32.lib”.

He does need to fix his SDL link, though.


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


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

Make sure you set you visual studio project to create a win32 app…

If you did create a console app by mistake either ::

paste the line below into your source or add the linker options described
below manually

#pragma comment( linker, “/subsystem:“windows”
/entry:“mainCRTStartup”” )

are you linking to sdlmain?

if you dont know if you are or not, paste the line your using for the
linking options and we can check it out.> ----- Original Message -----

From: vitviper@hotmail.com (Vitaliy Mikitchenko)
To:
Sent: Friday, January 24, 2003 3:27 PM
Subject: Re: [SDL] Setting up on VC++

Make sure you have a main function in your app like so:
int main(int, char **)
{
}

----- Original Message -----
From: “Janito Vaqueiro Ferreira Filho”
To:
Sent: Friday, January 24, 2003 2:20 PM
Subject: Re: [SDL] Setting up on VC++

Hello,

Now it’s giving just 1 error:

SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
_SDL_main

Glenn Maynard wrote:

On Fri, Jan 24, 2003 at 04:07:43PM -0500, Josh Fishman wrote:

Add OpenGL to your list of libraries.

Specifically, add “opengl32.dll”

You don’t add DLLs to the library list in VC, you add LIBs.
“opengl32.lib” and “glu32.lib”.

He does need to fix his SDL link, though.


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


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

He is linking against sdlmain, seee:
SDLmain.lib(SDL_main.obj) : error LNK2001 <-- the link error is because the
_SDL_main function is not found, which I believe is because his main()
method is not correctly specified. Of course, I could be wrong :)> ----- Original Message -----

From: atrix2@cox.net (atrix2)
To:
Sent: Sunday, January 26, 2003 11:48 AM
Subject: Re: [SDL] Setting up on VC++

are you linking to sdlmain?

if you dont know if you are or not, paste the line your using for the
linking options and we can check it out.

----- Original Message -----
From: “Vitaliy Mikitchenko” <@Vitaliy_Mikitchenko>
To:
Sent: Friday, January 24, 2003 3:27 PM
Subject: Re: [SDL] Setting up on VC++

Make sure you have a main function in your app like so:
int main(int, char **)
{
}

----- Original Message -----
From: “Janito Vaqueiro Ferreira Filho”
To:
Sent: Friday, January 24, 2003 2:20 PM
Subject: Re: [SDL] Setting up on VC++

Hello,

Now it’s giving just 1 error:

SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
_SDL_main

Glenn Maynard wrote:

On Fri, Jan 24, 2003 at 04:07:43PM -0500, Josh Fishman wrote:

Add OpenGL to your list of libraries.

Specifically, add “opengl32.dll”

You don’t add DLLs to the library list in VC, you add LIBs.
“opengl32.lib” and “glu32.lib”.

He does need to fix his SDL link, though.


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


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


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

oh i see now, didnt notice that (:> ----- Original Message -----

From: vitviper@hotmail.com (Vitaliy Mikitchenko)
To:
Sent: Sunday, January 26, 2003 1:14 PM
Subject: Re: [SDL] Setting up on VC++

He is linking against sdlmain, seee:
SDLmain.lib(SDL_main.obj) : error LNK2001 <-- the link error is because
the
_SDL_main function is not found, which I believe is because his main()
method is not correctly specified. Of course, I could be wrong :slight_smile:

----- Original Message -----
From: “Atrix Wolfe” <@atrix2>
To:
Sent: Sunday, January 26, 2003 11:48 AM
Subject: Re: [SDL] Setting up on VC++

are you linking to sdlmain?

if you dont know if you are or not, paste the line your using for the
linking options and we can check it out.

----- Original Message -----
From: “Vitaliy Mikitchenko”
To:
Sent: Friday, January 24, 2003 3:27 PM
Subject: Re: [SDL] Setting up on VC++

Make sure you have a main function in your app like so:
int main(int, char **)
{
}

----- Original Message -----
From: “Janito Vaqueiro Ferreira Filho”
To:
Sent: Friday, January 24, 2003 2:20 PM
Subject: Re: [SDL] Setting up on VC++

Hello,

Now it’s giving just 1 error:

SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external
symbol

_SDL_main

Glenn Maynard wrote:

On Fri, Jan 24, 2003 at 04:07:43PM -0500, Josh Fishman wrote:

Add OpenGL to your list of libraries.

Specifically, add “opengl32.dll”

You don’t add DLLs to the library list in VC, you add LIBs.
“opengl32.lib” and “glu32.lib”.

He does need to fix his SDL link, though.


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


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


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


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

ThanX. I fixed my main func. It was void inside :-). ThanQ,

    JVFF

Vitaliy Mikitchenko wrote:>He is linking against sdlmain, seee:

SDLmain.lib(SDL_main.obj) : error LNK2001 <-- the link error is because the
_SDL_main function is not found, which I believe is because his main()
method is not correctly specified. Of course, I could be wrong :slight_smile:

----- Original Message -----
From: “Atrix Wolfe”
To:
Sent: Sunday, January 26, 2003 11:48 AM
Subject: Re: [SDL] Setting up on VC++

are you linking to sdlmain?

if you dont know if you are or not, paste the line your using for the
linking options and we can check it out.

----- Original Message -----
From: “Vitaliy Mikitchenko”
To:
Sent: Friday, January 24, 2003 3:27 PM
Subject: Re: [SDL] Setting up on VC++

Make sure you have a main function in your app like so:
int main(int, char **)
{
}

----- Original Message -----
From: “Janito Vaqueiro Ferreira Filho” <@Janito_Vaqueiro_Ferr>
To:
Sent: Friday, January 24, 2003 2:20 PM
Subject: Re: [SDL] Setting up on VC++

Hello,

Now it’s giving just 1 error:

SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
_SDL_main

Glenn Maynard wrote:

On Fri, Jan 24, 2003 at 04:07:43PM -0500, Josh Fishman wrote:

Add OpenGL to your list of libraries.

Specifically, add “opengl32.dll”

You don’t add DLLs to the library list in VC, you add LIBs.
“opengl32.lib” and “glu32.lib”.

He does need to fix his SDL link, though.


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


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


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


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