Jump to content
  • 0

Vitis - implicit declaration of 'read'; did you mean 'fread'



Hello all,

I have a build warning in my code:

implicit declaration of 'read'; did you mean 'fread'? [-Wimplicit-function-declaration]

The code works but the warning is annoying.

I tried including <unistd.h> to pull in the declaration but that results in a build failure:

conflicting types for 'sleep'
conflicting types for 'usleep'

Does anyone know what header can be included in Vitis to correctly get the prototype of 'read'?


Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hi @Hartley

Assuming your project is a baseline Baremetal project, file I/O isn't necessarily implemented. You might need to bring in additional libraries that allow you to interact with a file system on, for example, an SD card. - I assume it's not baremetal if read works despite the warning.

What's your project? Is this Vitis HLS or "plain-old" Vitis? Is this a petalinux project?



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...