yvonneysf / opencollada

Automatically exported from code.google.com/p/opencollada
0 stars 0 forks source link

Compilation issues on Linux introduced by commit r846 #174

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Just compile the project on Linux

What version of the product are you using? On what operating system?
I am running Arch Linux with GCC 4.6.1 with the revision 846 of OpenCollada.
I tried to compile trough AUR package opencollada-svn:
https://aur.archlinux.org/packages.php?ID=51534

Please provide any additional information below.

Everything is about revision 846 which is incompatible with Linux and probably 
MacOS too. r845 compilation run nicely.

ConvertUTF.h has been included in CommonCharacterBuffer.cpp but the 
CMakeLists.txt should be updated accordingly with the inclusion of libUTF 
header path.

Some header inclusions like:
CommonIBufferFlusher.h:14  #include <stdlib.h>
CommonFWriteBufferFlusher.cpp:13  #include <cstdio>
CommonFWriteBufferFlusher.cpp:14  #include <errno.h>
are removed but they are needed for me as they are not implicitly included 
trough Windows library arcanes on my plateform.

Some types like __int64 are Windows specific. Generally, you should prefer 
int64_t standard type from stdint.h. However in the current use, you should 
consider off_t (see below).

Constructor FWriteBufferFlusher( const wchar_t* fileName, size_t bufferSize = 
DEFAUL_BUFFER_SIZE, const wchar_t* mode=L"wb" ) was commented in the source 
code. It has been uncommented. It rely on functions such as _wfopen which are 
Windows specific. Such functions for handling wide path don’t exist in Unix 
world.

Functions like _ftelli64 and _fseeki64 don’t exist too on Linux. You should 
use some code like this to keep the compatibility:
#if /* linux */
#define _FILE_OFFSET_BITS 64
#endif

#include <stdio.h>

#if /* windows */
#define fseeko _fseeki64
#define ftello _ftelli64
typedef __int64 off_t;
#endif
and then you can use fseeko, ftello and off_t instead of _fseeki64, _ftelli64 
and __int64 while keeping the compatibility.

I didn’t try to fix everything to get the project compiling therefore there 
could be some other pitfalls.

Many thanks.

Original issue reported on code.google.com by gregoire.dlg@gmail.com on 23 Sep 2011 at 10:10

GoogleCodeExporter commented 8 years ago
Hi!
Please try patch from this thread? 
http://code.google.com/p/opencollada/issues/detail?id=172&colspec=ID%20Defect%20
Type%20Status%20Priority%20Owner%20Summary

This should resolve problems.

best regards,
Alexey

Original comment by Alexey.Z...@gmail.com on 2 Oct 2011 at 4:45

GoogleCodeExporter commented 8 years ago
fixed in svn.

Original comment by ideasma...@gmail.com on 14 Oct 2011 at 1:03