leadedge / ofxNDI

An Openframeworks addon to allow sending and receiving images over a network using the NewTek Network Device Protocol.
GNU General Public License v3.0
134 stars 48 forks source link

ofxNDIutils, rgba_bgra and rgba_bgra_sse2 don't compile in macOS #34

Closed dimitre closed 2 years ago

dimitre commented 2 years ago

compiler complain about this lines

auto source = static_cast<const unsigned __int32*>(rgba_source);; // unsigned int = 4 bytes
auto dest = static_cast<unsigned __int32*>(bgra_dest);

I've tried to change to

auto source = static_cast<const uint32_t*>(rgba_source);; // unsigned int = 4 bytes
auto dest = static_cast<uint32_t*>(bgra_dest);

and it compiles ok now. not sure if it is correct. maybe we can use a typedef or something in macOS Thanks

leadedge commented 2 years ago

Thanks Dimitre. uint32_t should be OK throughout. I will check it.

leadedge commented 2 years ago

Changes are now in Master branch. I will update from there if any problems remain.

dimitre commented 2 years ago

I have some errors here, and I've noticed example sources are outside src/ folders too Screen Shot 2022-07-04 at 11 16 58

leadedge commented 2 years ago

I removed the duplicate example files in the src folders instead of the other way around. I have pushed a change. I aim to remove the testing branch when all is done.

I don't know why you see these errors when they did not appear before. ofGetWin32Window() is an Openframeworks function so that's unusual. All I can suggest at the moment is to put the following in ofApp.h

include

include

dimitre commented 2 years ago

I'm using macOS so there are some specific things to windows that doesn't run here, like ofGetWin32Window()

leadedge commented 2 years ago

OK I understand. Just remove that line and see how it goes.