qualche problema di compilazione,
import_stl.h in vcg/wrap/io_trimesh usa una funzione e relativo include
che esistono solo per windows (e dos).
Di seguito c'e' il diff di una maniera che *dovrebbe* essere un po' piu'
portabile (credo, non ho ho potuto testare)
---- INIZIO DIFF -----
Index: import_stl.h
===================================================================
RCS file: /cvsroot/vcg/vcg/wrap/io_trimesh/import_stl.h,v
retrieving revision 1.12
diff -u -r1.12 import_stl.h
--- import_stl.h 3 May 2006 21:19:34 -0000 1.12
+++ import_stl.h 31 May 2006 18:54:11 -0000
@@ -60,8 +60,6 @@
#ifndef __VCGLIB_IMPORT_STL
#define __VCGLIB_IMPORT_STL
-
-#include <io.h>
#include <stdio.h>
#include <wrap/callback.h>
#include <vcg/complex/trimesh/allocate.h>
@@ -212,10 +210,14 @@
/* Skip the first line of the file */
while(getc(fp) != '\n');
-
+
STLFacet f;
int cnt=0;
- int fileLen=_filelength(_fileno(fp));
+ long currentPos = ftell(fp);
+ fseek(fp,0L,SEEK_END);
+ int fileLen= ftell(fp);
+ fseek(fp,currentPos,SEEK_SET);
+
/* Read a single facet from an ASCII .STL file */
while(!feof(fp))
{
---------- FINE DIFF --------
inoltre da' un altro problema
mario@ath64:~/src/meshlab/src/meshlabplugins/meshio$ make CC=gcc-3.3
CXX=g++-3.3 LINK=gcc-3.3
make -f Makefile.Debug
make[1]: Entering directory
`/home/mario/src/meshlab/src/meshlabplugins/meshio'
g++-3.3 -c -pipe -g -w -D_REENTRANT -fPIC -DQT_PLUGIN -DQT_GUI_LIB
-DQT_CORE_LIB -I/usr/share/qt4/mkspecs/linux-g++ -I.
-I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4
-I../.. -I../../../../sf -I../../../../code/lib/glew/include
-I../../../../code/lib/lib3ds-1.2.0 -Idebug -I. -o debug/meshio.o meshio.cpp
../../../../sf/vcg/simplex/faceplus/component_ocf.h: In function `bool
vcg::tri::HasPerFaceColor(const vcg::tri::TriMesh<VertContainerType,
vcg::face::vector_ocf<FaceType> >&) [with VertContainerType =
std::vector<CVertexO, std::allocator<CVertexO> >, FaceType = CFaceO]':
../../../../sf/wrap/io_trimesh/io_mask.h:123: instantiated from
`static void vcg::tri::io::Mask::ClampMask(MeshType&, int&) [with
MeshType = CMeshO]'
../../../../sf/wrap/io_trimesh/import_obj.h:248: instantiated from
`static int vcg::tri::io::ImporterOBJ<OpenMeshType>::Open(OpenMeshType&,
const char*, vcg::tri::io::ImporterOBJ<OpenMeshType>::Info&) [with
OpenMeshType = CMeshO]'
meshio.cpp:124: instantiated from here
../../../../sf/vcg/simplex/faceplus/component_ocf.h:451: error: 'class
CFaceO'
has no member named 'HasFaceColorOcf'
make[1]: *** [debug/meshio.o] Error 1
make[1]: Leaving directory
`/home/mario/src/meshlab/src/meshlabplugins/meshio'
make: *** [debug] Error 2
mario@ath64:~/src/meshlab/src/meshlabplugins/meshio$
|