0

I have to solve this question in vs2012. title said.I included SOIL.h file in the header.

but when I debug the programming.it said this error.I am using SOIL to draw something.

help me...please... xd

Code Below:

#include <stdio.h>
#include <windows.h>
#include <conio.h>
#include <math.h>
#include <GL\glut.h>
#include <GL\GL.h>
#include <GL\GLU.h>
#include <SOIL.h>

int main(int argc,char *argv[])
{
  float pixels[]={
  0.0f, 0.0f, 0.0f,   1.0f, 1.0f, 1.0f,
  1.0f, 1.0f, 1.0f,   0.0f, 0.0f, 0.0f
};

glTexImage2D(GL_TEXTURE_2D,0,GL_RGB,2,2,0,GL_RGB,GL_FLOAT,pixels);

int width,height;
unsigned char * image=SOIL_load_image("img.png", &width, &height, 0, SOIL_LOAD_RGB);

glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB,
          GL_UNSIGNED_BYTE, image);
 }
Youku KMSFan
  • 67
  • 2
  • 12
  • [What is an undefined reference/unresolved external symbol error and how do I fix it?: Failure to link against appropriate libraries/object files or compile implementation files](http://stackoverflow.com/a/12574400/902497) – Raymond Chen Sep 11 '14 at 09:08

1 Answers1

0

everyone ,i solved it by myself.

import soil project(your downloaded) projects->vc8.0 to your current solution.

then make a new reference from the project.

you need not to add anything in properties->linker.

just make a new reference from that folder.

Youku KMSFan
  • 67
  • 2
  • 12