Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
604 views
in Technique[技术] by (71.8m points)

c - MinGW "The procedure entry point libiconv could not be located ..."

I've got a standard C library that compiles just fine on Mac OS X using gcc.

I've examined the C compilers available for Windows, and choose MinGW for a couple reasons:

  • MS's tools don't support C99
  • Cygwin et. al. adds an extra level of complexity with the posix emulation that I don't want
  • Can't get lcc-win32 to work

But, when I try to build my library, I'm getting this:

enter image description here

This stuff all seems very archaic, and there are practically no decent resources online that I can find.

Any help would be greatly appreciated.

Thanks.

EDIT:

It doesn't matter what I'm trying to build. Even if I just make a single file with a function that adds two numbers. It crashes. Doesn't seem to have anything to do with the source code or the options passed to gcc at all. I think this is a problem with my MinGW setup and not with my project.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Make sure you have C:MinGWin in your path before any other directory that contains libiconv-2.dll. Apparently the as.exe in some MinGW distributions are dependent on that DLL, and having an older version of it in the path somewhere (for example GnuWin32 tools) will cause as.exe to pick up the older version that doesn't have the entry point it's looking for.

See: http://sourceforge.net/tracker/index.php?func=detail&aid=3375870&group_id=200665&atid=974439

Note - you should be able to replace the older libiconv-2.dll with the newer one in MinGWin - the naming of the DLL should mean that it's backward compatible with the older one (ie., older software that isn't dependent ont he newer exports should continue to work). However, I haven't tested that so be sure to backup if you do decide to try replacing the conflicting DLL with the one from your MinGW installation.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...