ld.exe:找不到-lstrmbase [英] ld.exe: cannot find -lstrmbase
问题描述
<$>在使用gnu gcc编译器的代码块中,出现以下错误: c $ c> c:/ mingw / bin /../ lib / gcc / mingw32 / 4.6.2 /../../../../ mingw32 / bin / ld.exe:找不到 - lstrmbase
c:/ mingw / bin /../ lib / gcc / mingw32 / 4.6.2 /../../../../ mingw32 / bin / ld.exe:找不到-lz
collect2 :ld返回1退出状态
进程终止状态1(0分21秒)
2错误,0警告(0分21秒)
-
首先,确保您有strmbase.lib(或libstrmbase。 lib)和z.lib(libz.lib)在您的mingw lib目录中(在您的情况下它应该是c:/mingw/gcc/mingw32/4.6.2/)。
$ b其次,如果 do 存在,请尝试将c:/mingw/gcc/mingw32/4.6.2/添加到您的库搜索路径中。
可能有GUI选项,例如LIBRARY PATH,虽然是I不知道代码块。
或者,您可以将选项传递给gcc-L c:/mingw/gcc/mingw32/4.6.2/(它必须在-l ...标志之前)
编辑:
-
z.lib是 zlib 。您可以使用gcc构建它,或者从MinGW网站下载预构建的二进制文件(应位于MinGW - > Extension中)。
strmbase.lib来自< a href =http://msdn.microsoft.com/en-us/library/windows/desktop/dd375468%28v=vs.85%29.aspx =nofollow> DirectShow示例。您可以通过安装Windows SDK来获取其源代码。可能有人为MinGW分发prebuit二进制文件。
I am getting a the following error in code blocks using gnu gcc compiler, when I try to compile the code I get these errors:
c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../../mingw32/bin/ld.exe: cannot find- lstrmbase
c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../../mingw32/bin/ld.exe: cannot find -lz
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 21 seconds)
2 errors, 0 warnings (0 minutes, 21 seconds)
First, make sure you have strmbase.lib (or libstrmbase.lib) and z.lib (libz.lib) in your mingw lib directory (it should be "c:/mingw/gcc/mingw32/4.6.2/" in your case).
Second, if they do exist, try to add "c:/mingw/gcc/mingw32/4.6.2/" to your library search path.
There may be GUI option like "LIBRARY PATH" for that, although I don't know about code blocks.
Alternatively, you can pass an option to gcc "-L c:/mingw/gcc/mingw32/4.6.2/" (It must be before "-l..." flags)
EDIT:
z.lib is zlib. You can build it using your gcc or download prebuilt binary from MinGW web-site (should be inside MinGW -> Extension).
strmbase.lib is from DirectShow Samples. You can get its source code by installing Windows SDK. There might be someone distributing prebuit binary for MinGW.
这篇关于ld.exe:找不到-lstrmbase的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!