project-navigation
Personal tools

Author Topic: Unable to compile ufo2map  (Read 4034 times)

Offline lfloden

  • Rookie
  • ***
  • Posts: 68
    • View Profile
Unable to compile ufo2map
« on: December 23, 2006, 04:26:41 am »
Get this error

  [Linker error] undefined reference to `ConvertBSPToASE'

Obviously its missing.

Offline lfloden

  • Rookie
  • ***
  • Posts: 68
    • View Profile
That error is gone, but now get a new one
« Reply #1 on: December 31, 2006, 06:36:18 pm »
Now I get this when trying to compile it.

../../src/tools/ufo2map/convert_ase.c: In function `ConvertSurface':
../../src/tools/ufo2map/convert_ase.c:48: warning: unused variable `i'
../../src/tools/ufo2map/convert_ase.c:48: warning: unused variable `v'
../../src/tools/ufo2map/convert_ase.c:48: warning: unused variable `face'
../../src/tools/ufo2map/convert_ase.c:48: warning: unused variable `a'
../../src/tools/ufo2map/convert_ase.c:48: warning: unused variable `c'
../../src/tools/ufo2map/convert_ase.c:49: warning: unused variable `normal'

../../src/tools/ufo2map/convert_ase.c: At top level:
../../src/tools/ufo2map/convert_ase.c:220: warning: 'ConvertShader' defined but not used

It causes an error so it won't compile. I can comment out the i,v,face,a,c line and the normal line, it will then compile. But it doesn't work right when then trying to convert the maps. I was looking through the code

   fprintf(f, "\t\t*MESH_NORMALS\t{\r\n");
   for (i = 0; i < ds->numIndexes; i += 3) {
      face = (i / 3);
      a = bspDrawIndexes[i + ds->firstIndex];
      b = bspDrawIndexes[i + ds->firstIndex + 1];
      c = bspDrawIndexes[i + ds->firstIndex + 2];
      VectorCopy(bspDrawVerts[ a ].normal, normal);
      VectorAdd(normal, bspDrawVerts[ b ].normal, normal);
      VectorAdd(normal, bspDrawVerts[ c ].normal, normal);
      if( VectorNormalize( normal, normal))
         fprintf(f, "\t\t\t*MESH_FACENORMAL\t%d\t%f\t%f\t%f\r\n", face, normal[ 0 ], normal[ 1 ], normal[ 2 ] );
   }
   for (i = 0; i < ds->numVerts; i++) {
      v = i + ds->firstVert;
      dv = &bspDrawVerts[ v ];
      fprintf(f, "\t\t\t*MESH_VERTEXNORMAL\t%d\t%f\t%f\t%f\r\n", i, dv->normal[ 0 ], dv->normal[ 1 ], dv->normal[ 2 ] );
   }
   fprintf(f, "\t\t}\r\n" );

And it almost appears that normal should be an array. But it isn't declared that way. I'll admit with all the programming classes I'm taking things have gotten a bit confusing between the different ones. I'm going to have to got the C++ books out and browse through them.

Offline lfloden

  • Rookie
  • ***
  • Posts: 68
    • View Profile
So no one else has this problem?
« Reply #2 on: January 17, 2007, 01:28:35 am »
I still get the same error when trying to compile it.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Unable to compile ufo2map
« Reply #3 on: January 17, 2007, 10:46:56 am »
the code you are diving into is not finished atm

but ufo2map should even compile with those warnings (though they are fixed in latest trunk version)

Offline lfloden

  • Rookie
  • ***
  • Posts: 68
    • View Profile
It does compile now
« Reply #4 on: January 23, 2007, 09:21:33 pm »
But I still get those errors when running compile.pl. And it is on more than just africa and bridge ones now, just about all of them cause it. I did download the map pack and installed it to take care of that problem though.