Page 1 of 2

Wrong emitter descriptor on mac

PostPosted: Thu Dec 06, 2018 1:03 pm
by bergen
Hi
I have some simple test project on Windows (working) and on Mac (not working). The issue is the descriptor returned by Magic_OpenStream (or in other version - by Magic_OpenFile).

In windows it works correctly - it returns for example 1 and is set as index.
On Mac the same code returns length of the file (150994953) and this is set as descriptor, and the as index and obviously does not work properly.
What could be the problerm?

Re: Wrong emitter descriptor on mac

PostPosted: Thu Dec 06, 2018 1:10 pm
by Odin_KG
Hi

Are you sure, that you have the same version for Mac and Win ?
For example, new version does not return 1. But it may return the digit 150994953.

Re: Wrong emitter descriptor on mac

PostPosted: Thu Dec 06, 2018 1:12 pm
by bergen
Hmm ok I will make sure. Code is the same, but library (dylib) might be newer on Mac then it is on Windows. Is there site with older versions? Where on Mac it would return small numbers like 1? Or just newest versions are available? I'm talking about dylib library.

Re: Wrong emitter descriptor on mac

PostPosted: Thu Dec 06, 2018 2:19 pm
by Odin_KG
Code is the same, but library (dylib) might be newer on Mac then it is on Windows.

I am sure that you have old Windows version.

Is there site with older versions?

I do not save all old versions.There is version 3.45.

New version has multithreading, I advice use new version. The wrapper was changed too.

Re: Wrong emitter descriptor on mac

PostPosted: Thu Dec 06, 2018 2:40 pm
by bergen
Thanks! I will do that!

Re: Wrong emitter descriptor on mac

PostPosted: Thu Dec 06, 2018 2:55 pm
by Odin_KG
Thanks! I will do that!

You are welcome!

Re: Wrong emitter descriptor on mac

PostPosted: Fri Dec 07, 2018 1:19 pm
by bergen
Ok, slowly I got it working :) But now I have this linker issue at the end:

Undefined symbols for architecture x86_64:
"FreeTexture(unsigned char*)", referenced from:
MP_Atlas_WRAP::MP_Atlas_WRAP(int, int, char const*) in mp_wrap.o
MP_Atlas_WRAP::LoadTexture(MAGIC_CHANGE_ATLAS const*) in mp_wrap.o
"LoadTextureFromFile(MP_Manager*, char const*, int*, int*)", referenced from:
MP_Atlas_WRAP::MP_Atlas_WRAP(int, int, char const*) in mp_wrap.o
MP_Atlas_WRAP::LoadTexture(MAGIC_CHANGE_ATLAS const*) in mp_wrap.o
"LoadTextureFromMemory(unsigned char const*, int, int*, int*)", referenced from:
MP_Atlas_WRAP::LoadTexture(MAGIC_CHANGE_ATLAS const*) in mp_wrap.o
ld: symbol(s) not found for architecture x86_64

Any help? dylib is new, mp_wrap from the same archive...

Re: Wrong emitter descriptor on mac

PostPosted: Fri Dec 07, 2018 6:21 pm
by Odin_KG
It is possible, you mixed 2 wrappers. Did you copy folder "_core" too ?

Re: Wrong emitter descriptor on mac

PostPosted: Tue Dec 11, 2018 11:10 am
by bergen
Ok, indeed I had mixed files from windows and mac. Now everything is set correctly and I moved on.
However I have one more issue - in mp::render

void* context = Magic->PrepareRenderArrays(..)

it weirdly "hangs" on this line. I mean it goes further, andcode exectutes, but nothing happens and the app is not working actually. When I comment this line (and few below, where "context" is being used) it works fine (but without particles).

Re: Wrong emitter descriptor on mac

PostPosted: Tue Dec 11, 2018 11:24 am
by Odin_KG
There is my wrapper for Mac. At first, you need to launch it. I assume my wrapper will be working fine. At second, you need to add my wrapper to your program. If you mix different parts of several wrappers the result will be any.