Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - qnx4.25 linking error: unreference function statfs(): (3 Items)
   
qnx4.25 linking error: unreference function statfs()  
Hi everyone,

I have got a problem with statfs() function. When compiling, it issued an error: undefined symbol statfs_

I have included header file:

#include <sys/statfs.h>

How can I resolve this ?

Re: qnx4.25 linking error: unreference function statfs()  
what library you have linked your binary against?
Show the compiler line please.
Re: qnx4.25 linking error: unreference function statfs()  
This should be solved by adding the unix3r library.

For example, file test.c

#include <sys/statfs.h>
#include <stdio.h>

int main(void){
	struct statfs buffer;
	int ret;
	
	ret = statfs("/", &buffer, 0, 0);
	
	return 0;
}

can be compiled with the next command:

# cc test.c -lunix3r -o test