ARON
-l 格式:
如果你指定 -lname
那么库文件的名字就是 libname.a,如果你的库在 C:/A/B/C/
目录下
那么还要增加一个 -LC:/A/B/C
参数,路径可以是相对的
建议你可以把参数改成:
-lcst92f42
-lcst92f42_from_peripheral_ext
然后把库文件名也按照格式重命名一下
libcst92f42.a
libcst92f42_from_peripheral_ext.a
https://sourceware.org/binutils/docs/ld/Options.html
-l namespec
--library=namespec
Add the archive or object file specified by to the list of files to link. This option may be used any number of times. If is of the form , will search the library path for a file called , otherwise it will search the library path for a file called . namespecnamespec:filenameldfilenamelibnamespec.a
On systems which support shared libraries, may also search for files other than . Specifically, on ELF and SunOS systems, will search a directory for a library called before searching for one called . (By convention, a extension indicates a shared library.) Note that this behavior does not apply to , which always specifies a file called . ldlibnamespec.aldlibnamespec.solibnamespec.a.so:filenamefilename
The linker will search an archive only once, at the location where it is specified on the command line. If the archive defines a symbol which was undefined in some object which appeared before the archive on the command line, the linker will include the appropriate file(s) from the archive. However, an undefined symbol in an object appearing later on the command line will not cause the linker to search the archive again.
See the option for a way to force the linker to search archives multiple times. -(
You may list the same archive multiple times on the command line.
This type of archive searching is standard for Unix linkers. However, if you are using on AIX, note that it is different from the behaviour of the AIX linker. ld