[if gte mso 9]>

Re: [edk2] Entry Point While Using int main (argc, **argv)

Subject: Re: [edk2] Entry Point While Using int main (argc, **argv)

From: "Mcdaniel, Daryl" <daryl.mcdaniel@intel.com>

To: "edk2-devel@lists.sourceforge.net" <edk2-devel@lists.sourceforge.net>

Date: 2013-12-03 08:50:52

As Jordan mentioned, one must add the statement

                !include StdLib/StdLib.inc

to their .dsc file.  This will cause the necessary Library Classes to be defined as well as setting up the build options needed for StdLib based applications.  This should go at the end of the .dsc file.

 

The ReadMe.txt file lists the dependencies between header files and libraries.  If all necessary libraries are not listed in the application’s .inf file, you will get unresolved external errors since the required libraries will not be searched.

 

The .dsc files in both AppPkg and StdLib have been designed as examples to be used for deriving files for your own packages.  Read the comments.

The .inf files from the sample applications in AppPkg can be used as examples.  The “Main” application is the simplest application and “Python” is the most complex.  Other than the number of source files, though, there isn’t much difference between the .inf files for “Main” and “Python”.

 

For experimentation, it is easiest to start by modifying the “Main” application within AppPkg.  This way you are starting with something that works so that you minimize the number of unknowns.

 

Daryl McDaniel
 
"I have always wished for my computer to be as easy to use as my telephone;

my wish has come true because I can no longer figure out how to use my telephone."

-- Bjarne Stroustrup

 

From: Nishit Patira [mailto:nishitpatira@gmail.com]
Sent: Thursday, November 28, 2013 7:59 PM
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] Entry Point While Using int main (argc, **argv)

 

Hii Justen,

Thanks for the help. I was able to resolve that issue.

However,now all the functions from StdLibPkg (fopen,fclose etc.) are now being shown as unresolved externals (error LNK2001)

My .inf file has  StdLib/StdLib.dec included in the [Packages.common] Section.

 

Could you tell me how to get around this problem??

 

 

Regards,

Nishit Patira

 

On Fri, Nov 29, 2013 at 9:22 AM, Jordan Justen <jljusten@gmail.com> wrote:

On Thu, Nov 28, 2013 at 5:00 AM, s.v.krishna reddy <svkr521@gmail.com> wrote:
> Your Pkg dsc does not have definition of LibC, that you are mentioning in
> .inf file. Can you  build Application package with "build -p
> apppkg\apppkg.dsc" and try to change in main.c to what you want.

I don't think Nishit needs to use AppPkg.dsc. More likely a separate
.dsc will be used, but you'd want to refer to:

AppPkg/ReadMe.txt =>
BUILD CONFIGURATION => DSC Files =>
"!include StdLib/StdLib.inc"

To configure the new .dsc for StdLib usage.

-Jordan


> On Thu, Nov 28, 2013 at 6:14 PM, Nishit Patira <nishitpatira@gmail.com>
> wrote:
>>
>> I am trying to build the code in Main.inf. But it is giving the error 4000
>> : Instance of Library Class [LibC] is not found in ..\Main.inf . Even though
>> that library class is mentioned in the [LibraryClasses] in Main.inf
>>
>>
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT
>> organizations don't have a clear picture of how application performance
>> affects their revenue. With AppDynamics, you get 100% visibility into your
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
>> Pro!
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>>
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel