Thanks that will be great - and I've noticed the way stdlib is currently
implemented, it conflicts with trying to build with a .cpp module.  Things
like /Zc:wchar_t conflicts with other things that specifically need
/Zc:wchar_t- (#error in EfiCdefs.h) and then attempting to use <wchar.h>
causes issues because it doesn't define the wchar_t type.


On Fri, Feb 1, 2013 at 5:15 PM, Mcdaniel, Daryl <daryl.mcdan...@intel.com>wrote:

>  Currently, StdLib is only for building applications which run under the
> Shell.  StdLib also constructs an environment, as specified by ISO/IEC
> 9899:199409 (the C Language Specification), to support the signal(),
> abort(), exit handlers, and environment variables (NOT EFI variables).
> Currently, this environment is monolithic and, even though dynamically
> generated, a bit too large for drivers.****
>
> ** **
>
> A version suitable for writing device drivers as well as OS loaders should
> be available later this year.****
>
> ** **
>
> Please examine the ReadMe.txt files in StdLib and AppPkg.  Also, the
> AppPkg.dsc file and StdLib.dsc files are intended to be used as examples
> that can be copied to become the basis of new projects.  There are numerous
> comments pertaining to use with StdLib in them.  The applications in AppPkg
> are examples of several types of applications with varying complexity.****
>
> ** **
>
> Daryl McDaniel****
>
> ** **
>
> *From:* David F. [mailto:df7...@gmail.com]
> *Sent:* Friday, February 01, 2013 4:02 PM
> *To:* edk2-devel@lists.sourceforge.net
> *Subject:* Re: [edk2] Adding printf via StdLib****
>
> ** **
>
> Okay, I found some of the examples in AppPkg and got my hello to work by
> setting the ENTRY_POINT to ShellCEntryLib and the other stuff below.  But
> then looking at what ShellCEntryLib does is use a protocol
> gEfiShellParametersProtocolGuid which is setup by the Shell when it
> executes the application.  So does that mean you can only use StdLib
> through the Shell or is it simply that the sample apps used the shell to
> take care of command line arguments and the rest of StdLib doesn't rely on
> anything from the shell?
>
> The Other Stuff mentioned above:
> [Packages]
>   StdLib/StdLib.dec
>   MdePkg/MdePkg.dec
>   ShellPkg/ShellPkg.dec
>
> [LibraryClasses]
>   LibC
>   LibStdio
>   DevShell****
>
> ** **
>
> On Fri, Feb 1, 2013 at 11:06 AM, Andrew Fish <af...@apple.com> wrote:****
>
> ** **
>
> On Feb 1, 2013, at 10:46 AM, "David F." <df7...@gmail.com> wrote:****
>
>
>
> ****
>
> Is that an optional thing some packages may include, some type of .inc
> file?  Anyway, did that and that leads to:****
>
> ** **
>
> Yes that .inc is just connivence, and not common. ****
>
>
>
> ****
>
> c:\edk2\testpkg\testpkg.dsc(...): error 4000: Instance of library class
> [HiiLib] is not found
>         in [c:\edk2\ShellPkg\Library\UefiShellLib\UefiShellLib.inf] [X64]
>         consumed by module [c:\edk2\testpkg\hello\hello.inf]
>
> ****
>
> But I didn't see any .inc file in the EdkCompatibilityPkg folder which is
> the only place I found HiiLib via:****
>
> ** **
>
> Don't use the EdkCompatiblityPkg it is for backwards compatibility with
> EDK code, not new code.****
>
> ** **
>
>  C:\edk2>dir hiilib /s
>  Volume in drive C is Windows 7
>  Volume Serial Number is 5233-4330
>
>  Directory of
> C:\edk2\EdkCompatibilityPkg\Foundation\Library\EdkIIGlueLib\Library
>
> 01/31/2013  06:37 PM    <DIR>          HiiLib
>                0 File(s)              0 bytes****
>
> ** **
>
>  ** **
>
> You need to search .INF files for a LIBRARY_CLASS =  HiiLib statement in
> the [Defines] section. ****
>
>
> https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
> ****
>
> ** **
>
> A library class is a name (HiiLib) that is associated with a public
> include file (
> https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/MdeModulePkg/Include/Library/HiiLib.h
> ).****
>
> ** **
>
> There can be a large number of instances of the lib (
> https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf).
> The instance is the implementation of the lib. ****
>
> ** **
>
> The DSC file maps the library class to the library implementation that you
> want to use when you compile your application/driver. ****
>
> ** **
>
> Thanks,****
>
> ** **
>
> Andrew Fish****
>
>
>
> ****
>
> ** **
>
> On Fri, Feb 1, 2013 at 10:16 AM, Tim Lewis <tim.le...@insyde.com> wrote:**
> **
>
> David –****
>
>  ****
>
> The easiest way is just to put****
>
>  ****
>
> !include StdLib\StdLib.inc****
>
>  ****
>
> At the end of your testpkg.dsc****
>
>  ****
>
>  ****
>
>  ****
>
> *From:* David F. [mailto:df7...@gmail.com]
> *Sent:* Friday, February 01, 2013 10:11 AM
> *To:* edk2-devel@lists.sourceforge.net
> *Subject:* [edk2] Adding printf via StdLib****
>
>  ****
>
> Hi,****
>
> Still learning the build system - I used the driver wizard to create a new
> package and driver, modified to be application, and used the SystemTable to
> print out some text.  That all worked fine, so my next step is to use
> printf instead.  So I added Stdio|StdLib/LibC/Stdio/Stdio.inf to the .dsc
> file and in the .inf file added   StdLib/StdLib.dec under [Packages] and
> Stdio under [LibraryClasses], changed code to use printf(L"text"), then
> tried to build but it stops with
>
> c:\edk2\testpkg\testpkg.dsc(...): error 4000: Instance of library class
> [LibC] is not found
>         in [c:\edk2\StdLib\LibC\Stdio\Stdio.inf] [X64]
>         consumed by module [c:\edk2\testpkg\hello\hello.inf]****
>
> Do I have to somehow figure out all the different library classes and add
> them to the .dsc file, or can't it just find itself??
>
> TIA!!****
>
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_jan
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel****
>
> ** **
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
>
> http://p.sf.net/sfu/appdyn_d2d_jan_______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel****
>
> ** **
>
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_jan
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel****
>
> ** **
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_jan
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>
>
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to