Commit 3b709df8 authored by Luis Penaranda's avatar Luis Penaranda

compiles (but doesn't work) on windows with msvc

parent 765788b1
...@@ -14,9 +14,13 @@ ...@@ -14,9 +14,13 @@
#ifdef _WIN32 #ifdef _WIN32
#include <direct.h> #include <direct.h>
#define GET_WORKDIR _getcwd #define GET_WORKDIR _getcwd
#define OPEN_FILE _open
#define LSEEK_FD _lseek
#else #else
// unistd was included above // unistd was included above
#define GET_WORKDIR getcwd #define GET_WORKDIR getcwd
#define OPEN_FILE open
#define LSEEK_FD lseek
#endif #endif
#define PROGNAME "pano_interface" #define PROGNAME "pano_interface"
...@@ -614,8 +618,8 @@ char * OpenGLCanvas::textFileRead(char *fn) { ...@@ -614,8 +618,8 @@ char * OpenGLCanvas::textFileRead(char *fn) {
FILE *fp; FILE *fp;
char *content = NULL; char *content = NULL;
int f, count; int f, count;
f = open(fn, O_RDONLY); f = OPEN_FILE(fn, O_RDONLY);
count = lseek(f, 0, SEEK_END); count = LSEEK_FD(f, 0, SEEK_END);
// close(f); // close(f);
if (fn != NULL) { if (fn != NULL) {
fp = fopen(fn,"rt"); fp = fopen(fn,"rt");
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
#include<Glut/glut.h> #include<Glut/glut.h>
#include<OpenGL/glext.h> #include<OpenGL/glext.h>
#else #else
#include <GL/gl.h> //#include <GL/gl.h>
#include <GL/glu.h> //#include <GL/glu.h>
#include <GL/glut.h> #include <GL/glut.h>
// is glext really needed? // is glext really needed?
//#include <GL/glext.h> //#include <GL/glext.h>
......
...@@ -23,9 +23,15 @@ LIBS += -lm -lglut -lGL -lGLEW -lnetpbm ...@@ -23,9 +23,15 @@ LIBS += -lm -lglut -lGL -lGLEW -lnetpbm
win32 { win32 {
DEFINES += GLEW_STATIC DEFINES += GLEW_STATIC
INCLUDEPATH += "C:/Program Files (x86)/GnuWin32/include/" DEFINES += _CRT_SECURE_NO_WARNINGS
LIBS += -L"C:/Program Files (x86)/GnuWin32/lib/" INCLUDEPATH += "C:/Program Files (x86)/glew-1.5.2/include"
LIBS += -lfreeglut -llibnetpbm10 -lglu32 -lopengl32 -lglew32 DEPENDPATH += "C:/Program Files (x86)/glew-1.5.2/include"
INCLUDEPATH += "C:/Program Files (x86)/GnuWin32/include"
DEPENDPATH += "C:/Program Files (x86)/GnuWin32/include"
LIBS += -L"C:/Program Files (x86)/GnuWin32/lib"
LIBS += -lglu32 -lopengl32 -lfreeglut -llibnetpbm10
LIBS += -L"C:/Program Files (x86)/glew-1.5.2/lib"
LIBS += -lglew32s
} }
TARGET = pano_interface_1 TARGET = pano_interface_1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment