As I just have read _wfopen is not supported in linux. So the quick and
dirty solution could be to exclude this method if compiling in unix like
systems.
#ifndef __unix__
FWriteBufferFlusher::FWriteBufferFlusher( const wchar_t* fileName, size_t
bufferSize, const wchar_t* mode/*=L"wb"*/ )
{
....
..
..
}
#endif
_fseeki64
_ftelli64
could be replaced by fseek and ftell.
#ifdef __unix__
#define _FILE_OFFSET_BITS 64
#define _ftelli64 ftell
#define _fseeki64 fseek
typedef long off_t;
#endif
after all these fixes the library finally has compiled. The question is how
to check if it still works correct?
My code seems to work fine so far...
Looks like a good set of changes. I suggest you create a patch out of those
and attach it to the issue. The CMake patch is necessary for all platforms.
ok. I will in a couple of days.
Here is my patch to fix CMake project. I checked it in Ubuntu 32,64, Mac 64
and Win 32.
Attachments:
cross_compiling.patch 8.5 KB
Hi Alexey,
Just tried your patch here (debian64), it still gives me this error when
compiling:
/home/yorik/Sources/collada/common/libBuffer/src/CommonCharacterBuffer.cpp:18:24:
fatal
error: ConvertUTF.h: No such file or directory
Although both the Externals/UTF CMakeFile.txt and the main CMakeFile.txt
contain the modifications listed in your first post... Not sure of the way
to solve this... Any idea?
Thanks
Yorik
probably I forgot something, let me check
Dear Yorik,
Could you try this one?
Everything should be fine this time.
Alexey
Attachments:
cross_compiling_v2.patch 12.4 KB
V2 worked 100% perfect! Thanks a lot!
You are welcome! I hope it will be added to the new revision.
Comment #12 on issue 172 by opencollada: CMake project doesn't compile in
Linux any more!
http://code.google.com/p/opencollada/issues/detail?id=172
testing now
How is testing going on? Are their any problems with the patch?
Comment #14 on issue 172 by ideasma...@gmail.com: CMake project doesn't
compile in Linux any more!
http://code.google.com/p/opencollada/issues/detail?id=172
Hi I got opencollada building before reading this, but think we found most
of the same issues - try building r860.
The one remaining problem is "_wfopen", I read up on this and from what I
can tell unix systems just don't use wchar_t for open commands, though if
its important we could have our own _wfopen implimentation. For now I
commented this function.
That's correct there is no _wfopen for w_char.
In the patch above I used narrow to convert w_char to char in a
controllable way.
It compiles, thanks.