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 @@
#ifdef _WIN32
#include <direct.h>
#define GET_WORKDIR _getcwd
#define OPEN_FILE _open
#define LSEEK_FD _lseek
#else
// unistd was included above
#define GET_WORKDIR getcwd
#define OPEN_FILE open
#define LSEEK_FD lseek
#endif
#define PROGNAME "pano_interface"
......@@ -614,8 +618,8 @@ char * OpenGLCanvas::textFileRead(char *fn) {
FILE *fp;
char *content = NULL;
int f, count;
f = open(fn, O_RDONLY);
count = lseek(f, 0, SEEK_END);
f = OPEN_FILE(fn, O_RDONLY);
count = LSEEK_FD(f, 0, SEEK_END);
// close(f);
if (fn != NULL) {
fp = fopen(fn,"rt");
......
......@@ -16,8 +16,8 @@
#include<Glut/glut.h>
#include<OpenGL/glext.h>
#else
#include <GL/gl.h>
#include <GL/glu.h>
//#include <GL/gl.h>
//#include <GL/glu.h>
#include <GL/glut.h>
// is glext really needed?
//#include <GL/glext.h>
......
......@@ -23,9 +23,15 @@ LIBS += -lm -lglut -lGL -lGLEW -lnetpbm
win32 {
DEFINES += GLEW_STATIC
INCLUDEPATH += "C:/Program Files (x86)/GnuWin32/include/"
LIBS += -L"C:/Program Files (x86)/GnuWin32/lib/"
LIBS += -lfreeglut -llibnetpbm10 -lglu32 -lopengl32 -lglew32
DEFINES += _CRT_SECURE_NO_WARNINGS
INCLUDEPATH += "C:/Program Files (x86)/glew-1.5.2/include"
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
......
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