Re: [edk2] error while using StdLibPkg

Subject: Re: [edk2] error while using StdLibPkg

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

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

Date: 2012-03-27 01:36:19

I'm sorry to hear that you are having problems.
 
The problem you are seeing is most frequently caused by not having a function called main in your application.
    int main(int argc, char **argv)  { /* Body of the function. */ }
 
The fact that you are getting the error indicates that you are correctly specifying the LibC library class in your .INF and .DSC files.
 
Please look at the sample application, AppPkg\Applications\Main, for an example of a very simple "Hello World" application using StdLib.
 
In all cases, your entry point must be specified as ShellCEntryLib, as shown in the sample .INF files.
For your needs, the minimum set of [LibraryClasses] to specify in your application's .INF file are:
[LibraryClasses]
  LibC
  LibStdio
  DevShell

Daryl McDaniel 
 
“Software is like entropy.
 It is difficult to grasp, weighs nothing, and obeys the second law of thermodynamics;
 i.e. it always increases.”
-- Norman R. Augustine

 


From: kusum [mailto:kusumakar99@gmail.com]
Sent: Monday, March 26, 2012 1:20 AM
To: edk2-devel@lists.sourceforge.net
Subject: [edk2] error while using StdLibPkg


I want to use C Library functions(like fopen, fclose etc..) for UEFI Application Build. I followed all the steps given in StdLib/Readme.txt file to include C Library for my Application. The error I am getting while building is "unresolved external symbol main". Please help me to fix the issue.

Thanks,
Kusumakar Althi
--
Kusumakar Althi
Intern @Intel India

PLEASE SAVE TREES FOR THE NEXT GENERATION