On Feb 21, 2014, at 8:22 AM, John Davis <davi...@gmail.com> wrote:

> Hello
> 
> Is there an official source for something a little more complex than the 
> helloworld application?  I'm trying to use it as a model for something more 
> complex and I can not get simple types to even build.  I see that UINT32 is 
> in the edkcompatibilitypkg dir and I have added it to my [packages] section 
> in my .inf file but I still can't get the include files in the foundation 
> subdir beneath there to satisfy my build requirements.
> 

The EdkCompatabilityPkg is for EDK style applications, not edk2 style 
applications. So that is just making things worse. 

There is no stdlib.h for EFI Applications. Like: 
https://svn.code.sf.net/p/edk2/code/trunk/edk2/MdeModulePkg/Application/HelloWorld/HelloWorld.inf

If you need things StdLib then you need to use that package and follow the 
example: 
https://svn.code.sf.net/p/edk2/code/trunk/edk2/AppPkg/Applications/Main/Main.inf

Thanks,

Andrew Fish

> Here is my setup:
> 
> The .inf file:
> [Sources]
>   MyFindRom.c
> 
> [Packages]
>   MdePkg/MdePkg.dec
>   MdeModulePkg/MdeModulePkg.dec
>   EdkCompatibilityPkg/EdkCompatibilityPkg.dec
> 
> [LibraryClasses]
>   UefiApplicationEntryPoint
>   UefiLib
>   PcdLib
> 
> The .c includes
> /** @file
> **/
> 
> #include <Uefi.h>
> 
> #include <stdlib.h>
> #include <EfiTypes.h>
> 
> // EdkCompatibilityPkg\Foundation\Efi\Include\EfiTypes.h:typedef uint32_t 
> UINT32;
> #include <Library/PcdLib.h>
> #include <Library/UefiLib.h>
> #include <Library/UefiApplicationEntryPoint.h>
> 
> 
> # the error in build
> 
>         "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Vc\bin\cl.exe" 
> /Foc:\fw\edk2\Build\NT32IA32\DEBUG_VS2010x86\IA32\MdeModulePkg\Universal\Network\DpcDxe\DpcDxe\OUTPUT\.\
> Dpc.obj /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h 
> /EHs-c- /GR- /GF /Gy /Zi /Gm 
> /Ic:\fw\edk2\MdeModulePkg\Universal\Network\DpcDxe  /Ic:\fw\edk2\Build\NT32
> IA32\DEBUG_VS2010x86\IA32\MdeModulePkg\Universal\Network\DpcDxe\DpcDxe\DEBUG  
> /Ic:\fw\edk2\MdePkg  /Ic:\fw\edk2\MdePkg\Include  
> /Ic:\fw\edk2\MdePkg\Include\Ia32  /Ic:\fw\edk2\MdeMo
> dulePkg  /Ic:\fw\edk2\MdeModulePkg\Include 
> c:\fw\edk2\MdeModulePkg\Universal\Network\DpcDxe\Dpc.c
> c:\fw\edk2\MdeModulePkg\Application\MyFindRom\MyFindRom.c(7) : fatal error 
> C1083: Cannot open include file: 'EfiTypes.h': No such file or directory
> Dpc.c
> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 
> 10.0\Vc\bin\cl.exe"' : return code '0x2'
> Stop.
> 
> # if I remove the EfiTypes.h in the .c source, this is my error:
> c:\fw\edk2\MdeModulePkg\Application\MyFindRom\MyFindRom.c(81) : error C2275: 
> 'UINT32' : illegal use of this type as an expression
>         c:\fw\edk2\MdePkg\Include\Ia32\ProcessorBind.h(116) : see declaration 
> of 'UINT32'
>         "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Vc\bin\cl.exe" 
> /Foc:\fw\edk2\Build\NT32IA32\DEBUG_VS2010x86\IA32\MdeModulePkg\Un
> UTPUT\.\HiiDatabaseEntry.obj /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE 
> /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Ic:\fw\edk2\Md
> c:\fw\edk2\Build\NT32IA32\DEBUG_VS2010x86\IA32\MdeModulePkg\Universal\HiiDatabaseDxe\HiiDatabaseDxe\DEBUG
>   /Ic:\fw\edk2\MdePkg  /Ic:\fw\edk2\
> lude\Ia32  /Ic:\fw\edk2\MdeModulePkg  /Ic:\fw\edk2\MdeModulePkg\Include 
> c:\fw\edk2\MdeModulePkg\Universal\HiiDatabaseDxe\HiiDatabaseEntry.c
> c:\fw\edk2\MdeModulePkg\Application\MyFindRom\MyFindRom.c(81) : error C2146: 
> syntax error : missing ';' before identifier 'include'
> c:\fw\edk2\MdeModulePkg\Application\MyFindRom\MyFindRom.c(81) : error C2065: 
> 'include' : undeclared identifier
> 
> fwiw, I have UINT32 include; in my .c source.
> 
> 
> -- 
> John F. Davis
> 6 Kandes Court
> Durham, NC 27713
> 919-888-8358
> 
> 独树一帜
> 
> 
> ------------------------------------------------------------------------------
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
> http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk_______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel


------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to