Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualCoro

Posted 23 September 2012 - 11:51 AM

Hey Everyone

I'm currently having a problem with some libraries that I'm trying to import into my project. I have created an OBJ Loader in which you can load the contents of an "obj" file into some C arrays, which then passed into OpenGL (Glut) to render to the screen. My problem is that I have certain libraries conflicting with each other. Glut requires "windows.h" for the "gl.h" file. But I also need some other standard libraries such as:

<SDL>
<cstdlib>
<vector>
<string>
<algorithm>
<fstream>
<cstdio>
<stdlib.h>
<stdio.h>
<assert.h>

So all together my code looks like this:

#include <SDL/SDL.h>
#include <cstdlib>
#include <vector>
#include <string>
#include <algorithm>
#include <fstream>
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <cstdio>
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#endif
#include <GL/glut.h>

From this I get a whole load of errors:

http://imagebin.org/229514

Any help will be appreciated!

P.s. I know that its conflictions between the libraries but I don't know what things to undefine.

#2Coro

Posted 23 September 2012 - 11:50 AM

Hey Everyone

I'm currently having a problem with some libraries that I'm trying to import into my project. I have created an OBJ Loader in which you can load the contents of an "obj" file into some C arrays, which then passed into OpenGL (Glut) to render to the screen. My problem is that I have certain libraries conflicting with each other. Glut requires "windows.h" for the "gl.h" file. But I also need some other standard libraries such as:

<SDL>
<cstdlib>
<vector>
<string>
<algorithm>
<fstream>
<cstdio>
<stdlib.h>
<stdio.h>
<assert.h>

So all together my code looks like this:

#include <SDL/SDL.h>
#include <cstdlib>
#include <vector>
#include <string>
#include <algorithm>
#include <fstream>
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <cstdio>
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#endif
#include <GL/glut.h>

From this I get a whole load of errors:

http://imagebin.org/229514

Any help will would be appreciated!

P.s. I know that its conflictions between the libraries but I don't know what things to undefine.

#1Coro

Posted 23 September 2012 - 11:47 AM

Hey Everyone

I'm currently having a problem with some libraries that I'm trying to import into my project. I have created an OBJ Loader in which you can load the contents of an "obj" file into some C arrays, which then passed into OpenGL (Glut) to render to the screen. My problem is that I have certain libraries conflicting with each other. Glut requires "windows.h" for the "gl.h" file. But I also need some other standard libraries such as:

<SDL>
<cstdlib>
<vector>
<string>
<algorithm>
<fstream>
<cstdio>
<stdlib.h>
<stdio.h>
<assert.h>

So all together my code looks like this:

#include <SDL/SDL.h>
#include <cstdlib>
#include <vector>
#include <string>
#include <algorithm>
#include <fstream>
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <cstdio>
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#endif
#include <GL/glut.h>

From this I get a whole load of errors:

http://imagebin.org/229514

Anyhow will would be appreciated!

P.s. I know that its conflictions between the libraries but I don't know what things to undefine.

PARTNERS