Skip to main content
gamedev.net
🔒 Locked

[HELP] I need help at vc++

Started by Alican 1 reply 4.2k views
Original Post
Alican
Alican
i have recently fallowed a tutorial to create a pinball game and i had serval problems


#include "windows.h"
#include "SDL.h"
#include "SDL_opengl.h"
#include "SDL_config.h"
#include "SDL_config_win32.h"
#include



int main (int argc, char* args[] )
{

SDL_Init (SDL_INIT_EVERYTHING); //Uses Everrything that SDL has

SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 8 );//The Memory Usage
SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 8 );//The Memory Usage
SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 8 );//The Memory Usage
SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE, 8 );//The Memory Usage
SDL_GL_SetAttribute( SDL_GL_BUFFER_SIZE, 32 );//The Memory Usage
SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 );//The Memory Usage
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );//The Memory Usage

SDL_WM_SetCaption("Quantum Pinball" , NULL );

SDL_SetVideoMode(600,400,32,SDL_OPENGL); //Pixel and collor bit

//The color of the refreshed frame (white)
glClearColor(1,1,1,1); //RED,GREEN,BLUE,ALPHA
glViewport(0,0,600,400); //Axis Place of the screen
glShadeModel(GL_SMOOTH);//Smooths the color
glMatrixMode(GL_PROJECTION); //Displays only 2D
glLoadIdentity(); //Loads the action above
glDisable(GL_DEPTH_TEST); //Disables Depth Rendering
std:: cout<<"Q1";
SDL_Delay (5000);


SDL_Quit ();

return 0 ;
}




here is my error


Quantum.obj : error LNK2019: unresolved external symbol __imp__glDisable@4 referenced in function _SDL_main
1>Quantum.obj : error LNK2019: unresolved external symbol __imp__glLoadIdentity@0 referenced in function _SDL_main
1>Quantum.obj : error LNK2019: unresolved external symbol __imp__glMatrixMode@4 referenced in function _SDL_main
1>Quantum.obj : error LNK2019: unresolved external symbol __imp__glShadeModel@4 referenced in function _SDL_main
1>Quantum.obj : error LNK2019: unresolved external symbol __imp__glViewport@16 referenced in function _SDL_main
1>Quantum.obj : error LNK2019: unresolved external symbol __imp__glClearColor@16 referenced in function _SDL_main

here is the tutorial that i watched for setting the sdl not for writing the pinball
HNikolas
HNikolas
Right forum for this thread: http://www.gamedev.n...-for-beginners/
Identical thread: http://www.gamedev.n...dl-and-windows/
Some help: http://www.google.com/search?q=linking+opengl+AND+sdl&rls=com.microsoft:et&ie=UTF-8&oe=UTF-8&startIndex=&startPage=1

As a tip, next time you get an error, run it throught Google search.
[size=2]Ruby on Rails, ASP.NET MVC, jQuery and everything else web.. now also trying my hand on games.
ajaytemp_55190
ajaytemp_55190

i have recently fallowed a tutorial to create a pinball game and i had serval problems


#include "windows.h"
#include "SDL.h"
#include "SDL_opengl.h"
#include "SDL_config.h"
#include "SDL_config_win32.h"
#include



int main (int argc, char* args[] )
{

SDL_Init (SDL_INIT_EVERYTHING); //Uses Everrything that SDL has

SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 8 );//The Memory Usage
SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 8 );//The Memory Usage
SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 8 );//The Memory Usage
SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE, 8 );//The Memory Usage
SDL_GL_SetAttribute( SDL_GL_BUFFER_SIZE, 32 );//The Memory Usage
SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 );//The Memory Usage
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );//The Memory Usage

SDL_WM_SetCaption("Quantum Pinball" , NULL );

SDL_SetVideoMode(600,400,32,SDL_OPENGL); //Pixel and collor bit

//The color of the refreshed frame (white)
glClearColor(1,1,1,1); //RED,GREEN,BLUE,ALPHA
glViewport(0,0,600,400); //Axis Place of the screen
glShadeModel(GL_SMOOTH);//Smooths the color
glMatrixMode(GL_PROJECTION); //Displays only 2D
glLoadIdentity(); //Loads the action above
glDisable(GL_DEPTH_TEST); //Disables Depth Rendering
std:: cout<<"Q1";
SDL_Delay (5000);


SDL_Quit ();

return 0 ;
}




here is my error


Quantum.obj : error LNK2019: unresolved external symbol __imp__glDisable@4 referenced in function _SDL_main
1>Quantum.obj : error LNK2019: unresolved external symbol __imp__glLoadIdentity@0 referenced in function _SDL_main
1>Quantum.obj : error LNK2019: unresolved external symbol __imp__glMatrixMode@4 referenced in function _SDL_main
1>Quantum.obj : error LNK2019: unresolved external symbol __imp__glShadeModel@4 referenced in function _SDL_main
1>Quantum.obj : error LNK2019: unresolved external symbol __imp__glViewport@16 referenced in function _SDL_main
1>Quantum.obj : error LNK2019: unresolved external symbol __imp__glClearColor@16 referenced in function _SDL_main

here is the tutorial that i watched for setting the sdl not for writing the pinball
http://www.youtube.c...h?v=5b-zFMCX0QI


Linking errors it is linker errors.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.