> On May 23, 2016, at 2:05 PM, Aaron Viviano <[email protected]> > wrote: > > Hello, > I've been trying to reference the LibTime, so I can use Time.h, when I got > the following error: > > c:\src\edk2\MdeModulePkg\MdeModulePkg.dsc(...): error 4000: Instance of > library class [LibTime] is not found > in [c:\src\edk2\SpacelabsPkg\Application\BootScreen\Spacelabs.inf] > [X64] > consumed by module > [c:\src\edk2\SpacelabsPkg\Application\BootScreen\Spacelabs.inf] > > I've checked MdeModulePkg and it doesn't seem to reference stdlib or libc (as > far as I can tell), whereas the AppPkg does. Is this the source of my error? > I'm guessing I'm missing something critical here in my .inf file. Here are > the relevant sections from my app's .inf file: >
No your INF file lists the library class. The library class is the name of the library and the public header you code to. So an application/driver codes to a library class. The platform DSC files picks which library instances get used for each library class for every module type. For example different BaseMemoryLib (CopyMem) instance gets used for PEI and DXE as they are optimized for the environment. Did you add !include StdLib/StdLib.inc to MdeModulePkg\MdeModulePkg.dsc? [LibraryClasses.Common.UEFI_APPLICATION] ... LibTime|StdLib/LibC/Time/Time.inf It only resolves the mapping for modules of type LibraryClasses.Common.UEFI_APPLICATION. Are you building a driver? If you are not building an UEFI_APPLICATION then you need to add a , after LibraryClasses.Common.UEFI_APPLICATION and add your module type to get it to work. The module type you are using is in the part of the INF you did not include. [LibraryClasses.Common.UEFI_APPLICATION,[LibraryClasses.Common.UEFI_DRIVER] You could also add a DSC file to SpacelabsPkg and just build the things you car about. Thanks, Andrew Fish > [Packages] > MdePkg/MdePkg.dec > MdeModulePkg/MdeModulePkg.dec > StdLib/StdLib.dec > > [LibraryClasses] > LibC > LibTime > UefiApplicationEntryPoint > UefiLib > PcdLib > ImageDecoderLib > BaseLib > BaseMemoryLib > > Thank you, > > Aaron Viviano > Spacelabs Healthcare > _______________________________________________ > edk2-devel mailing list > [email protected] > https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

