Skip to main content
GameDev.net gamedev.net
🔒 Locked

Compilation errors (FCollada)

Started by Deliverance Jul 16, 2008 at 10:34 AM 0 replies 2.7k views
Original Post
Deliverance
Deliverance
I just compiled the FCollada library( to do so i commented the lines:

#if defined(_MSC_VER) || defined(__MINGW32__)
#define mkdir(p,m) _mkdir(p)
#define snprintf _snprintf
#define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
#endif


in libxml/config.h and libxml/win32config.h otherwise i was having a lot of errors regarding vsnprintf and snprintf). The problem is i cannot compile a test example because i get a lot of compile errors. Here is the example:

#include <stdio.h>

#include "FCDocument/FCDocument.h"
#include "FCDocument/FCDLibrary.h"
#include "FCDocument/FCDGeometry.h"
#include "FCDocument/FCDGeometryMesh.h"
#include "FCDocument/FCDGeometryPolygons.h"
#include "FCDocument/FCDGeometryPolygonsInput.h"
#include "FCDocument/FCDGeometryPolygonsTools.h"

int main()
{

	FUErrorSimpleHandler errorHandler;

	// Import of the Eagle sample and retrieve its mesh.
	FUObjectRef<FCDocument> document = FCollada::NewTopDocument();
	PassIf(FCollada::LoadDocumentFromFile(document, FC("Eagle.DAE")));
	PassIf(errorHandler.IsSuccessful());
	FailIf(document->GetGeometryLibrary()->GetEntityCount() == 0);
	FCDGeometry* geometry = document->GetGeometryLibrary()->GetEntity(0);
	FailIf(geometry == NULL || !geometry->IsMesh());
	FCDGeometryMesh* mesh = geometry->GetMesh();
	FailIf(mesh == NULL);
	PassIf(mesh->GetPolygonsCount() == 1);
	size_t originalInputCount = mesh->GetPolygons(0)->GetInputCount();
	PassIf(originalInputCount > 0);
	FCDGeometryPolygonsTools::FitIndexBuffers(mesh, 90);

	// Verify the output.
	PassIf(mesh->GetPolygonsCount() == 3);
	size_t expectedCounts[3] = { 90, 90, 72 };
	for (size_t i = 0; i < 3; ++i)
	{
		FCDGeometryPolygons* p = mesh->GetPolygons(i);
		PassIf(p->GetFaceVertexCount() == expectedCounts);
		size_t inputCount = p->GetInputCount();
		PassIf(originalInputCount == inputCount); // Make sure no inputs were lost.
		for (size_t k = 0; k < inputCount; ++k)
		{
			FCDGeometryPolygonsInput* input = p->GetInput(k);
			PassIf(input->GetIndexCount() == expectedCounts);
		}
	}

	return 0;
}


and here are the errors

------ Build started: Project: collada_importer, Configuration: Debug Win32 ------
Compiling...
main.cpp
c:\program files\microsoft visual studio 9.0\vc\include\futils\fuobjecttype.h(31) : error C2470: 'FUObjectType' : looks like a function definition, but there is no parameter list; skipping apparent body
c:\program files\microsoft visual studio 9.0\vc\include\futils\fuobject.h(31) : error C2470: 'FUObject' : looks like a function definition, but there is no parameter list; skipping apparent body
c:\program files\microsoft visual studio 9.0\vc\include\futils\fuobject.h(106) : error C2061: syntax error : identifier 'FUObject'
c:\program files\microsoft visual studio 9.0\vc\include\futils\fuobject.h(112) : error C2061: syntax error : identifier 'FUObject'
c:\program files\microsoft visual studio 9.0\vc\include\futils\fuobject.h(125) : error C2061: syntax error : identifier 'FUObject'
c:\program files\microsoft visual studio 9.0\vc\include\futils\fuobject.h(106) : error C2065: 'object' : undeclared identifier
c:\program files\microsoft visual studio 9.0\vc\include\futils\fuobject.h(106) : error C2227: left of '->SetObjectOwner' must point to class/struct/union/generic type
        type is ''unknown-type''
c:\program files\microsoft visual studio 9.0\vc\include\futils\fuobject.h(115) : error C2065: 'object' : undeclared identifier
c:\program files\microsoft visual studio 9.0\vc\include\futils\fuobject.h(115) : error C2227: left of '->objectOwner' must point to class/struct/union/generic type
        type is ''unknown-type''
c:\program files\microsoft visual studio 9.0\vc\include\futils\fuobject.h(115) : error C2059: syntax error : 'return'
c:\program files\microsoft visual studio 9.0\vc\include\futils\fuobject.h(116) : error C2065: 'object' : undeclared identifier
c:\program files\microsoft visual studio 9.0\vc\include\futils\fuobject.h(116) : error C2227: left of '->SetObjectOwner' must point to class/struct/union/generic type
        type is ''unknown-type''
c:\program files\microsoft visual studio 9.0\vc\include\futils\fuobject.h(115) : error C3861: 'FUAssert': identifier not found
c:\program files\microsoft visual studio 9.0\vc\include\futils\fuobject.h(134) : error C2065: 'FUObject' : undeclared identifier
c:\program files\microsoft visual studio 9.0\vc\include\futils\fuobject.h(134) : error C2065: 'object' : undeclared identifier
c:\program files\microsoft visual studio 9.0\vc\include\futils\fuobject.h(134) : error C2433: 'DynamicCast' : 'inline' not permitted on data declarations
c:\program files\microsoft visual studio 9.0\vc\include\futils\fuobject.h(134) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Build log was saved at "file://c:\Projects\collada_importer\collada_importer\Debug\BuildLog.htm"
collada_importer - 17 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


jffortin
jffortin
Hi,

Never had any similar error... and never had to modify any files to make it work. What version are you trying to compile?

The only thing I did was to define "NO_LIBXML" and set the include directories. Just post more information about the environment I can probably provide free support for something like that since they stopped providing it [wink][wink].

Can you tell me what you have done at the moment (defines, include dirs)? Which configuration of FCollada are you compiling?

JFF

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.