Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: ZipLoader  (Read 3302 times)

0 Members and 1 Guest are viewing this topic.

mopie

  • Newbie
  • *
  • Posts: 9
    • View Profile
ZipLoader
« on: December 18, 2009, 05:47:01 pm »
Hi,

I was trying to test the exemple of the ZipLoader working with zlib and minizip.

I am not able to compile it on windows/linux.

I have downloaded zlib123.zip http://www.winimage.com/zLibDll/zlib123.zip  on linux.
Quote
mopie@mopie-desktop 196)make clean
rm -f *.o *~ example minigzip \
      libz.* foo.gz so_locations \
      _match.s maketree contrib/infback9/*.o
(mopie@mopie-desktop 197)make
cc -O   -c -o example.o example.c
cc -O   -c -o adler32.o adler32.c
cc -O   -c -o compress.o compress.c
cc -O   -c -o crc32.o crc32.c
cc -O   -c -o gzio.o gzio.c
cc -O   -c -o uncompr.o uncompr.c
cc -O   -c -o deflate.o deflate.c
cc -O   -c -o trees.o trees.c
cc -O   -c -o zutil.o zutil.c
cc -O   -c -o inflate.o inflate.c
cc -O   -c -o infback.o infback.c
cc -O   -c -o inftrees.o inftrees.c
cc -O   -c -o inffast.o inffast.c
ar rc libz.a adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o
cc -O -o example example.o libz.a
cc -O   -c -o minigzip.o minigzip.c
cc -O -o minigzip minigzip.o libz.a
(mopie@mopie-desktop 198)cd ..
(mopie@mopie-desktop 199)g++ -Iminizip/contrib/minizip -lsfml-system -Lzlib-1.2.3 -lz ZipLoader.cpp main.cpp
/tmp/cc57acPv.o: In function `Zip::LoadZipFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int&)':
ZipLoader.cpp:(.text+0x3fc): undefined reference to `unzOpen'
ZipLoader.cpp:(.text+0x448): undefined reference to `unzLocateFile'
ZipLoader.cpp:(.text+0x468): undefined reference to `unzOpenCurrentFile'
ZipLoader.cpp:(.text+0x4bf): undefined reference to `unzGetCurrentFileInfo'
ZipLoader.cpp:(.text+0x4f5): undefined reference to `unzReadCurrentFile'
ZipLoader.cpp:(.text+0x50b): undefined reference to `unzCloseCurrentFile'
ZipLoader.cpp:(.text+0x516): undefined reference to `unzClose'
collect2: ld returned 1 exit status
(mopie@mopie-desktop 200)


I have no idea why it doesnot work.

Have any suggestions ?

Thanks

 

anything