simonredfern In file serialosc_example/serialosc_example/osckpack/ip/posix/NetworkingUtils.cpp: 'ip/NetworkingUtils.h' file not found column: 10, line: 37 -
that has two reasons: the file says:
#include "ip/NetworkingUtils.h"
which would normally semantically mean that there is an ip/
folder included in the current folder which contains a file NetworkingUtils.h
(i.e.: in serialosc_example/osckpack/ip/posix/ip/NetworkingUtils.h
). However, the file is in serialosc_example/osckpack/ip/NetworkingUtils.h
, so it is not found. You could modify the path so that it goes back up one folder, i.e.: #include "../NetworkingUtils.h"
), or - better (because it addresses the same issue with other files (if any)) - adding proper include paths to the Make parameters
entry in the project settings : CPPFLAGS=-I serialosc_example/serialosc_example/osckpack
.
HOWEVER, you won't be able to build this project through the IDE as it is because it will try to build all .cpp files in the project but the files in the win32
folder include some Windows-specific header files, so you will at least need to delete that folder.
I can build serialosc_example
by placing in serialosc_example/serialosc_example
the following file called Makefile
CPPFLAGS = -Iosckpack -pthread -Wno-psabi
CC=$(CXX) # for the linker
LDLIBS=-lpthread
OBJS:= \
./SerialOsc.o \
./osckpack/ip/IpEndpointName.o \
./osckpack/ip/posix/UdpSocket.o \
./osckpack/ip/posix/NetworkingUtils.o \
./osckpack/osc/OscPrintReceivedElements.o \
./osckpack/osc/OscOutboundPacketStream.o \
./osckpack/osc/OscReceivedElements.o \
./osckpack/osc/OscTypes.o \
./serialosc_example.o
serialosc_example: $(OBJS)
then you can cd
into that directory (NOT via the Bela IDE) and type make
to build it and ./serialosc_example
to run it. Play around with it a bit.
Now that you have the program building, what do you want to do it? How do you want to integrate it with a Bela program? To create a Bela program that will build through the IDE without need for extra Make parameters
, you should organise the files as follows:
projects/oscserial_bela/SerialOsc.h
projects/oscserial_bela/UdpSocket.cpp
projects/oscserial_bela/NetworkingUtils.cpp
projects/oscserial_bela/SerialOsc.cpp
projects/oscserial_bela/MessageMappingOscPacketListener.h
projects/oscserial_bela/MonomeDevice.h
projects/oscserial_bela/ip/IpEndpointName.h
projects/oscserial_bela/ip/TimerListener.h
projects/oscserial_bela/ip/NetworkingUtils.h
projects/oscserial_bela/ip/UdpSocket.h
projects/oscserial_bela/ip/IpEndpointName.cpp
projects/oscserial_bela/ip/PacketListener.h
projects/oscserial_bela/osc/OscPrintReceivedElements.cpp
projects/oscserial_bela/osc/OscException.h
projects/oscserial_bela/osc/OscOutboundPacketStream.cpp
projects/oscserial_bela/osc/OscHostEndianness.h
projects/oscserial_bela/osc/OscReceivedElements.cpp
projects/oscserial_bela/osc/OscTypes.h
projects/oscserial_bela/osc/OscReceivedElements.h
projects/oscserial_bela/osc/OscPrintReceivedElements.h
projects/oscserial_bela/osc/OscOutboundPacketStream.h
projects/oscserial_bela/osc/OscTypes.cpp
projects/oscserial_bela/osc/OscPacketListener.h
projects/oscserial_bela/serialosc_example.cpp
note that running this project from the IDE you won't be able to interact with it via the keyboard because the console at the bottom is not interactive.
Anyhow, once this builds in the IDE, you can add a render.cpp
(or add its contents to serialosc_example.cpp
) and (IMPORTANT) rename the main()
function which is in that file at the moment to something else.