giuliomoro

thanks for your reply! so i restarted the whole process. on the board, the compiler seems to be running fine, i successfully compiled the basic (example) pd patch to the Bela. but in the project i'm workig on, i still get a lot of errors in the link process, (almost all of them got something to do with the render.cpp file, "undefined reference to 'libpd_...') i have recently updated my bela image to 0.3.7a .

root@bela:~/hvcc# make -C ~/Bela PROJECT=NonagonBar_HVCC COMPILER=gcc run
make: Entering directory '/root/Bela'
Killing old Bela process 4140
Building HvMessage.c...
/root/Bela/projects/NonagonBar_HVCC/HvMessage.c: In function 'msg_getHash':
/root/Bela/projects/NonagonBar_HVCC/HvMessage.c:151:7: warning: dereferencing ty             pe-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       return *((hv_uint32_t *) &f);
       ^~~~~~
 ...done

Building HvControlVar.c...
 ...done

Building HvTable.c...
 ...done

Building HvMessagePool.c...
 ...done

Building HvControlBinop.c...
 ...done

Building HvControlCast.c...
 ...done

Building HvControlDelay.c...
 ...done

Building HvControlPack.c...
 ...done

Building HvMessageQueue.c...
 ...done

Building HvControlPrint.c...
 ...done

Building HvUtils.c...
 ...done

Building HvControlSlice.c...
 ...done

Building HvLightPipe.c...
 ...done

Building HvControlSystem.c...
 ...done

Building render.cpp...
/root/Bela/projects/NonagonBar_HVCC/render.cpp: In function 'void render(BelaCon             text*, void*)':
/root/Bela/projects/NonagonBar_HVCC/render.cpp:533:28: warning: comparison betwe             en signed and unsigned integer expressions [-Wsign-compare]
  for(unsigned int n = 0; n < touchSensorMain.numSensors(); ++n)
                          ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/Bela/projects/NonagonBar_HVCC/render.cpp:636:20: warning: comparison betwe             en signed and unsigned integer expressions [-Wsign-compare]
   for(int n = 0; n < context->audioInChannels; ++n)
                  ~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/root/Bela/projects/NonagonBar_HVCC/render.cpp:646:20: warning: comparison betwe             en signed and unsigned integer expressions [-Wsign-compare]
   for(int n = 0; n < context->analogInChannels; ++n)
                  ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/Bela/projects/NonagonBar_HVCC/render.cpp:719:20: warning: comparison betwe             en signed and unsigned integer expressions [-Wsign-compare]
   for(int n = 0; n < context->audioOutChannels; ++n)
                  ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/Bela/projects/NonagonBar_HVCC/render.cpp:729:20: warning: comparison betwe             en signed and unsigned integer expressions [-Wsign-compare]
   for(int n = 0; n < context->analogOutChannels; ++n)
                  ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ...done

Building HeavyContext.cpp...
 ...done

Building HvHeavy.cpp...
/root/Bela/projects/NonagonBar_HVCC/HvHeavy.cpp:24:0: warning: ignoring #pragma              mark  [-Wunknown-pragmas]
 #pragma mark - Heavy Table

/root/Bela/projects/NonagonBar_HVCC/HvHeavy.cpp:45:0: warning: ignoring #pragma              mark  [-Wunknown-pragmas]
 #pragma mark - Heavy Message

/root/Bela/projects/NonagonBar_HVCC/HvHeavy.cpp:127:0: warning: ignoring #pragma              mark  [-Wunknown-pragmas]
 #pragma mark - Heavy Common

/root/Bela/projects/NonagonBar_HVCC/HvHeavy.cpp:294:0: warning: ignoring #pragma              mark  [-Wunknown-pragmas]
 #pragma mark - Heavy Common

 ...done

Building Heavy_bela.cpp...
 ...done

Extracting dependencies of library Midi
Extracting dependencies of library Scope
Extracting dependencies of library Trill
Extracting dependencies of library UdpServer
Linking...
/root/Bela/projects/NonagonBar_HVCC/build/render.o: In function `fdLoop(void*)':
render.cpp:(.text+0x102): undefined reference to `sys_doio'
/root/Bela/projects/NonagonBar_HVCC/build/render.o: In function `render':
render.cpp:(.text+0x738): undefined reference to `libpd_start_message'
render.cpp:(.text+0x750): undefined reference to `libpd_add_float'
render.cpp:(.text+0x766): undefined reference to `libpd_finish_message'
render.cpp:(.text+0x964): undefined reference to `libpd_sysrealtime'
render.cpp:(.text+0x994): undefined reference to `libpd_pitchbend'
render.cpp:(.text+0x9ae): undefined reference to `libpd_aftertouch'
render.cpp:(.text+0x9c8): undefined reference to `libpd_programchange'
render.cpp:(.text+0x9e6): undefined reference to `libpd_controlchange'
render.cpp:(.text+0xa04): undefined reference to `libpd_polyaftertouch'
render.cpp:(.text+0xa96): undefined reference to `libpd_noteon'
render.cpp:(.text+0xab6): undefined reference to `libpd_noteon'
render.cpp:(.text+0xfa4): undefined reference to `libpd_process_sys'
render.cpp:(.text+0x14e8): undefined reference to `libpd_write_array'
/root/Bela/projects/NonagonBar_HVCC/build/render.o: In function `cleanup':
render.cpp:(.text+0x15ec): undefined reference to `libpd_closefile'
/root/Bela/projects/NonagonBar_HVCC/build/render.o: In function `Bela_messageHoo             k(char const*, char const*, int, _atom*)':
render.cpp:(.text+0x1798): undefined reference to `libpd_get_float'
render.cpp:(.text+0x17c2): undefined reference to `libpd_is_float'
render.cpp:(.text+0x1834): undefined reference to `libpd_is_float'
render.cpp:(.text+0x183e): undefined reference to `libpd_get_float'
render.cpp:(.text+0x186e): undefined reference to `libpd_is_symbol'
render.cpp:(.text+0x1ff2): undefined reference to `libpd_get_symbol'
/root/Bela/projects/NonagonBar_HVCC/build/render.o: In function `setup':
render.cpp:(.text+0x23e2): undefined reference to `sys_getversion'
render.cpp:(.text+0x2690): undefined reference to `libpd_blocksize'
render.cpp:(.text+0x26ac): undefined reference to `libpd_set_printhook'
render.cpp:(.text+0x26b6): undefined reference to `libpd_set_floathook'
render.cpp:(.text+0x26c0): undefined reference to `libpd_set_messagehook'
render.cpp:(.text+0x26ca): undefined reference to `libpd_set_noteonhook'
render.cpp:(.text+0x26d4): undefined reference to `libpd_set_controlchangehook'
render.cpp:(.text+0x26de): undefined reference to `libpd_set_programchangehook'
render.cpp:(.text+0x26e8): undefined reference to `libpd_set_pitchbendhook'
render.cpp:(.text+0x26f2): undefined reference to `libpd_set_aftertouchhook'
render.cpp:(.text+0x26fc): undefined reference to `libpd_set_polyaftertouchhook'
render.cpp:(.text+0x2706): undefined reference to `libpd_set_midibytehook'
render.cpp:(.text+0x270a): undefined reference to `libpd_init'
render.cpp:(.text+0x2714): undefined reference to `libpd_add_to_search_path'
render.cpp:(.text+0x271e): undefined reference to `libpd_add_to_search_path'
render.cpp:(.text+0x2734): undefined reference to `libpd_init_audio'
render.cpp:(.text+0x2738): undefined reference to `get_sys_soundin'
render.cpp:(.text+0x2740): undefined reference to `get_sys_soundout'
render.cpp:(.text+0x274a): undefined reference to `libpd_start_message'
render.cpp:(.text+0x2752): undefined reference to `libpd_add_float'
render.cpp:(.text+0x2762): undefined reference to `libpd_finish_message'
render.cpp:(.text+0x2776): undefined reference to `libpd_bind'
render.cpp:(.text+0x278a): undefined reference to `libpd_bind'
render.cpp:(.text+0x2796): undefined reference to `libpd_bind'
render.cpp:(.text+0x279e): undefined reference to `libpd_openfile'
render.cpp:(.text+0x27ba): undefined reference to `sys_dontmanageio'
render.cpp:(.text+0x2892): undefined reference to `libpd_arraysize'
render.cpp:(.text+0x28b2): undefined reference to `libpd_start_message'
render.cpp:(.text+0x28be): undefined reference to `libpd_add_float'
render.cpp:(.text+0x28c8): undefined reference to `libpd_finish_message'
render.cpp:(.text+0x28d8): undefined reference to `libpd_float'
/root/Bela/projects/NonagonBar_HVCC/build/render.o: In function `sendDigitalMess             age(bool, unsigned int, void*)':
render.cpp:(.text+0x76): undefined reference to `libpd_float'
collect2: error: ld returned 1 exit status
Makefile.linkbela:42: recipe for target '/root/Bela/projects/NonagonBar_HVCC/Non             agonBar_HVCC' failed
make[1]: *** [/root/Bela/projects/NonagonBar_HVCC/NonagonBar_HVCC] Error 1
Makefile:526: recipe for target '/root/Bela/projects/NonagonBar_HVCC/NonagonBar_             HVCC' failed
make: *** [/root/Bela/projects/NonagonBar_HVCC/NonagonBar_HVCC] Error 2
make: Leaving directory '/root/Bela'                                                                                                                               

(Please enclose the pasted log in ``` so that it gets formatted properly (I edited your message above accordingly).

Can we see the content of the render.cpp file? I suspect that it is a render.cpp for libpd and not for heavy.

    giuliomoro Ok sorry for the messyness 😛 here is the pasted render.cpp file:

    #include <Bela.h>
    #include <DigitalChannelManager.h>
    #include <cmath>
    #include <stdio.h>
    #define PD_THREADED_IO
    #include <libpd/z_libpd.h>
    extern "C" {
    #include <libpd/s_stuff.h>
    };
    #include <libraries/UdpServer/UdpServer.h>
    #include <libraries/Midi/Midi.h>
    #include <libraries/Scope/Scope.h>
    #include <string>
    #include <sstream>
    #include <algorithm>
    // MODIFICATION START
    #include <libraries/Trill/Trill.h>
    //Trill touchSensor;
    Trill touchSensorMain;
    // how often to try to read the
    // cap sensors inputs. The cap sensor values are always sent to Pd once
    // per block, regardless.
    unsigned int touchSensorSleepIntervalUs = 5000;
    void readCapSensorLoop(void*)
    {
    	while(!gShouldStop)
    	{
    		//touchSensor.readI2C();
    		touchSensorMain.readI2C();
    		usleep(touchSensorSleepIntervalUs);
    	}
    }
    
    enum { minFirstDigitalChannel = 10 };
    static unsigned int gAnalogChannelsInUse;
    static unsigned int gDigitalChannelsInUse;
    static unsigned int gScopeChannelsInUse = 4;
    static unsigned int gLibpdBlockSize;
    static unsigned int gChannelsInUse;
    //static const unsigned int gFirstAudioChannel = 0;
    static unsigned int gFirstAnalogInChannel;
    static unsigned int gFirstAnalogOutChannel;
    static unsigned int gFirstDigitalChannel;
    static unsigned int gLibpdDigitalChannelOffset;
    static unsigned int gFirstScopeChannel;
    
    void Bela_userSettings(BelaInitSettings *settings)
    {
    	settings->uniformSampleRate = 1;
    	settings->interleave = 0;
    	settings->analogOutputsPersist = 0;
    }
    
    float* gInBuf;
    float* gOutBuf;
    #define PARSE_MIDI
    static std::vector<Midi*> midi;
    std::vector<std::string> gMidiPortNames;
    
    void dumpMidi()
    {
    	if(midi.size() == 0)
    	{
    		printf("No MIDI device enabled\n");
    		return;
    	}
    	printf("The following MIDI devices are enabled:\n");
    	printf("%4s%20s %3s %3s %s\n",
    			"Num",
    			"Name",
    			"In",
    			"Out",
    			"Pd channels"
    	      );
    	for(unsigned int n = 0; n < midi.size(); ++n)
    	{
    		printf("[%2d]%20s %3s %3s (%d-%d)\n",
    			n,
    			gMidiPortNames[n].c_str(),
    			midi[n]->isInputEnabled() ? "x" : "_",
    			midi[n]->isOutputEnabled() ? "x" : "_",
    			n * 16 + 1,
    			n * 16 + 16
    		);
    	}
    }
    
    Midi* openMidiDevice(std::string name, bool verboseSuccess = false, bool verboseError = false)
    {
    	Midi* newMidi;
    	newMidi = new Midi();
    	newMidi->readFrom(name.c_str());
    	newMidi->writeTo(name.c_str());
    #ifdef PARSE_MIDI
    	newMidi->enableParser(true);
    #else
    	newMidi->enableParser(false);
    #endif /* PARSE_MIDI */
    	if(newMidi->isOutputEnabled())
    	{
    		if(verboseSuccess)
    			printf("Opened MIDI device %s as output\n", name.c_str());
    	}
    	if(newMidi->isInputEnabled())
    	{
    		if(verboseSuccess)
    			printf("Opened MIDI device %s as input\n", name.c_str());
    	}
    	if(!newMidi->isInputEnabled() && !newMidi->isOutputEnabled())
    	{
    		if(verboseError)
    			fprintf(stderr, "Failed to open  MIDI device %s\n", name.c_str());
    		return nullptr;
    	} else {
    		return newMidi;
    	}
    }
    
    static unsigned int getPortChannel(int* channel){
    	unsigned int port = 0;
    	while(*channel > 16){
    		*channel -= 16;
    		port += 1;
    	}
    	if(port >= midi.size()){
    		// if the port number exceeds the number of ports available, send out
    		// of the first port
    		rt_fprintf(stderr, "Port out of range, using port 0 instead\n");
    		port = 0;
    	}
    	return port;
    }
    
    void Bela_MidiOutNoteOn(int channel, int pitch, int velocity) {
    	int port = getPortChannel(&channel);
    	rt_printf("noteout _ port: %d, channel: %d, pitch: %d, velocity %d\n", port, channel, pitch, velocity);
    	midi[port]->writeNoteOn(channel, pitch, velocity);
    }
    
    void Bela_MidiOutControlChange(int channel, int controller, int value) {
    	int port = getPortChannel(&channel);
    	rt_printf("ctlout _ port: %d, channel: %d, controller: %d, value: %d\n", port, channel, controller, value);
    	midi[port]->writeControlChange(channel, controller, value);
    }
    
    void Bela_MidiOutProgramChange(int channel, int program) {
    	int port = getPortChannel(&channel);
    	rt_printf("pgmout _ port: %d, channel: %d, program: %d\n", port, channel, program);
    	midi[port]->writeProgramChange(channel, program);
    }
    
    void Bela_MidiOutPitchBend(int channel, int value) {
    	int port = getPortChannel(&channel);
    	rt_printf("bendout _ port: %d, channel: %d, value: %d\n", port, channel, value);
    	midi[port]->writePitchBend(channel, value);
    }
    
    void Bela_MidiOutAftertouch(int channel, int pressure){
    	int port = getPortChannel(&channel);
    	rt_printf("touchout _ port: %d, channel: %d, pressure: %d\n", port, channel, pressure);
    	midi[port]->writeChannelPressure(channel, pressure);
    }
    
    void Bela_MidiOutPolyAftertouch(int channel, int pitch, int pressure){
    	int port = getPortChannel(&channel);
    	rt_printf("polytouchout _ port: %d, channel: %d, pitch: %d, pressure: %d\n", port, channel, pitch, pressure);
    	midi[port]->writePolyphonicKeyPressure(channel, pitch, pressure);
    }
    
    void Bela_MidiOutByte(int port, int byte){
    	rt_printf("port: %d, byte: %d\n", port, byte);
    	if(port > (int)midi.size()){
    		// if the port is out of range, redirect to the first port.
    		rt_fprintf(stderr, "Port out of range, using port 0 instead\n");
    		port = 0;
    	}
    	midi[port]->writeOutput(byte);
    }
    
    void Bela_printHook(const char *received){
    	rt_printf("%s", received);
    }
    
    static DigitalChannelManager dcm;
    
    void sendDigitalMessage(bool state, unsigned int delay, void* receiverName){
    	libpd_float((const char*)receiverName, (float)state);
    //	rt_printf("%s: %d\n", (char*)receiverName, state);
    }
    
    void Bela_messageHook(const char *source, const char *symbol, int argc, t_atom *argv){
    	if(strcmp(source, "bela_setMidi") == 0){
    		int num[3] = {0, 0, 0};
    		for(int n = 0; n < argc && n < 3; ++n)
    		{
    			if(!libpd_is_float(&argv[n]))
    			{
    				fprintf(stderr, "Wrong format for Bela_setMidi, expected:[hw 1 0 0(");
    				return;
    			}
    			num[n] = libpd_get_float(&argv[n]);
    		}
    		std::ostringstream deviceName;
        deviceName << symbol << ":" << num[0] << "," << num[1] << "," << num[2];
    		printf("Adding Midi device: %s\n", deviceName.str().c_str());
    		Midi* newMidi = openMidiDevice(deviceName.str(), false, true);
    		if(newMidi)
    		{
    			midi.push_back(newMidi);
    			gMidiPortNames.push_back(deviceName.str());
    		}
    		dumpMidi();
    		return;
    	}
    	if(strcmp(source, "bela_setDigital") == 0){
    		// symbol is the direction, argv[0] is the channel, argv[1] (optional)
    		// is signal("sig" or "~") or message("message", default) rate
    		bool isMessageRate = true; // defaults to message rate
    		bool direction = 0; // initialize it just to avoid the compiler's warning
    		bool disable = false;
    		if(strcmp(symbol, "in") == 0){
    			direction = INPUT;
    		} else if(strcmp(symbol, "out") == 0){
    			direction = OUTPUT;
    		} else if(strcmp(symbol, "disable") == 0){
    			disable = true;
    		} else {
    			return;
    		}
    		if(argc == 0){
    			return;
    		} else if (libpd_is_float(&argv[0]) == false){
    			return;
    		}
    		int channel = libpd_get_float(&argv[0]) - gLibpdDigitalChannelOffset;
    		if(disable == true){
    			dcm.unmanage(channel);
    			return;
    		}
    		if(argc >= 2){
    			t_atom* a = &argv[1];
    			if(libpd_is_symbol(a)){
    				char *s = libpd_get_symbol(a);
    				if(strcmp(s, "~") == 0  || strncmp(s, "sig", 3) == 0){
    					isMessageRate = false;
    				}
    			}
    		}
    		dcm.manage(channel, direction, isMessageRate);
    		return;
    	}
    }
    
    void Bela_floatHook(const char *source, float value){
    	// let's make this as optimized as possible for built-in digital Out parsing
    	// the built-in digital receivers are of the form "bela_digitalOutXX" where XX is between gLibpdDigitalChannelOffset and (gLibpdDigitalCHannelOffset+gDigitalChannelsInUse)
    	static int prefixLength = 15; // strlen("bela_digitalOut")
    	if(strncmp(source, "bela_digitalOut", prefixLength)==0){
    		if(source[prefixLength] != 0){ //the two ifs are used instead of if(strlen(source) >= prefixLength+2)
    			if(source[prefixLength + 1] != 0){
    				// quickly convert the suffix to integer, assuming they are numbers, avoiding to call atoi
    				int receiver = ((source[prefixLength] - 48) * 10);
    				receiver += (source[prefixLength+1] - 48);
    				unsigned int channel = receiver - gLibpdDigitalChannelOffset; // go back to the actual Bela digital channel number
    				if(channel < gDigitalChannelsInUse){ //number of digital channels
    					dcm.setValue(channel, value);
    				}
    			}
    		}
    	}
    }
    
    
    
    std::vector<std::string> gReceiverInputNames;
    std::vector<std::string> gReceiverOutputNames;
    void generateDigitalNames(unsigned int numDigitals, unsigned int libpdOffset, std::vector<std::string>& receiverInputNames, std::vector<std::string>& receiverOutputNames)
    {
    	std::string inBaseString = "bela_digitalIn";
    	std::string outBaseString = "bela_digitalOut";
    	for(unsigned int i = 0; i<numDigitals; i++)
    	{
    		receiverInputNames.push_back(inBaseString + std::to_string(i+libpdOffset));
    		receiverOutputNames.push_back(outBaseString + std::to_string(i+libpdOffset));
    	}
    }
    
    void printDigitalNames(std::vector<std::string>& receiverInputNames, std::vector<std::string>& receiverOutputNames)
    {
    	printf("DIGITAL INPUTS\n");
    	for(unsigned int i=0; i<gDigitalChannelsInUse; i++)
    		printf("%s\n", receiverInputNames[i].c_str());
    	printf("DIGITAL OUTPUTS\n");
    	for(unsigned int i=0; i<gDigitalChannelsInUse; i++)
    		printf("%s\n", receiverOutputNames[i].c_str());
    }
    
    static char multiplexerArray[] = {"bela_multiplexer"};
    static int multiplexerArraySize = 0;
    static bool pdMultiplexerActive = false;
    
    #ifdef PD_THREADED_IO
    void fdLoop(void* arg){
    	while(!gShouldStop){
    		sys_doio();
    		usleep(3000);
    	}
    }
    #endif /* PD_THREADED_IO */
    
    Scope scope;
    float* gScopeOut;
    void* gPatch;
    bool gDigitalEnabled = 0;
    
    bool setup(BelaContext *context, void *userData)
    {
    	// Check Pd's version
    	int major, minor, bugfix;
    	sys_getversion(&major, &minor, &bugfix);
    	printf("Running Pd %d.%d-%d\n", major, minor, bugfix);
    	// We requested in Bela_userSettings() to have uniform sampling rate for audio
    	// and analog and non-interleaved buffers.
    	// So let's check this actually happened
    	if(context->analogSampleRate != context->audioSampleRate)
    	{
    		fprintf(stderr, "The sample rate of analog and audio must match. Try running with --uniform-sample-rate\n");
    		return false;
    	}
    	if(context->flags & BELA_FLAG_INTERLEAVED)
    	{
    		fprintf(stderr, "The audio and analog channels must be interleaved.\n");
    		return false;
    	}
    
    	if(context->digitalFrames > 0 && context->digitalChannels > 0)
    		gDigitalEnabled = 1;
    
    	// add here other devices you need
    	gMidiPortNames.push_back("hw:1,0,0");
    	//gMidiPortNames.push_back("hw:0,0,0");
    	//gMidiPortNames.push_back("hw:1,0,1");
    
    	scope.setup(gScopeChannelsInUse, context->audioSampleRate);
    	gScopeOut = new float[gScopeChannelsInUse];
    
    	// Check first of all if the patch file exists. Will actually open it later.
    	char file[] = "_main.pd";
    	char folder[] = "./";
    	unsigned int strSize = strlen(file) + strlen(folder) + 1;
    	char* str = (char*)malloc(sizeof(char) * strSize);
    	snprintf(str, strSize, "%s%s", folder, file);
    	if(access(str, F_OK) == -1 ) {
    		printf("Error file %s/%s not found. The %s file should be your main patch.\n", folder, file, file);
    		return false;
    	}
    	free(str);
    
    	// analog setup
    	gAnalogChannelsInUse = context->analogInChannels;
    	gDigitalChannelsInUse = context->digitalChannels;
    	printf("Audio channels in use: %d\n", context->audioOutChannels);
    	printf("Analog channels in use: %d\n", gAnalogChannelsInUse);
    	printf("Digital channels in use: %d\n", gDigitalChannelsInUse);
    
    	// Channel distribution
    	gFirstAnalogInChannel = std::max(context->audioInChannels, context->audioOutChannels);
    	gFirstAnalogOutChannel = gFirstAnalogInChannel;
    	gFirstDigitalChannel = gFirstAnalogInChannel + std::max(context->analogInChannels, context->analogOutChannels);
    	if(gFirstDigitalChannel < minFirstDigitalChannel)
    		gFirstDigitalChannel = minFirstDigitalChannel; //for backwards compatibility
    	gLibpdDigitalChannelOffset = gFirstDigitalChannel + 1;
    	gFirstScopeChannel = gFirstDigitalChannel + gDigitalChannelsInUse;
    
    	gChannelsInUse = gFirstScopeChannel + gScopeChannelsInUse;
    
    	// Create receiverNames for digital channels
    	generateDigitalNames(gDigitalChannelsInUse, gLibpdDigitalChannelOffset, gReceiverInputNames, gReceiverOutputNames);
    
    	// digital setup
    	if(gDigitalEnabled)
    	{
    		dcm.setCallback(sendDigitalMessage);
    		if(gDigitalChannelsInUse > 0){
    			for(unsigned int ch = 0; ch < gDigitalChannelsInUse; ++ch){
    				dcm.setCallbackArgument(ch, (void*) gReceiverInputNames[ch].c_str());
    			}
    		}
    	}
    
    	unsigned int n = 0;
    	while(n < gMidiPortNames.size())
    	{
    		Midi* newMidi = openMidiDevice(gMidiPortNames[n], false, false);
    		if(newMidi)
    		{
    			midi.push_back(newMidi);
    			++n;
    		} else {
    			gMidiPortNames.erase(gMidiPortNames.begin() + n);
    		}
    	}
    	dumpMidi();
    
    	// check that we are not running with a blocksize smaller than gLibPdBlockSize
    	gLibpdBlockSize = libpd_blocksize();
    	if(context->audioFrames < gLibpdBlockSize){
    		fprintf(stderr, "Error: minimum block size must be %d\n", gLibpdBlockSize);
    		return false;
    	}
    
    	// set hooks before calling libpd_init
    	libpd_set_printhook(Bela_printHook);
    	libpd_set_floathook(Bela_floatHook);
    	libpd_set_messagehook(Bela_messageHook);
    	libpd_set_noteonhook(Bela_MidiOutNoteOn);
    	libpd_set_controlchangehook(Bela_MidiOutControlChange);
    	libpd_set_programchangehook(Bela_MidiOutProgramChange);
    	libpd_set_pitchbendhook(Bela_MidiOutPitchBend);
    	libpd_set_aftertouchhook(Bela_MidiOutAftertouch);
    	libpd_set_polyaftertouchhook(Bela_MidiOutPolyAftertouch);
    	libpd_set_midibytehook(Bela_MidiOutByte);
    
    	//initialize libpd. This clears the search path
    	libpd_init();
    	//Add the current folder to the search path for externals
    	libpd_add_to_search_path(".");
    	libpd_add_to_search_path("../pd-externals");
    
    	libpd_init_audio(gChannelsInUse, gChannelsInUse, context->audioSampleRate);
    	gInBuf = get_sys_soundin();
    	gOutBuf = get_sys_soundout();
    
    	// start DSP:
    	// [; pd dsp 1(
    	libpd_start_message(1);
    	libpd_add_float(1.0f);
    	libpd_finish_message("pd", "dsp");
    
    	// Bind your receivers here
    	for(unsigned int i = 0; i < gDigitalChannelsInUse; i++)
    		libpd_bind(gReceiverOutputNames[i].c_str());
    	libpd_bind("bela_setDigital");
    	libpd_bind("bela_setMidi");
    
    	// open patch:
    	gPatch = libpd_openfile(file, folder);
    	if(gPatch == NULL){
    		printf("Error: file %s/%s is corrupted.\n", folder, file);
    		return false;
    	}
    
    	// If the user wants to use the multiplexer capelet,
    	// the patch will have to contain an array called "bela_multiplexer"
    	// and a receiver [r bela_multiplexerChannels]
    	if(context->multiplexerChannels > 0 && libpd_arraysize(multiplexerArray) >= 0){
    		pdMultiplexerActive = true;
    		multiplexerArraySize = context->multiplexerChannels * context->analogInChannels;
    		// [; bela_multiplexer ` multiplexerArraySize` resize(
    		libpd_start_message(1);
    		libpd_add_float(multiplexerArraySize);
    		libpd_finish_message(multiplexerArray, "resize");
    		// [; bela_multiplexerChannels `context->multiplexerChannels`(
    		libpd_float("bela_multiplexerChannels", context->multiplexerChannels);
    	}
    
    	// Tell Pd that we will manage the io loop,
    	// and we do so in an Auxiliary Task
    #ifdef PD_THREADED_IO
    	sys_dontmanageio(1);
    	AuxiliaryTask fdTask;
    	fdTask = Bela_createAuxiliaryTask(fdLoop, 50, "libpd-fdTask", NULL);
    	Bela_scheduleAuxiliaryTask(fdTask);
    #endif /* PD_THREADED_IO */
    
    	dcm.setVerbose(false);
    // MODIFICATION START
    	//touchSensor.setup(1, 0x18, Trill::DIFF,20,2);
    	touchSensorMain.setup(1, 0x18, Trill::DIFF,2,2);
    	Bela_scheduleAuxiliaryTask(Bela_createAuxiliaryTask(readCapSensorLoop, 50, "touchSensorRead", NULL));
    // MODIFICATION END
    	return true;
    }
    
    void render(BelaContext *context, void *userData)
    {
    // MODIFICATION START
    /*
    	libpd_start_message(touchSensor.numSensors());
    	for(unsigned int n = 0; n < touchSensor.numSensors(); ++n)
    	{
    		libpd_add_float(touchSensor.rawData[n]/(2048.f));
    		// libpd_add_float(touchSensor.rawData[n]);
    	}
    	libpd_finish_message("bela_Trill", "list");
    	*/
    	//main_sensor
    	libpd_start_message(touchSensorMain.numSensors());
    	for(unsigned int n = 0; n < touchSensorMain.numSensors(); ++n)
    	{
    		libpd_add_float(touchSensorMain.rawData[n]/(2048.f));
    		// libpd_add_float(touchSensor.rawData[n]);
    	}
    	libpd_finish_message("bela_Trill_main", "list");
    // MODIFICATION END
    	int num;
    #ifdef PARSE_MIDI
    	for(unsigned int port = 0; port < midi.size(); ++port){
    		while((num = midi[port]->getParser()->numAvailableMessages()) > 0){
    			static MidiChannelMessage message;
    			message = midi[port]->getParser()->getNextChannelMessage();
    			rt_printf("On port %d (%s): ", port, gMidiPortNames[port].c_str());
    			message.prettyPrint(); // use this to print beautified message (channel, data bytes)
    			switch(message.getType()){
    				case kmmNoteOn:
    				{
    					int noteNumber = message.getDataByte(0);
    					int velocity = message.getDataByte(1);
    					int channel = message.getChannel();
    					libpd_noteon(channel + port * 16, noteNumber, velocity);
    					break;
    				}
    				case kmmNoteOff:
    				{
    					/* PureData does not seem to handle noteoff messages as per the MIDI specs,
    					 * so that the noteoff velocity is ignored. Here we convert them to noteon
    					 * with a velocity of 0.
    					 */
    					int noteNumber = message.getDataByte(0);
    	//				int velocity = message.getDataByte(1); // would be ignored by Pd
    					int channel = message.getChannel();
    					libpd_noteon(channel + port * 16, noteNumber, 0);
    					break;
    				}
    				case kmmControlChange:
    				{
    					int channel = message.getChannel();
    					int controller = message.getDataByte(0);
    					int value = message.getDataByte(1);
    					libpd_controlchange(channel + port * 16, controller, value);
    					break;
    				}
    				case kmmProgramChange:
    				{
    					int channel = message.getChannel();
    					int program = message.getDataByte(0);
    					libpd_programchange(channel + port * 16, program);
    					break;
    				}
    				case kmmPolyphonicKeyPressure:
    				{
    					int channel = message.getChannel();
    					int pitch = message.getDataByte(0);
    					int value = message.getDataByte(1);
    					libpd_polyaftertouch(channel + port * 16, pitch, value);
    					break;
    				}
    				case kmmChannelPressure:
    				{
    					int channel = message.getChannel();
    					int value = message.getDataByte(0);
    					libpd_aftertouch(channel + port * 16, value);
    					break;
    				}
    				case kmmPitchBend:
    				{
    					int channel = message.getChannel();
    					int value =  ((message.getDataByte(1) < 7)| message.getDataByte(0)) - 8192;
    					libpd_pitchbend(channel + port * 16, value);
    					break;
    				}
    				case kmmSystem:
    				// currently Bela only handles sysrealtime, and it does so pretending it is a channel message with no data bytes, so we have to re-assemble the status byte
    				{
    					int channel = message.getChannel();
    					int status = message.getStatusByte();
    					int byte = channel | status;
    					libpd_sysrealtime(port, byte);
    					break;
    				}
    				case kmmNone:
    				case kmmAny:
    					break;
    			}
    		}
    	}
    #else
    	int input;
    	for(unsigned int port = 0; port < NUM_MIDI_PORTS; ++port){
    		while((input = midi[port].getInput()) >= 0){
    			libpd_midibyte(port, input);
    		}
    	}
    #endif /* PARSE_MIDI */
    	unsigned int numberOfPdBlocksToProcess = context->audioFrames / gLibpdBlockSize;
    
    	// Remember: we have non-interleaved buffers and the same sampling rate for
    	// analogs, audio and digitals
    	for(unsigned int tick = 0; tick < numberOfPdBlocksToProcess; ++tick)
    	{
    		//audio input
    		for(int n = 0; n < context->audioInChannels; ++n)
    		{
    			memcpy(
    				gInBuf + n * gLibpdBlockSize,
    				context->audioIn + tick * gLibpdBlockSize + n * context->audioFrames,
    				sizeof(context->audioIn[0]) * gLibpdBlockSize
    			);
    		}
    
    		// analog input
    		for(int n = 0; n < context->analogInChannels; ++n)
    		{
    			memcpy(
    				gInBuf + gLibpdBlockSize * gFirstAnalogInChannel + n * gLibpdBlockSize,
    				context->analogIn + tick * gLibpdBlockSize + n * context->analogFrames,
    				sizeof(context->analogIn[0]) * gLibpdBlockSize
    			);
    		}
    		// multiplexed analog input
    		if(pdMultiplexerActive)
    		{
    			// we do not disable regular analog inputs if muxer is active, because user may have bridged them on the board and
    			// they may be using half of them at a high sampling-rate
    			static int lastMuxerUpdate = 0;
    			if(++lastMuxerUpdate == multiplexerArraySize){
    				lastMuxerUpdate = 0;
    				libpd_write_array(multiplexerArray, 0, (float *const)context->multiplexerAnalogIn, multiplexerArraySize);
    			}
    		}
    
    		unsigned int digitalFrameBase = gLibpdBlockSize * tick;
    		unsigned int j;
    		unsigned int k;
    		float* p0;
    		float* p1;
    		// digital input
    		if(gDigitalEnabled)
    		{
    			// digital in at message-rate
    			dcm.processInput(&context->digital[digitalFrameBase], gLibpdBlockSize);
    
    			// digital in at signal-rate
    			for (j = 0, p0 = gInBuf; j < gLibpdBlockSize; j++, p0++) {
    				unsigned int digitalFrame = digitalFrameBase + j;
    				for (k = 0, p1 = p0 + gLibpdBlockSize * gFirstDigitalChannel;
    						k < 16; ++k, p1 += gLibpdBlockSize) {
    					if(dcm.isSignalRate(k) && dcm.isInput(k)){ // only process input channels that are handled at signal rate
    						*p1 = digitalRead(context, digitalFrame, k);
    					}
    				}
    			}
    		}
    
    		libpd_process_sys(); // process the block
    
    		// digital outputs
    		if(gDigitalEnabled)
    		{
    			// digital out at signal-rate
    			for (j = 0, p0 = gOutBuf; j < gLibpdBlockSize; ++j, ++p0) {
    				unsigned int digitalFrame = (digitalFrameBase + j);
    				for (k = 0, p1 = p0  + gLibpdBlockSize * gFirstDigitalChannel;
    					k < context->digitalChannels; k++, p1 += gLibpdBlockSize)
    				{
    					if(dcm.isSignalRate(k) && dcm.isOutput(k)){ // only process output channels that are handled at signal rate
    						digitalWriteOnce(context, digitalFrame, k, *p1 > 0.5);
    					}
    				}
    			}
    
    			// digital out at message-rate
    			dcm.processOutput(&context->digital[digitalFrameBase], gLibpdBlockSize);
    		}
    
    		// scope output
    		for (j = 0, p0 = gOutBuf; j < gLibpdBlockSize; ++j, ++p0) {
    			for (k = 0, p1 = p0 + gLibpdBlockSize * gFirstScopeChannel; k < gScopeChannelsInUse; k++, p1 += gLibpdBlockSize) {
    				gScopeOut[k] = *p1;
    			}
    			scope.log(gScopeOut[0], gScopeOut[1], gScopeOut[2], gScopeOut[3]);
    		}
    
    		// audio output
    		for(int n = 0; n < context->audioOutChannels; ++n)
    		{
    			memcpy(
    				context->audioOut + tick * gLibpdBlockSize + n * context->audioFrames,
    				gOutBuf + n * gLibpdBlockSize,
    				sizeof(context->audioOut[0]) * gLibpdBlockSize
    			);
    		}
    
    		//analog output
    		for(int n = 0; n < context->analogOutChannels; ++n)
    		{
    			memcpy(
    				context->analogOut + tick * gLibpdBlockSize + n * context->analogFrames,
    				gOutBuf + gLibpdBlockSize * gFirstAnalogOutChannel + n * gLibpdBlockSize,
    				sizeof(context->analogOut[0]) * gLibpdBlockSize
    			);
    		}
    	}
    }
    
    void cleanup(BelaContext *context, void *userData)
    {
    	for(auto a : midi)
    	{
    		delete a;
    	}
    	libpd_closefile(gPatch);
    	delete [] gScopeOut;
    }

    Ok, can you also tell me what is the output of grep v0 /etc/motd, and how you updated your code last?

      giuliomoro the output from grep v0 /etc/motd is Bela image, v0.3.7a, 16 October 2019. i did not update this code myself, so i can't answer this immediately.. @Fedde could you specify this further?

      ok if it's the latest image, then I don't need further detail. Can you confirm if you have a _main.pd file in the project folder?

        giuliomoro yes i do have a _main.pd file in the project folder. (does it matter that it has a subpatch inside?)

          yannick a _main.pd file in the project folder. (does it matter that it has a subpatch inside?)

          it doesn't matter that it has a subpatch inside, as long as it is located in the project folder and not in a subdirectory of the project folder.

          The above file compiles and runs fine for me. Try one of the following:

          • If you are building with the IDE, go to the Settings tab and add to the Make Parameters: box the following: AT=.
          • If you are building using the scripts/build_project.sh script from the host, add -m "AT=" at the end of the command line
          • if you are building directly with make on the board, simply append AT= to the make line

          The three actions above will give a more verbose output, please run one of them and paste the output here.

            giuliomoro

            root@bela:~# make AT=  -C ~/Bela PROJECT=NonagonBar_Heavy COMPILER=gcc run
            make: Entering directory '/root/Bela'
            Automatically detected PROJECT_TYPE: cpp
            Running on __stretch__ with Xenomai __3__
            systemctl stop bela_startup || true
            `PID=`grep bela-audio  /proc/xenomai/sched/stat | cut -d " " -f 5 | sed s/\s//g`;                                                                                                                                                              `if [ -z $PID ]; then [ false = true ] || echo "No process to kill"; else [  fal                                                                                                                                                             se = true  ] || echo "Killing old Bela process $PID"; kill -2 $PID; sleep 0.2; k                                                                                                                                                             ill -9 $PID 2> /dev/null; fi; screen -X -S Bela quit > /dev/null; exit 0;
            No process to kill
            killall scsynth 2>/dev/null& killall sclang 2>/dev/null& true
            echo 'Building HvMessage.c...'
            Building HvMessage.c...
            gcc  -I/root/Bela/projects/NonagonBar_Heavy -I./include/legacy  -I./include -I./                                                                                                                                                             build/pru/ -I./ -I/usr/xenomai/include/cobalt -I/usr/xenomai/include -march=armv                                                                                                                                                             7-a -mfpu=vfp3 -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__COBAL                                                                                                                                                             T__ -D__COBALT_WRAP__ -DXENOMAI_SKIN_posix -DXENOMAI_MAJOR=3 -O3 -march=armv7-a                                                                                                                                                              -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon -ftree-vectorize -ffast-math -DNDEB                                                                                                                                                             UG -DBELA_USE_RTDM -I/root/Bela/resources/stretch/include -save-temps=obj -std=g                                                                                                                                                             nu11 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"/root/Bela/proje                                                                                                                                                             cts/NonagonBar_Heavy/build/HvMessage.d" -o "/root/Bela/projects/NonagonBar_Heavy                                                                                                                                                             /build/HvMessage.o" "/root/Bela/projects/NonagonBar_Heavy/HvMessage.c"
            /root/Bela/projects/NonagonBar_Heavy/HvMessage.c: In function 'msg_getHash':
            /root/Bela/projects/NonagonBar_Heavy/HvMessage.c:151:7: warning: dereferencing t                                                                                                                                                             ype-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
                   return *((hv_uint32_t *) &f);
                   ^~~~~~
            echo ' ...done'
             ...done
            echo ' ' 
            `
            `echo 'Building HvControlVar.c...'
            Building HvControlVar.c...
            gcc  -I/root/Bela/projects/NonagonBar_Heavy -I./include/legacy  -I./include -I./                                                                                                                                                             build/pru/ -I./ -I/usr/xenomai/include/cobalt -I/usr/xenomai/include -march=armv                                                                                                                                                             7-a -mfpu=vfp3 -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__COBAL                                                                                                                                                             T__ -D__COBALT_WRAP__ -DXENOMAI_SKIN_posix -DXENOMAI_MAJOR=3 -O3 -march=armv7-a                                                                                                                                                              -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon -ftree-vectorize -ffast-math -DNDEB                                                                                                                                                             UG -DBELA_USE_RTDM -I/root/Bela/resources/stretch/include -save-temps=obj -std=g                                                                                                                                                             nu11 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"/root/Bela/proje                                                                                                                                                             cts/NonagonBar_Heavy/build/HvControlVar.d" -o "/root/Bela/projects/NonagonBar_He                                                                                                                                                             avy/build/HvControlVar.o" "/root/Bela/projects/NonagonBar_Heavy/HvControlVar.c"
            echo ' ...done'
             ...done
            echo ' '
            `
            `echo 'Building HvTable.c...'
            Building HvTable.c...
            gcc  -I/root/Bela/projects/NonagonBar_Heavy -I./include/legacy  -I./include -I./                                                                                                                                                             build/pru/ -I./ -I/usr/xenomai/include/cobalt -I/usr/xenomai/include -march=armv                                                                                                                                                             7-a -mfpu=vfp3 -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__COBAL                                                                                                                                                             T__ -D__COBALT_WRAP__ -DXENOMAI_SKIN_posix -DXENOMAI_MAJOR=3 -O3 -march=armv7-a                                                                                                                                                              -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon -ftree-vectorize -ffast-math -DNDEB                                                                                                                                                             UG -DBELA_USE_RTDM -I/root/Bela/resources/stretch/include -save-temps=obj -std=g                                                                                                                                                             nu11 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"/root/Bela/proje                                                                                                                                                             cts/NonagonBar_Heavy/build/HvTable.d" -o "/root/Bela/projects/NonagonBar_Heavy/b                                                                                                                                                             uild/HvTable.o" "/root/Bela/projects/NonagonBar_Heavy/HvTable.c"
            echo ' ...done'
             ...done
            echo ' '
            `
            `echo 'Building HvMessagePool.c...'
            Building HvMessagePool.c...
            gcc  -I/root/Bela/projects/NonagonBar_Heavy -I./include/legacy  -I./include -I./                                                                                                                                                             build/pru/ -I./ -I/usr/xenomai/include/cobalt -I/usr/xenomai/include -march=armv                                                                                                                                                             7-a -mfpu=vfp3 -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__COBAL                                                                                                                                                             T__ -D__COBALT_WRAP__ -DXENOMAI_SKIN_posix -DXENOMAI_MAJOR=3 -O3 -march=armv7-a                                                                                                                                                              -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon -ftree-vectorize -ffast-math -DNDEB                                                                                                                                                             UG -DBELA_USE_RTDM -I/root/Bela/resources/stretch/include -save-temps=obj -std=g                                                                                                                                                             nu11 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"/root/Bela/proje                                                                                                                                                             cts/NonagonBar_Heavy/build/HvMessagePool.d" -o "/root/Bela/projects/NonagonBar_H                                                                                                                                                             eavy/build/HvMessagePool.o" "/root/Bela/projects/NonagonBar_Heavy/HvMessagePool.                                                                                                                                                             c"
            echo ' ...done'
             ...done
            echo ' '
            `
            `echo 'Building HvControlBinop.c...'
            Building HvControlBinop.c...
            gcc  -I/root/Bela/projects/NonagonBar_Heavy -I./include/legacy  -I./include -I./                                                                                                                                                             build/pru/ -I./ -I/usr/xenomai/include/cobalt -I/usr/xenomai/include -march=armv                                                                                                                                                             7-a -mfpu=vfp3 -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__COBAL                                                                                                                                                             T__ -D__COBALT_WRAP__ -DXENOMAI_SKIN_posix -DXENOMAI_MAJOR=3 -O3 -march=armv7-a                                                                                                                                                              -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon -ftree-vectorize -ffast-math -DNDEB                                                                                                                                                             UG -DBELA_USE_RTDM -I/root/Bela/resources/stretch/include -save-temps=obj -std=g                                                                                                                                                             nu11 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"/root/Bela/proje                                                                                                                                                             cts/NonagonBar_Heavy/build/HvControlBinop.d" -o "/root/Bela/projects/NonagonBar_                                                                                                                                                             Heavy/build/HvControlBinop.o" "/root/Bela/projects/NonagonBar_Heavy/HvControlBin                                                                                                                                                             op.c"
            echo ' ...done'
             ...done
            echo ' '
            `
            `echo 'Building HvControlCast.c...'
            Building HvControlCast.c...
            gcc  -I/root/Bela/projects/NonagonBar_Heavy -I./include/legacy  -I./include -I./                                                                                                                                                             build/pru/ -I./ -I/usr/xenomai/include/cobalt -I/usr/xenomai/include -march=armv                                                                                                                                                             7-a -mfpu=vfp3 -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__COBAL                                                                                                                                                             T__ -D__COBALT_WRAP__ -DXENOMAI_SKIN_posix -DXENOMAI_MAJOR=3 -O3 -march=armv7-a                                                                                                                                                              -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon -ftree-vectorize -ffast-math -DNDEB                                                                                                                                                             UG -DBELA_USE_RTDM -I/root/Bela/resources/stretch/include -save-temps=obj -std=g                                                                                                                                                             nu11 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"/root/Bela/proje                                                                                                                                                             cts/NonagonBar_Heavy/build/HvControlCast.d" -o "/root/Bela/projects/NonagonBar_H                                                                                                                                                             eavy/build/HvControlCast.o" "/root/Bela/projects/NonagonBar_Heavy/HvControlCast.                                                                                                                                                             c"
            echo ' ...done'
             ...done
            echo ' '
            `
            `echo 'Building HvControlDelay.c...'
            Building HvControlDelay.c...
            gcc  -I/root/Bela/projects/NonagonBar_Heavy -I./include/legacy  -I./include -I./                                                                                                                                                             build/pru/ -I./ -I/usr/xenomai/include/cobalt -I/usr/xenomai/include -march=armv                                                                                                                                                             7-a -mfpu=vfp3 -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__COBAL                                                                                                                                                             T__ -D__COBALT_WRAP__ -DXENOMAI_SKIN_posix -DXENOMAI_MAJOR=3 -O3 -march=armv7-a                                                                                                                                                              -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon -ftree-vectorize -ffast-math -DNDEB                                                                                                                                                             UG -DBELA_USE_RTDM -I/root/Bela/resources/stretch/include -save-temps=obj -std=g                                                                                                                                                             nu11 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"/root/Bela/proje                                                                                                                                                             cts/NonagonBar_Heavy/build/HvControlDelay.d" -o "/root/Bela/projects/NonagonBar_                                                                                                                                                             Heavy/build/HvControlDelay.o" "/root/Bela/projects/NonagonBar_Heavy/HvControlDel                                                                                                                                                             ay.c"
            echo ' ...done'
             ...done
            echo ' '
            `
            `echo 'Building HvControlPack.c...'
            Building HvControlPack.c...
            gcc  -I/root/Bela/projects/NonagonBar_Heavy -I./include/legacy  -I./include -I./                                                                                                                                                             build/pru/ -I./ -I/usr/xenomai/include/cobalt -I/usr/xenomai/include -march=armv                                                                                                                                                             7-a -mfpu=vfp3 -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__COBAL                                                                                                                                                             T__ -D__COBALT_WRAP__ -DXENOMAI_SKIN_posix -DXENOMAI_MAJOR=3 -O3 -march=armv7-a                                                                                                                                                              -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon -ftree-vectorize -ffast-math -DNDEB                                                                                                                                                             UG -DBELA_USE_RTDM -I/root/Bela/resources/stretch/include -save-temps=obj -std=g                                                                                                                                                             nu11 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"/root/Bela/proje                                                                                                                                                             cts/NonagonBar_Heavy/build/HvControlPack.d" -o "/root/Bela/projects/NonagonBar_H                                                                                                                                                             eavy/build/HvControlPack.o" "/root/Bela/projects/NonagonBar_Heavy/HvControlPack.                                                                                                                                                             c"
            echo ' ...done'
             ...done
            echo ' '
            `
            `echo 'Building HvMessageQueue.c...'
            Building HvMessageQueue.c...
            gcc  -I/root/Bela/projects/NonagonBar_Heavy -I./include/legacy  -I./include -I./                                                                                                                                                             build/pru/ -I./ -I/usr/xenomai/include/cobalt -I/usr/xenomai/include -march=armv                                                                                                                                                             7-a -mfpu=vfp3 -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__COBAL                                                                                                                                                             T__ -D__COBALT_WRAP__ -DXENOMAI_SKIN_posix -DXENOMAI_MAJOR=3 -O3 -march=armv7-a                                                                                                                                                              -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon -ftree-vectorize -ffast-math -DNDEB                                                                                                                                                             UG -DBELA_USE_RTDM -I/root/Bela/resources/stretch/include -save-temps=obj -std=g                                                                                                                                                             nu11 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"/root/Bela/proje                                                                                                                                                             cts/NonagonBar_Heavy/build/HvMessageQueue.d" -o "/root/Bela/projects/NonagonBar_                                                                                                                                                             Heavy/build/HvMessageQueue.o" "/root/Bela/projects/NonagonBar_Heavy/HvMessageQue                                                                                                                                                             ue.c"
            echo ' ...done'
             ...done
            echo ' '
            `
            `echo 'Building HvControlPrint.c...'
            Building HvControlPrint.c...
            gcc  -I/root/Bela/projects/NonagonBar_Heavy -I./include/legacy  -I./include -I./                                                                                                                                                             build/pru/ -I./ -I/usr/xenomai/include/cobalt -I/usr/xenomai/include -march=armv                                                                                                                                                             7-a -mfpu=vfp3 -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__COBAL                                                                                                                                                             T__ -D__COBALT_WRAP__ -DXENOMAI_SKIN_posix -DXENOMAI_MAJOR=3 -O3 -march=armv7-a                                                                                                                                                              -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon -ftree-vectorize -ffast-math -DNDEB                                                                                                                                                             UG -DBELA_USE_RTDM -I/root/Bela/resources/stretch/include -save-temps=obj -std=g                                                                                                                                                             nu11 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"/root/Bela/proje                                                                                                                                                             cts/NonagonBar_Heavy/build/HvControlPrint.d" -o "/root/Bela/projects/NonagonBar_                                                                                                                                                             Heavy/build/HvControlPrint.o" "/root/Bela/projects/NonagonBar_Heavy/HvControlPri                                                                                                                                                             nt.c"
            echo ' ...done'
             ...done
            echo ' '
            `
            `echo 'Building HvUtils.c...'
            Building HvUtils.c...
            gcc  -I/root/Bela/projects/NonagonBar_Heavy -I./include/legacy  -I./include -I./                                                                                                                                                             build/pru/ -I./ -I/usr/xenomai/include/cobalt -I/usr/xenomai/include -march=armv                                                                                                                                                             7-a -mfpu=vfp3 -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__COBAL                                                                                                                                                             T__ -D__COBALT_WRAP__ -DXENOMAI_SKIN_posix -DXENOMAI_MAJOR=3 -O3 -march=armv7-a                                                                                                                                                              -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon -ftree-vectorize -ffast-math -DNDEB                                                                                                                                                             UG -DBELA_USE_RTDM -I/root/Bela/resources/stretch/include -save-temps=obj -std=g                                                                                                                                                             nu11 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"/root/Bela/proje                                                                                                                                                             cts/NonagonBar_Heavy/build/HvUtils.d" -o "/root/Bela/projects/NonagonBar_Heavy/b                                                                                                                                                             uild/HvUtils.o" "/root/Bela/projects/NonagonBar_Heavy/HvUtils.c"
            echo ' ...done'
             ...done
            echo ' '
            `
            `echo 'Building HvControlSlice.c...'
            Building HvControlSlice.c...
            gcc  -I/root/Bela/projects/NonagonBar_Heavy -I./include/legacy  -I./include -I./                                                                                                                                                             build/pru/ -I./ -I/usr/xenomai/include/cobalt -I/usr/xenomai/include -march=armv                                                                                                                                                             7-a -mfpu=vfp3 -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__COBAL                                                                                                                                                             T__ -D__COBALT_WRAP__ -DXENOMAI_SKIN_posix -DXENOMAI_MAJOR=3 -O3 -march=armv7-a                                                                                                                                                              -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon -ftree-vectorize -ffast-math -DNDEB                                                                                                                                                             UG -DBELA_USE_RTDM -I/root/Bela/resources/stretch/include -save-temps=obj -std=g                                                                                                                                                             nu11 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"/root/Bela/proje                                                                                                                                                             cts/NonagonBar_Heavy/build/HvControlSlice.d" -o "/root/Bela/projects/NonagonBar_                                                                                                                                                             Heavy/build/HvControlSlice.o" "/root/Bela/projects/NonagonBar_Heavy/HvControlSli                                                                                                                                                             ce.c"
            echo ' ...done'
             ...done
            echo ' '
            `
            `echo 'Building HvLightPipe.c...'
            Building HvLightPipe.c...
            gcc  -I/root/Bela/projects/NonagonBar_Heavy -I./include/legacy  -I./include -I./                                                                                                                                                             build/pru/ -I./ -I/usr/xenomai/include/cobalt -I/usr/xenomai/include -march=armv                                                                                                                                                             7-a -mfpu=vfp3 -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__COBAL                                                                                                                                                             T__ -D__COBALT_WRAP__ -DXENOMAI_SKIN_posix -DXENOMAI_MAJOR=3 -O3 -march=armv7-a                                                                                                                                                              -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon -ftree-vectorize -ffast-math -DNDEB                                                                                                                                                             UG -DBELA_USE_RTDM -I/root/Bela/resources/stretch/include -save-temps=obj -std=g                                                                                                                                                             nu11 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"/root/Bela/proje                                                                                                                                                             cts/NonagonBar_Heavy/build/HvLightPipe.d" -o "/root/Bela/projects/NonagonBar_Hea                                                                                                                                                             vy/build/HvLightPipe.o" "/root/Bela/projects/NonagonBar_Heavy/HvLightPipe.c"
            echo ' ...done'
             ...done
            echo ' '
            `
            `echo 'Building HvControlSystem.c...'
            Building HvControlSystem.c...
            gcc  -I/root/Bela/projects/NonagonBar_Heavy -I./include/legacy  -I./include -I./                                                                                                                                                             build/pru/ -I./ -I/usr/xenomai/include/cobalt -I/usr/xenomai/include -march=armv                                                                                                                                                             7-a -mfpu=vfp3 -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__COBAL                                                                                                                                                             T__ -D__COBALT_WRAP__ -DXENOMAI_SKIN_posix -DXENOMAI_MAJOR=3 -O3 -march=armv7-a                                                                                                                                                              -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon -ftree-vectorize -ffast-math -DNDEB                                                                                                                                                             UG -DBELA_USE_RTDM -I/root/Bela/resources/stretch/include -save-temps=obj -std=g                                                                                                                                                             nu11 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"/root/Bela/proje                                                                                                                                                             cts/NonagonBar_Heavy/build/HvControlSystem.d" -o "/root/Bela/projects/NonagonBar                                                                                                                                                             _Heavy/build/HvControlSystem.o" "/root/Bela/projects/NonagonBar_Heavy/HvControlS                                                                                                                                                             ystem.c"
            echo ' ...done'
             ...done
            echo ' '
            `
            `echo 'Building render.cpp...'
            Building render.cpp...
            g++  -I/root/Bela/projects/NonagonBar_Heavy -I./include/legacy  -I./include -I./                                                                                                                                                             build/pru/ -I./ -I/usr/xenomai/include/cobalt -I/usr/xenomai/include -march=armv                                                                                                                                                             7-a -mfpu=vfp3 -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__COBAL                                                                                                                                                             T__ -D__COBALT_WRAP__ -DXENOMAI_SKIN_posix -DXENOMAI_MAJOR=3 -O3 -march=armv7-a                                                                                                                                                              -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon -ftree-vectorize -ffast-math -DNDEB                                                                                                                                                             UG -DBELA_USE_RTDM -I/root/Bela/resources/stretch/include -save-temps=obj -std=c                                                                                                                                                             ++11 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"/root/Bela/proje                                                                                                                                                             cts/NonagonBar_Heavy/build/render.d" -o "/root/Bela/projects/NonagonBar_Heavy/bu                                                                                                                                                             ild/render.o" "/root/Bela/projects/NonagonBar_Heavy/render.cpp"
            /root/Bela/projects/NonagonBar_Heavy/render.cpp: In function 'void render(BelaCo                                                                                                                                                             ntext*, void*)':
            /root/Bela/projects/NonagonBar_Heavy/render.cpp:531:28: warning: comparison betw                                                                                                                                                             een signed and unsigned integer expressions [-Wsign-compare]
              for(unsigned int n = 0; n < touchSensorMain.numSensors(); ++n)
                                      ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            /root/Bela/projects/NonagonBar_Heavy/render.cpp:634:20: warning: comparison betw                                                                                                                                                             een signed and unsigned integer expressions [-Wsign-compare]
               for(int n = 0; n < context->audioInChannels; ++n)
                              ~~^~~~~~~~~~~~~~~~~~~~~~~~~~
            /root/Bela/projects/NonagonBar_Heavy/render.cpp:644:20: warning: comparison betw                                                                                                                                                             een signed and unsigned integer expressions [-Wsign-compare]
               for(int n = 0; n < context->analogInChannels; ++n)
                              ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
            /root/Bela/projects/NonagonBar_Heavy/render.cpp:717:20: warning: comparison betw                                                                                                                                                             een signed and unsigned integer expressions [-Wsign-compare]
               for(int n = 0; n < context->audioOutChannels; ++n)
                              ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
            /root/Bela/projects/NonagonBar_Heavy/render.cpp:727:20: warning: comparison betw                                                                                                                                                             een signed and unsigned integer expressions [-Wsign-compare]
               for(int n = 0; n < context->analogOutChannels; ++n)
                              ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
            echo ' ...done'
             ...done
            echo ' '
            `
            `echo 'Building HeavyContext.cpp...'
            Building HeavyContext.cpp...
            g++  -I/root/Bela/projects/NonagonBar_Heavy -I./include/legacy  -I./include -I./                                                                                                                                                             build/pru/ -I./ -I/usr/xenomai/include/cobalt -I/usr/xenomai/include -march=armv                                                                                                                                                             7-a -mfpu=vfp3 -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__COBAL                                                                                                                                                             T__ -D__COBALT_WRAP__ -DXENOMAI_SKIN_posix -DXENOMAI_MAJOR=3 -O3 -march=armv7-a                                                                                                                                                              -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon -ftree-vectorize -ffast-math -DNDEB                                                                                                                                                             UG -DBELA_USE_RTDM -I/root/Bela/resources/stretch/include -save-temps=obj -std=c                                                                                                                                                             ++11 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"/root/Bela/proje                                                                                                                                                             cts/NonagonBar_Heavy/build/HeavyContext.d" -o "/root/Bela/projects/NonagonBar_He                                                                                                                                                             avy/build/HeavyContext.o" "/root/Bela/projects/NonagonBar_Heavy/HeavyContext.cpp                                                                                                                                                             "
            echo ' ...done'
             ...done
            echo ' '
            `
            `echo 'Building HvHeavy.cpp...'
            Building HvHeavy.cpp...
            g++  -I/root/Bela/projects/NonagonBar_Heavy -I./include/legacy  -I./include -I./                                                                                                                                                             build/pru/ -I./ -I/usr/xenomai/include/cobalt -I/usr/xenomai/include -march=armv                                                                                                                                                             7-a -mfpu=vfp3 -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__COBAL                                                                                                                                                             T__ -D__COBALT_WRAP__ -DXENOMAI_SKIN_posix -DXENOMAI_MAJOR=3 -O3 -march=armv7-a                                                                                                                                                              -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon -ftree-vectorize -ffast-math -DNDEB                                                                                                                                                             UG -DBELA_USE_RTDM -I/root/Bela/resources/stretch/include -save-temps=obj -std=c                                                                                                                                                             ++11 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"/root/Bela/proje                                                                                                                                                             cts/NonagonBar_Heavy/build/HvHeavy.d" -o "/root/Bela/projects/NonagonBar_Heavy/b                                                                                                                                                             uild/HvHeavy.o" "/root/Bela/projects/NonagonBar_Heavy/HvHeavy.cpp"
            /root/Bela/projects/NonagonBar_Heavy/HvHeavy.cpp:24:0: warning: ignoring #pragma mark  [-Wunknown-pragmas]
             #pragma mark - Heavy Table
            `
            `/root/Bela/projects/NonagonBar_Heavy/HvHeavy.cpp:45:0: warning: ignoring #pragma mark  [-Wunknown-pragmas]
             #pragma mark - Heavy Message`
            
            `/root/Bela/projects/NonagonBar_Heavy/HvHeavy.cpp:127:0: warning: ignoring #pragma mark  [-Wunknown-pragmas]
             #pragma mark - Heavy Common`
            
            `/root/Bela/projects/NonagonBar_Heavy/HvHeavy.cpp:294:0: warning: ignoring #pragma mark  [-Wunknown-pragmas]
             #pragma mark - Heavy Common`
            
            `echo ' ...done'
             ...done
            echo ' '`
            
            `echo 'Building Heavy_bela.cpp...'
            Building Heavy_bela.cpp...
            g++  -I/root/Bela/projects/NonagonBar_Heavy -I./include/legacy  -I./include -I./build/pru/ -I./ -I/usr/xenomai/include/cobalt -I/usr/xenomai/include -march=armv7-a -mfpu=vfp3 -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__COBALT__ -D__COBALT_WRAP__ -DXENOMAI_SKIN_posix -DXENOMAI_MAJOR=3 -O3 -march=armv7-a -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon -ftree-vectorize -ffast-math -DNDEBUG -DBELA_USE_RTDM -I/root/Bela/resources/stretch/include -save-temps=obj -std=c++11 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"/root/Bela/projects/NonagonBar_Heavy/build/Heavy_bela.d" -o "/root/Bela/projects/NonagonBar_Heavy/build/Heavy_bela.o" "/root/Bela/projects/NonagonBar_Heavy/Heavy_bela.cpp"
            echo ' ...done'
             ...done
            echo ' '`
            
            `./resources/tools/detectlibraries.sh --project NonagonBar_Heavy
            Extracting dependencies of library Midi
            Extracting dependencies of library Scope
            Extracting dependencies of library Trill
            Extracting dependencies of library UdpServer
            make -f Makefile.linkbela --no-print-directory /root/Bela/projects/NonagonBar_Heavy/NonagonBar_Heavy
            echo 'Linking...'
            Linking...
            g++  -Llib/     -fno-pie -no-pie -pthread -o "/root/Bela/projects/NonagonBar_Heavy/NonagonBar_Heavy" build/core/FormatConvert.o build/core/OscillatorBank_routines.o build/core/math_runfast.o build/core/Gpio.o build/core/I2c_Codec.o build/core/RTAudio.o build/core/PruBinary.o build/core/RTAudioCommandLine.o build/core/AuxTaskNonRT.o build/core/JSONValue.o build/core/board_detect.o build/core/WSServer.o build/core/AuxiliaryTasks.o build/core/PRU.o build/core/AuxTaskRT.o build/core/IirFilter.o build/core/GPIOcontrol.o build/core/Spi_Codec.o build/core/DigitalChannelManager.o build/core/JSON.o ./build/core/default_main.o   /root/Bela/projects/NonagonBar_Heavy/build/HvMessage.o /root/Bela/projects/NonagonBar_Heavy/build/HvControlVar.o /root/Bela/projects/NonagonBar_Heavy/build/HvTable.o /root/Bela/projects/NonagonBar_Heavy/build/HvMessagePool.o /root/Bela/projects/NonagonBar_Heavy/build/HvControlBinop.o /root/Bela/projects/NonagonBar_Heavy/build/HvControlCast.o /root/Bela/projects/NonagonBar_Heavy/build/HvControlDelay.o /root/Bela/projects/NonagonBar_Heavy/build/HvControlPack.o /root/Bela/projects/NonagonBar_Heavy/build/HvMessageQueue.o /root/Bela/projects/NonagonBar_Heavy/build/HvControlPrint.o /root/Bela/projects/NonagonBar_Heavy/build/HvUtils.o /root/Bela/projects/NonagonBar_Heavy/build/HvControlSlice.o /root/Bela/projects/NonagonBar_Heavy/build/HvLightPipe.o /root/Bela/projects/NonagonBar_Heavy/build/HvControlSystem.o /root/Bela/projects/NonagonBar_Heavy/build/render.o /root/Bela/projects/NonagonBar_Heavy/build/HeavyContext.o /root/Bela/projects/NonagonBar_Heavy/build/HvHeavy.o /root/Bela/projects/NonagonBar_Heavy/build/Heavy_bela.o libraries/Midi/build/Midi.o libraries/Midi/build/Midi_c.o libraries/Scope/build/Scope.o libraries/Trill/build/Trill.o libraries/UdpServer/build/UdpServer.o   -lasound -lseasocks -lNE10   -Wl,--no-as-needed -L/usr/xenomai/lib -lcobalt -lmodechk -lpthread -lrt -lprussdrv -lstdc++  -Wl,--no-as-needed -L/usr/xenomai/lib -lcobalt -lmodechk -lpthread -lrt -lasound -lseasocks -lNE10 -lmathneon  -lmathneon
            /root/Bela/projects/NonagonBar_Heavy/build/render.o: In function `fdLoop(void*)':
            render.cpp:(.text+0x102): undefined reference to `sys_doio'
            /root/Bela/projects/NonagonBar_Heavy/build/render.o: In function `render':
            render.cpp:(.text+0x738): undefined reference to `libpd_start_message'
            render.cpp:(.text+0x750): undefined reference to `libpd_add_float'
            render.cpp:(.text+0x766): undefined reference to `libpd_finish_message'
            render.cpp:(.text+0x964): undefined reference to `libpd_sysrealtime'
            render.cpp:(.text+0x994): undefined reference to `libpd_pitchbend'
            render.cpp:(.text+0x9ae): undefined reference to `libpd_aftertouch'
            render.cpp:(.text+0x9c8): undefined reference to `libpd_programchange'
            render.cpp:(.text+0x9e6): undefined reference to `libpd_controlchange'
            render.cpp:(.text+0xa04): undefined reference to `libpd_polyaftertouch'
            render.cpp:(.text+0xa96): undefined reference to `libpd_noteon'
            render.cpp:(.text+0xab6): undefined reference to `libpd_noteon'
            render.cpp:(.text+0xfa4): undefined reference to `libpd_process_sys'
            render.cpp:(.text+0x14e8): undefined reference to `libpd_write_array'
            /root/Bela/projects/NonagonBar_Heavy/build/render.o: In function `cleanup':
            render.cpp:(.text+0x15ec): undefined reference to `libpd_closefile'
            /root/Bela/projects/NonagonBar_Heavy/build/render.o: In function `Bela_messageHook(char const*, char const*, int, _atom*)':
            render.cpp:(.text+0x1798): undefined reference to `libpd_get_float'
            render.cpp:(.text+0x17c2): undefined reference to `libpd_is_float'
            render.cpp:(.text+0x1834): undefined reference to `libpd_is_float'
            render.cpp:(.text+0x183e): undefined reference to `libpd_get_float'
            render.cpp:(.text+0x186e): undefined reference to `libpd_is_symbol'
            render.cpp:(.text+0x1ff2): undefined reference to `libpd_get_symbol'
            /root/Bela/projects/NonagonBar_Heavy/build/render.o: In function `setup':
            render.cpp:(.text+0x23e2): undefined reference to `sys_getversion'
            render.cpp:(.text+0x2690): undefined reference to `libpd_blocksize'
            render.cpp:(.text+0x26ac): undefined reference to `libpd_set_printhook'
            render.cpp:(.text+0x26b6): undefined reference to `libpd_set_floathook'
            render.cpp:(.text+0x26c0): undefined reference to `libpd_set_messagehook'
            render.cpp:(.text+0x26ca): undefined reference to `libpd_set_noteonhook'
            render.cpp:(.text+0x26d4): undefined reference to `libpd_set_controlchangehook'
            render.cpp:(.text+0x26de): undefined reference to `libpd_set_programchangehook'
            render.cpp:(.text+0x26e8): undefined reference to `libpd_set_pitchbendhook'
            render.cpp:(.text+0x26f2): undefined reference to `libpd_set_aftertouchhook'
            render.cpp:(.text+0x26fc): undefined reference to `libpd_set_polyaftertouchhook'
            render.cpp:(.text+0x2706): undefined reference to `libpd_set_midibytehook'
            render.cpp:(.text+0x270a): undefined reference to `libpd_init'
            render.cpp:(.text+0x2714): undefined reference to `libpd_add_to_search_path'
            render.cpp:(.text+0x271e): undefined reference to `libpd_add_to_search_path'
            render.cpp:(.text+0x2734): undefined reference to `libpd_init_audio'
            render.cpp:(.text+0x2738): undefined reference to `get_sys_soundin'
            render.cpp:(.text+0x2740): undefined reference to `get_sys_soundout'
            render.cpp:(.text+0x274a): undefined reference to `libpd_start_message'
            render.cpp:(.text+0x2752): undefined reference to `libpd_add_float'
            render.cpp:(.text+0x2762): undefined reference to `libpd_finish_message'
            render.cpp:(.text+0x2776): undefined reference to `libpd_bind'
            render.cpp:(.text+0x278a): undefined reference to `libpd_bind'
            render.cpp:(.text+0x2796): undefined reference to `libpd_bind'
            render.cpp:(.text+0x279e): undefined reference to `libpd_openfile'
            render.cpp:(.text+0x27ba): undefined reference to `sys_dontmanageio'
            render.cpp:(.text+0x2892): undefined reference to `libpd_arraysize'
            render.cpp:(.text+0x28b2): undefined reference to `libpd_start_message'
            render.cpp:(.text+0x28be): undefined reference to `libpd_add_float'
            render.cpp:(.text+0x28c8): undefined reference to `libpd_finish_message'
            render.cpp:(.text+0x28d8): undefined reference to `libpd_float'
            /root/Bela/projects/NonagonBar_Heavy/build/render.o: In function `sendDigitalMessage(bool, unsigned int, void*)':
            `render.cpp:(.text+0x76): undefined reference to `libpd_float'
            collect2: error: ld returned 1 exit status
            Makefile.linkbela:42: recipe for target '/root/Bela/projects/NonagonBar_Heavy/NonagonBar_Heavy' failed
            make[1]: *** [/root/Bela/projects/NonagonBar_Heavy/NonagonBar_Heavy] Error 1
            Makefile:526: recipe for target '/root/Bela/projects/NonagonBar_Heavy/NonagonBar_Heavy' failed
            make: *** [/root/Bela/projects/NonagonBar_Heavy/NonagonBar_Heavy] Error 2
            make: Leaving directory '/root/Bela'`

            that line

            Automatically detected PROJECT_TYPE: cpp

            suggests that there is no _main.pd file in the project folder. Can you show the output of ls /root/Bela/projects/NonagonBar_Heavy ?

            I still don't understand why you have all the files generated by the Heavy compiler, but you are using a render.cpp file that is for libpd. Could it be the case that you are trying to build a Heavy project, but including the wrong custom render.cpp in it?

              giuliomoro thanks a lot!! actually that's what happened. I am trying to make a heavy project out of my pd project. it compiles succesfully after i just used the render.cpp file from ~/Bela/scripts/hvresources/render.cpp. Only i have to alter the render.cpp file, as it is now not reading the sensor values (it just prints zero's), also the setup function for the sensors has got to be in there i think (or should i add these in a different location?) . Is there any way to convert the libpd version of the render.cpp file to one that works with heavy? or do i have to do that manually? (the lib pd version of the functions i wish to add is marked with //MODIFICATION START and //MODIFICATION END in the pasted render.cpp file above.)could you give me some directions?

              The process has to be done manually and it consists in applying to the default heavy render.cpp the same changes you applied to the default libpd render file. Part of that is straightforward (e.g.: the trill code), but sending messages to heavy has a different API to that to send them to libpd. It is explained here.

              I tried to port your changes, see if it works: here

              Thanks!! It compiled succesfully, but it now gives me either 0 or 26 as output, instead of the desired floating point values. I probably forgot to include something, or forgot to mark some code i included. I'll have a good look at the scripts, ill let you know when it works (or doesn't work 😛)

              The way i understand my code, what the below is doing is creating a message with numSensors+1 elements. The first element of the message is the number of sensors, and the following elements are the readings for each of the elements, which is my understanding of what your code was also doing. But I may be wrong on both accounts.

              	int numElements = touchSensorMain.numSensors() + 1;
              	HvMessage *msg = (HvMessage *) hv_alloca(hv_msg_getByteSize(numElements));
              	hv_msg_init(msg, numElements, 0.0);
              	hv_msg_setFloat(msg, 0, touchSensorMain.numSensors());
              	double delayMs = 0.0;
              	for(unsigned int n = 0; n < touchSensorMain.numSensors(); ++n)
              	{
              		hv_msg_setFloat(msg, 1 + n, touchSensorMain.rawData[n]/(2048.f));
              	}
              	hv_sendMessageToReceiver(gHeavyContext, bela_trill_main_hash, delayMs, msg);

              oh that makes so much sense now! i want to read 26 incoming signals and make a list out of it, this code actually added numSensors to that list as the first element. there is also a function which subtracts the highest incoming value from all elements in the list. because i only sent and printed the first value of the list to test if the code actually worked, it was always showing me 26 and (26-26)=0 :') when i altered the patch to send and print all incoming values, everything worked just fine. thank you so much for helping me through this process!

              no problem. Hopefully we will make it easier to modify the default heavy/libpd wrappers. For sure we are going to add Trill by default to these, so that you won't have to do this.