Skip to content

undefined reference to sys_microsleep()  #2

@giuliomoro

Description

@giuliomoro

@peter2708 libpd#136 (comment)

Has there been a change with the most recent bela os....

I'm getting linking errors such as:
/root/Bela/projects/bela_workshop/libpd-render-with-IMU.cpp:(.text+0x784): undefined reference to `sys_microsleep(int)'

We have tried with and without the libpd prefix before sys_microsleep.

Have a look at the most recent BelaPlatform/Bela core/default_libpd_render.cpp: the i/o loop is already in there, so you should not need to handle it separately in your render file.

#ifdef PD_THREADED_IO
void fdLoop(void* arg){
	t_pdinstance* pd_that = (t_pdinstance*)arg;
	while(!gShouldStop){
		sys_doio(pd_that);
		usleep(3000);
	}
}
#endif /* PD_THREADED_IO */

You may also be able to rescue your current render.cpp by declaring sys_microsleep() with C linkage:

extern "C"
{
void sys_microsleep(int);'
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions