cannot convert 'FILE*' {aka '__sFILE*'} to 'FIL*'

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

cannot convert 'FILE*' {aka '__sFILE*'} to 'FIL*'

Jump to solution
1,358 Views
Alberto_isorna
Contributor II

I'm trying to compress to jpeg an image to save it on the sd card and read it. 

I'm using the AN examples (AN12110.pdf) on the iMXRT1064 board.

I can't compile because when I try to f_open the file I have the following problem: 

cannot convert 'FILE*' {aka '__sFILE*'} to 'FIL*'

The thing is my file should be an FILE object in order to process it well with JPEGLIB, if I change it to FIL I have other problems with Jpeglib, i just want to save a photo in the sd.

Could you please help me how could I manage this? 

Also in the example in (AN12110.pdf) they use the function with a FILE not a FIL.

Find attached the main code problem at line 797 and just the function. error.png

0 Kudos
1 Solution
1,343 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello @Alberto_isorna ,

Looking at the FIL and FILE data type in the jconfig.h in the AN12110 software it looks like these are the same:

Alexis_A_0-1604711434123.png

If this is the case, you should be able to cast to FILE/FIL if not using the same data type cause issues with the compiler.

Best Regards,

Alexis Andalon

 

View solution in original post

0 Kudos
1 Reply
1,344 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello @Alberto_isorna ,

Looking at the FIL and FILE data type in the jconfig.h in the AN12110 software it looks like these are the same:

Alexis_A_0-1604711434123.png

If this is the case, you should be able to cast to FILE/FIL if not using the same data type cause issues with the compiler.

Best Regards,

Alexis Andalon

 

0 Kudos