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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With