简体   繁体   中英

how to compile some code in visual studio in my MAC

I'm running win 7 in virtual machine in my mac (parallels).

I wrote some small code and I try to run it and I get this problem:

C:\\Users\\Administrator\\Documents\\Visual Studio 10\\Projects\\test\\Debug\\test.exe : fatal error LNK1120: 1 unresolved externals

It tells me that he can't find the path in the users.

I check and all the path exists.

what I can do now?!

Edit: Here's the sample code being built:

#include<glut.h> 

void display() 
{ 
  glClear(GL_COLOR_BUFFER_BIT); 
  glFlush(); 
} 

void myinit() 
{ 
  glClearColor(0.,0.,0.,0.); 
  glMatrixMode(GL_PROJECTION); 
  glLoadIdentity(); 
  gluOrtho2D(-5., 5., -5., 5); 
  glMatrixMode(GL_MODELVIEW); 
} 

int main(int argc, char** argv) 
{ 
  glutInit(&argc,argv); 
  glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); 
  glutInitWindowSize(200, 200); 
  glutInitWindowPosition(100, 100); 
  glutCreateWindow("Black Window"); 
  glutDisplayFunc(display); 
  myinit(); 
  glutMainLoop(); 
}

This is not a path problem, this is a linker error.

What linker is telling you is that you need an external library to complete compilation of your code (maybe you're using some function of another library and you forgot to add them in your project parameters).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM