在移植Cyrus sasl(cyrus-sasl-2.1.23)库时碰到如下问题(使用mingw编译):
fu000001.o:(.idata$2+0xc): undefined reference to `libmsvcrt_a_iname'
fu000004.o:(.idata$2+0xc): undefined reference to `libmsvcrt_a_iname'
fu000006.o:(.idata$2+0xc): undefined reference to `libmsvcrt_a_iname'
fu000008.o:(.idata$2+0xc): undefined reference to `libmsvcrt_a_iname'
nmth000000.o:(.idata$4+0x0): undefined reference to `_nm___iob'
collect2: ld returned 1 exit status
mingw32-make[2]: *** [debug\libsasl.dll] Error 1
mingw32-make[1]: *** [debug] Error 2
mingw32-make: *** [sub-lib-make_default-ordered] Error 2
The process "E:\QtSDK\mingw\bin\mingw32-make.exe" exited with code 2.
下面描述一下解决过程:
1)首先是上网搜索:看他人是怎么解决的。有数十个有关这个问题的帖子,绝大多数没有说是什么原因,不了了之。有人说是链接库的顺序问题,我调整了半天链接库顺序,均没有效果。另外添加了各种可