Issue 174 in opencollada: Compilation issues on Linux introduced by commit r846

1 view
Skip to first unread message

openc...@googlecode.com

unread,
Sep 23, 2011, 6:11:02 PM9/23/11
to opencolla...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 174 by gregoire.dlg: Compilation issues on Linux introduced by
commit r846
http://code.google.com/p/opencollada/issues/detail?id=174

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.

openc...@googlecode.com

unread,
Oct 2, 2011, 12:45:49 PM10/2/11
to opencolla...@googlegroups.com

Comment #1 on issue 174 by Alexey.Z...@gmail.com: Compilation issues on

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

This should resolve problems.

best regards,
Alexey

openc...@googlecode.com

unread,
Oct 13, 2011, 9:03:43 PM10/13/11
to opencolla...@googlegroups.com
Updates:
Status: Fixed

Comment #2 on issue 174 by ideasma...@gmail.com: Compilation issues on

fixed in svn.

Reply all
Reply to author
Forward
0 new messages