在移植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)首先是上网搜索:看他人是怎么解决的。有数十个有关这个问题的帖子,绝大多数没有说是什么原因,不了了之。有人说是链接库的顺序问题,我调整了半天链接库顺序,均没有效果。另外添加了各种可
本文详细介绍了在使用mingw编译过程中遇到的undefined reference to `libmsvcrt_a_iname'错误的解决过程。问题源于mingw编译时错误地引用了VS的stdio.h文件。虽然使用VS编译无误,但在mingw环境下,由于同时使用了pthread库,导致需要mingw编译。目前尚未找到避免引用VS头文件的方法,期待对此有兴趣的读者进行研究并提供解决方案。

1402

被折叠的 条评论
为什么被折叠?



