Linking an external library into UEFI APPLICATION


Johnson, Chris (Tulsa) <chris.a.johnson@...>
 

Hello,

I am working with a UEFI APPLICATION and am trying to link an externally built static library. The external build system is using the same toolchain so the library should be compatible.

I have attempted to use this syntax in a dedicated INF:

[Binaries]
LIB|/path/to/lib/mylib.a


I have also tried this syntax in the application's INF:

GCC:*_*_*_DLINK_FLAGS = -L/path/to/lib/dir -l library_name


Is what I'm trying to do supported?

Thank you,

-Chris

________________________________

CONFIDENTIALITY NOTICE: This email and any attachments are for the sole use of the intended recipient(s) and contain information that may be Garmin confidential and/or Garmin legally privileged. If you have received this email in error, please notify the sender by reply email and delete the message. Any disclosure, copying, distribution or use of this communication (including attachments) by someone other than the intended recipient is prohibited. Thank you.


Michael D Kinney
 

Hi Chris,

Yes. It is supported from an INF. What error are you getting?

The .lib file is usually placed in the same dir or a subdir
below the INF file with the LIB statement.

Mike

-----Original Message-----
From: discuss@edk2.groups.io
[mailto:discuss@edk2.groups.io] On Behalf Of Johnson,
Chris (Tulsa)
Sent: Wednesday, August 14, 2019 2:39 PM
To: discuss@edk2.groups.io
Subject: [edk2-discuss] Linking an external library
into UEFI APPLICATION

Hello,

I am working with a UEFI APPLICATION and am trying to
link an externally built static library. The external
build system is using the same toolchain so the library
should be compatible.

I have attempted to use this syntax in a dedicated INF:

[Binaries]
LIB|/path/to/lib/mylib.a


I have also tried this syntax in the application's INF:

GCC:*_*_*_DLINK_FLAGS = -L/path/to/lib/dir -l
library_name


Is what I'm trying to do supported?

Thank you,

-Chris

________________________________

CONFIDENTIALITY NOTICE: This email and any attachments
are for the sole use of the intended recipient(s) and
contain information that may be Garmin confidential
and/or Garmin legally privileged. If you have received
this email in error, please notify the sender by reply
email and delete the message. Any disclosure, copying,
distribution or use of this communication (including
attachments) by someone other than the intended
recipient is prohibited. Thank you.