Output arguments for linking the Perl library and extensions to your application.

When invoked as `perl -MExtUtils::Embed -e ldopts --` the following options are recognized:

-std

Output arguments for linking the Perl library and any extensions linked with the current Perl.

-I <path1:path2>

Search path for ModuleName.a archives. Default path is @INC. Library archives are expected to be found as /some/path/auto/ModuleName/ModuleName.a For example, when looking for Socket.a relative to a search path, we should find auto/Socket/Socket.a

When looking for DBD::Oracle relative to a search path, we should find auto/DBD/Oracle/Oracle.a

Keep in mind that you can always supply /my/own/path/ModuleName.a as an additional linker argument.

-- <list of linker args>

Additional linker arguments to be considered.

Any additional arguments found before the -- token are expected to be names of modules to generate code for.

When invoked with parameters the following are accepted and optional:

ldopts($std,[@modules],[@link_args],$path)

Where:

$std is boolean, equivalent to the -std option.

[@modules] is equivalent to additional arguments found before the -- token.

[@link_args] is equivalent to arguments found after the -- token.

$path is equivalent to the -I option.

In addition, when ldopts is called with parameters, it will return the argument string rather than print it to STDOUT.

This will print arguments for linking with libperl and extensions found in $Config{static_ext}. This includes libraries found in $Config{libs} and the first ModuleName.a library for each extension that is found by searching @INC or the path specified by the -I option. In addition, when ModuleName.a is found, additional linker arguments are picked up from the extralibs.ld file in the same directory.

perl -MExtUtils::Embed -e ldopts -- -std Socket

This will do the same as the above example, along with printing additional arguments for linking with the Socket extension.