Include path problem

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Include path problem

1,490件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by netsupra on Mon Oct 22 07:00:19 MST 2012
Hello,

I have a problem while trying to compile the zlib and libpng for a LPC11C24 : whenever I try to build the project, the compiler saids :
c:\nxp\lpcxpresso_4.2.3_292\lpcxpresso\tools\bin\../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/include/sys/types.h:4:32: error: no include path in which to search for sys/types.h

Have you got any idea of how to solve this ?

Thank you,
netsupra
0 件の賞賛
返信
5 返答(返信)

1,345件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Wed Oct 24 02:41:46 MST 2012
I'm surprised :rolleyes: http://www.support.code-red-tech.com/CodeRedWiki/RedlibAndNewlib
0 件の賞賛
返信

1,345件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by netsupra on Wed Oct 24 02:34:05 MST 2012
Thank you for your help.
I've switched to newlib and it is working.
Further, Newlib uses more memory than Redlib for the same source code.
0 件の賞賛
返信

1,345件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Tue Oct 23 00:46:06 MST 2012
sys/types.h is provided for newlib.

Just switch your library to newlib and you can use it.

See
http://support.code-red-tech.com/CodeRedWiki/SwitchingCLibrary
and using Newlib (Nohost) or Newlib(Semihost)
0 件の賞賛
返信

1,345件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by daniel.widyanto on Mon Oct 22 21:47:30 MST 2012
Usually sys/types.h is referring to host's environment (eg. in Linux, FreeBSD or Win32), and I don't think CodeRed GCC toolchain library has it (no sys/types.h in CodeRed / Newlib libc headers)

I think you need to configure the zlib and libpng source code to not use the OS dependent files (including using autoconf to configure it as cross-compilation).
0 件の賞賛
返信

1,345件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by IntStarFoo on Mon Oct 22 09:10:15 MST 2012
I'm not sure about the specifics of your situation, but here are a few ideas that might help you find the problem...

Do you [I]#include "sys/types.h"[/I] in your code?  If so, you can select that line in your code and press F3 (or right click->Open Declaration).  That should open the actual file up.  From there, you should see the location of the file and make sure that it is in your include paths for that project (Make sure you have the project selected, click "Quick Settings" button on the toolbar then select "Include paths")

Also, it could have something to do with using REDLIB vs NEWLIB.  Look that up under your project defines  (Make sure you have the project selected, click "Quick Settings" button on the toolbar then select "Defined Symbols").  You might have to read about differences between REDLIB and NEWLIB in other areas for help.
0 件の賞賛
返信