Discussion:
[edk2] sprintf
Foster, Matthew I
2015-08-27 16:42:13 UTC
Permalink
Does anyone know a way to use sprintf in EDK, or a library I can include to do the equivalent?

I tried to use it and include stdio.h but when it goes to link the library it cannot find the symbol.

Thanks!
Andrew Fish
2015-08-27 16:55:54 UTC
Permalink
Post by Foster, Matthew I
Does anyone know a way to use sprintf in EDK, or a library I can include to do the equivalent?
Well this is the edk2 mailing list, so I don’t remember EDK any more
.
Post by Foster, Matthew I
I tried to use it and include stdio.h but when it goes to link the library it cannot find the symbol.
If you are an App and you don’t mind all the extra overhead of the C Lib you can do this: https://github.com/tianocore/edk2/blob/master/AppPkg/Applications/Main/Main.inf <https://github.com/tianocore/edk2/blob/master/AppPkg/Applications/Main/Main.inf>

All the drivers, and most of the edk2 code just uses: https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Library/PrintLib.h <https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Library/PrintLib.h>

Thanks,

Andrew Fish
Foster, Matthew I
2015-08-27 17:07:23 UTC
Permalink
Thanks Andrew, I meant EDK2. I should have known to look at the PrintLib! Thanks!

From: Andrew Fish [mailto:***@apple.com]
Sent: Thursday, August 27, 2015 9:56 AM
To: Foster, Matthew I
Cc: edk2-***@lists.sourceforge.net
Subject: Re: [edk2] sprintf


On Aug 27, 2015, at 9:42 AM, Foster, Matthew I <***@intel.com<mailto:***@intel.com>> wrote:

Does anyone know a way to use sprintf in EDK, or a library I can include to do the equivalent?


Well this is the edk2 mailing list, so I don’t remember EDK any more
.


I tried to use it and include stdio.h but when it goes to link the library it cannot find the symbol.


If you are an App and you don’t mind all the extra overhead of the C Lib you can do this: https://github.com/tianocore/edk2/blob/master/AppPkg/Applications/Main/Main.inf

All the drivers, and most of the edk2 code just uses: https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Library/PrintLib.h

Thanks,

Andrew Fish

Continue reading on narkive:
Loading...