On Jan 31, 2014, at 4:47 PM, John Davis <[email protected]> wrote:

> 
> 
> On Fri, Jan 31, 2014 at 4:28 PM, Andrew Fish <[email protected]> wrote:
> 
> On Jan 31, 2014, at 4:11 PM, John Davis <[email protected]> wrote:
> 
>> Hello
>> 
>> I'm trying to #include <PeImage.h> in a .c file.
>> I think, but not certain that the inf file [LibraryClasses] determines the 
>> include path as well as libs to link.  With that said I added 
>> 
> 
> Include paths are inherited from packages. So it is the [Packages] section 
> you need to look at.
> For https://svn.code.sf.net/p/edk2/code/trunk/edk2/MdePkg/MdePkg.dec
> you will see that the public include path is MdePkg/Include so
> #include <IndustryStandard/PeImage.h>
> 
> 
> Hmm. I must have a broken source. If I edit that version of the file in my 
> sandbox which I believe came from edk2.zip it does not have that #include 
> line.
> 
> 
>  
> Also you could probably figure this out form grep’ing the source base:
> >git grep PeImage.h
> Include/Library/PeCoffLib.h:22:#include <IndustryStandard/PeImage.h>
> Include/Protocol/DebugSupport.h:24:#include <IndustryStandard/PeImage.h>
> Library/BasePeCoffGetEntryPointLib/PeCoffGetEntryPoint.c:23:#include 
> <IndustryStandard/PeImage.h>
> Library/BasePeCoffLib/BasePeCoffLibInternals.h:23:#include 
> <IndustryStandard/PeImage.h>
> 
> 
> 
> Yes, I found that later myself and changed it to #include 
> <IndustryStandard/PeImage.h> that change will cause it to at least find the 
> header file.  The code I'm trying to build will not build though.  It has 
> errors on EFI_LOADED_IMAGE amogst other things.  For that particular error I 
> am only finding EFI_LOADED_IMAGE_PROTOCOL in the source tree.
> 

#include <Protocol/LoadedImage.h>
https://svn.code.sf.net/p/edk2/code/trunk/edk2/MdePkg/Include/Protocol/LoadedImage.h


>  
>> [LibraryClasses]
>>   UefiApplicationEntryPoint
>>   UefiLib
>>   BaseLib
>> 
> 
> The LibraryClass is about what libraries you link against. The LibraryClass 
> implies a .h file that defines the LibraryClass, and that is what you 
> driver/application is coded against. The .DSC file picks a library instance 
> and that is what gets linked with your application/driver. By Implies I mean 
> your C code #includes the library headers it needs and calls Library 
> functions. The function of the [LibraryClasses] section is linking the 
> libraries. So if you miss a library class you will get link errors for those 
> lib functions. 
> 
> 
> I'm confused by what you say here.  Are you saying that this section is just 
> for libraries for linking?  It would appear that I need BaseLib here for the 
> linking if it ever links and the section above would be correct.
> 
> 

You only need to list libraries that your code calls. The libraries cal also 
have a LibraryClasses section and the build system will link all the library 
instances required to make the libraries link. So the library follows the same 
rules of list the libraries that it calls. 

Thanks,

Andrew Fish

> 
>  
> Thanks,
> 
> Andrew Fish
> 
> 
>> To my BaseLib to that section as shown, but it still does not pick it up 
>> during a > build all
>> 
>> -- 
>> John F. Davis
>> 6 Kandes Court
>> Durham, NC 27713
>> 919-888-8358
>> 
>> 独树一帜
>> 
>> 
>> ------------------------------------------------------------------------------
>> WatchGuard Dimension instantly turns raw network data into actionable 
>> security intelligence. It gives you real-time visual feedback on key
>> security issues and trends.  Skip the complicated setup - simply import
>> a virtual appliance and go from zero to informed in seconds.
>> http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk_______________________________________________
>> edk2-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/edk2-devel
> 
> 
> ------------------------------------------------------------------------------
> WatchGuard Dimension instantly turns raw network data into actionable
> security intelligence. It gives you real-time visual feedback on key
> security issues and trends.  Skip the complicated setup - simply import
> a virtual appliance and go from zero to informed in seconds.
> http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
> 
> 
> 
> 
> -- 
> John F. Davis
> 6 Kandes Court
> Durham, NC 27713
> 919-888-8358
> 
> 独树一帜
> 
> 
> ------------------------------------------------------------------------------
> WatchGuard Dimension instantly turns raw network data into actionable 
> security intelligence. It gives you real-time visual feedback on key
> security issues and trends.  Skip the complicated setup - simply import
> a virtual appliance and go from zero to informed in seconds.
> http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk_______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to