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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
1,373 次查看
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 项奖励
1 解答
1,358 次查看
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 项奖励
1 回复
1,359 次查看
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 项奖励