Ciao a tutti.
Sto cercando di compilare un programma scritto dal mio professore di informatica che compila su Linux Ubuntu 10.04 su Mac OS X 10.7.4., che utilizza gli include seguenti:
codice:
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include "wx/glcanvas.h" // Pour combiner wxWidgets et OpenGL
Questo é il mio Makefile:
codice:
CC = g++
CXX = g++
CXXFLAGS = `wx-config --cxxflags`
LDLIBS = `wx-config --libs gl,core,base`
LDLIBS+= -lglut -lGLU -lGL -lXmu -lXi
all: main
main: main.cc
wxWidgets (per Mac) sembra essere correttamente installato. Ho dovuto utilizzare l'opzione -arch=i386.
Questi sono gli errori che ottengo. Sembra che OpenGL non funzioni come dovrebbe:
codice:
g++ `wx-config --cxxflags` main.cc `wx-config --libs gl,core,base` -lglut -lGLU -lGL -lXmu -lXi -o main
In file included from /opt/local/include/wx-2.8/wx/mac/glcanvas.h:4,
from /opt/local/include/wx-2.8/wx/glcanvas.h:60,
from main.cc:5:
/opt/local/include/wx-2.8/wx/mac/carbon/glcanvas.h:49: warning: ‘AGLDrawable’ is deprecated (declared at /System/Library/Frameworks/AGL.framework/Headers/agl.h:47)
/opt/local/include/wx-2.8/wx/mac/carbon/glcanvas.h:53: warning: ‘AGLDrawable’ is deprecated (declared at /System/Library/Frameworks/AGL.framework/Headers/agl.h:47)
main.cc: In member function ‘void Vue_OpenGL::dessine(wxPaintEvent&)’:
main.cc:96: error: ‘gluLookAt’ was not declared in this scope
main.cc: In member function ‘void Vue_OpenGL::InitOpenGL()’:
main.cc:170: error: ‘gluPerspective’ was not declared in this scope
main.cc: In member function ‘virtual bool GUI::OnInit()’:
main.cc:219: error: ‘SetTopWin’ was not declared in this scope
main.cc:219: error: expected primary-expression before ‘==’ token
main.cc:219: error: expected primary-expression before ‘==’ token
main.cc:219: error: expected primary-expression before ‘==’ token
main.cc:219: error: expected primary-expression before ‘/’ token
main.cc:220: error: expected primary-expression before ‘*’ token
main.cc:220: error: expected `;' before ‘{’ token
main.cc:220: error: a function-definition is not allowed here before ‘{’ token
main.cc:220: error: a function-definition is not allowed here before ‘{’ token
main.cc:220: error: expected `}' at end of input
make: *** [main] Error 1