Jump to content
Sign in to follow this  
biskut merry

Microsoft Visual C++ 2005 Express Edition Error

Recommended Posts

salam

saya ade belajar programing openGl gune visual c++ 2005 express edition.

tp bile saye cube compile sy punye program die kuar error

1>------ Build started: Project: TESTFRACTAL, Configuration: Debug Win32 ------

1>Compiling...

1>as.cpp

1>Linking...

1>as.obj : error LNK2019: unresolved external symbol __RTC_CheckEsp referenced in function "void __cdecl display(void)" (?display@@YAXXZ)

1>as.obj : error LNK2001: unresolved external symbol __RTC_Shutdown

1>as.obj : error LNK2001: unresolved external symbol __RTC_InitBase

1>as.obj : error LNK2019: unresolved external symbol __imp____glutInitWithExit@12 referenced in function _glutInit_ATEXIT_HACK@8

1>as.obj : error LNK2019: unresolved external symbol __imp____glutCreateWindowWithExit@8 referenced in function _glutCreateWindow_ATEXIT_HACK@4

1>C:\Documents and Settings\nicotine\Desktop\TESTFRACTAL\Debug\TESTFRACTAL.exe : fatal error LNK1120: 5 unresolved externals

1>Build log was saved at "file://c:\Documents and Settings\nicotine\Desktop\TESTFRACTAL\TESTFRACTAL\Debug\BuildLog.htm"

1>TESTFRACTAL - 6 error(s), 0 warning(s)

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

ini saye punye coding

#include <GL/glut.h>

float a,b,c,d;

int i,j;

void display(void)

{

glClear(GL_COLOR_BUFFER_BIT);

glBegin(GL_POLYGON);

glVertex3f(-0.5, -0.5, 0);

glVertex3f(-0.5, 0.5, 0);

glVertex3f(0.5, 0.5, 0);

glVertex3f(0.5, -0.5, 0);

glEnd();

glFlush();

}

void init()

{

glClearColor (1, 1, 1, 0.0);

glColor3f(0, 0, 0);

glMatrixMode (GL_PROJECTION);

glLoadIdentity ();

glOrtho(-10.0, 10.0, -10.0, 10.0, -10.0, 10.0);

glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0);

}

int main(int argc, char** argv)

{

glutInit(&argc,argv);

glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);

glutInitWindowSize(400,400);

glutInitWindowPosition(0,0);

glutCreateWindow("simple");

glutDisplayFunc(display);

init();

glutMainLoop();

}

nape ek jd cmni? kat projek properties tu sy da add die pnye dependencies (GLUT32.lib OpenGL32.lib glu32.lib ).

sy da letak sume lib (glut32.lib, glu32.lib, opengl32.lib) dan header file (glut.h, glu.h, glut32.h)

kat dalam "C:\Program Files\Microsoft Visual Studio 8\VC\lib" dan "C:\Program Files\Microsoft Visual Studio 8\VC\include".

pastu sy letak fail glut32.dll kat dalam system32.

cmne ek nak ilangkan error ni?

harap abang2 n akak2 sume dpt tolong sy sbb sy nak sgt2 blajar opengl ni. :unsure:

Edited by biskut_merry

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...