Jump to content

  • Log In with Google      Sign In   
  • Create Account

[HELP] I need help at vc++


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 hwmck   Members   -  Reputation: 100

Like
0Likes
Like

Posted 23 September 2011 - 02:05 PM

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 <iostream>



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


Sponsor:

#2 HNikolas   Members   -  Reputation: 192

Like
0Likes
Like

Posted 23 September 2011 - 02:11 PM

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.
Ruby on Rails, ASP.NET MVC, jQuery and everything else web.. now also trying my hand on games.

#3 VJ01   Members   -  Reputation: 80

Like
0Likes
Like

Posted 30 September 2011 - 12:42 PM

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 <iostream>



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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS