User forums > Help

first use of C::B >> undefined references

(1/3) > >>

MoonKid:
I started a project on a foreign IDE (Dev-C++) with "libzip" on MinGW. The project compiled in the IDE.

Now I tried to migrate the project to C::B. The compiler runs. It is ok.
But the linker says:

<linker>
Compiling: libzip\lib\zip_unchange_data.c
Linking console executable: E:\Garage\projekte\OctopusBackup\OctopusBackup.exe
.objs\libzip\lib\zip_fread.o:zip_fread.c:(.text+0x10d): undefined reference to `crc32'
.objs\libzip\lib\zip_fread.o:zip_fread.c:(.text+0x166): undefined reference to `inflate'
.objs\libzip\lib\zip_fread.o:zip_fread.c:(.text+0x201): undefined reference to `crc32'
.objs\libzip\lib\zip_close.o:zip_close.c:(.text+0xd5c): undefined reference to `crc32'
.objs\libzip\lib\zip_close.o:zip_close.c:(.text+0xdd7): undefined reference to `deflateInit2_'
.objs\libzip\lib\zip_close.o:zip_close.c:(.text+0xe8d): undefined reference to `deflateEnd'
.objs\libzip\lib\zip_close.o:zip_close.c:(.text+0xef4): undefined reference to `crc32'
.objs\libzip\lib\zip_close.o:zip_close.c:(.text+0xf1b): undefined reference to `deflate'
.objs\libzip\lib\zip_close.o:zip_close.c:(.text+0x101c): undefined reference to `deflateEnd'
.objs\libzip\lib\zip_error_strerror.o:zip_error_strerror.c:(.text+0xae): undefined reference to `zError'
.objs\libzip\lib\zip_error_to_str.o:zip_error_to_str.c:(.text+0x81): undefined reference to `zError'
.objs\libzip\lib\zip_fclose.o:zip_fclose.c:(.text+0x1a): undefined reference to `inflateEnd'
.objs\libzip\lib\zip_fopen_index.o:zip_fopen_index.c:(.text+0x3ba): undefined reference to `inflateInit2_'
.objs\libzip\lib\zip_fopen_index.o:zip_fopen_index.c:(.text+0x684): undefined reference to `crc32'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 22 seconds)
0 errors, 0 warnings
</linker>

I am not sure what is wrong, and where I have to search for the error.

MoonKid:
sorry...

I use C::B (rc2) on win98se with gnu gcc

sethjackson:
You do not have the correct libs linked in.... You need to link in zlib. That would be wxzlib if you use wxWidgets.....

MoonKid:
In the C::B I do not find any zlib-files.

I got a own zlib release from the website zlib.org. In my project settings(default target) i added the lib-directory.
But it has no effect. Why?

I added a lib explicite in the linker options. First I tried "zlib.lib". But then the exe asked for "zlib1.dll". Now I am using "libz.a". You know why there are so many different "versions" (?) for zlib?

On my Dev-C++ IDE I only added the lib-directory to the project and all the other things worked.

MoonKid:
> That would be wxzlib if you use wxWidgets.....

What is this? I know what wxWidgets are, but what have this to do with zlib? I can not find any wxzlib-file on my system.

Navigation

[0] Message Index

[#] Next page

Go to full version