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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - mopie

Pages: [1]
1
General / 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

2
Graphics / sfml and opengl
« on: December 11, 2009, 05:07:43 pm »
hello.

I'm discovering sfml lib and i would like to be able to use opengl.

I pasted the code of the tutorial (http://www.sfml-dev.org/tutorials/1.5/window-opengl-fr.php).

I was not compiling because of errors during the linkage.

Code: [Select]

Error 1 error LNK2001: unresolved external symbol __imp__glDeleteTextures@8 main.obj
Error 2 error LNK2001: unresolved external symbol __imp__glClearDepth@8 main.obj
Error 3 error LNK2001: unresolved external symbol __imp__glClear@4 main.obj
Error 4 error LNK2001: unresolved external symbol __imp__glTexCoord2f@8 main.obj
Error 5 error LNK2001: unresolved external symbol __imp__glEnd@0 main.obj
Error 6 error LNK2001: unresolved external symbol __imp__glBindTexture@8 main.obj
Error 7 error LNK2001: unresolved external symbol __imp__glBegin@4 main.obj
Error 8 error LNK2001: unresolved external symbol __imp__glDepthMask@4 main.obj
Error 9 error LNK2001: unresolved external symbol __imp__glColor4f@16 main.obj
Error 10 error LNK2001: unresolved external symbol __imp__glTexParameteri@12 main.obj
Error 11 error LNK2001: unresolved external symbol __imp__glRotatef@16 main.obj
Error 12 error LNK2001: unresolved external symbol __imp__glVertex3f@12 main.obj
Error 13 error LNK2001: unresolved external symbol __imp__glMatrixMode@4 main.obj
Error 14 error LNK2001: unresolved external symbol __imp__glViewport@16 main.obj
Error 15 error LNK2001: unresolved external symbol __imp__glTranslatef@12 main.obj
Error 16 error LNK2001: unresolved external symbol __imp__glEnable@4 main.obj
Error 17 error LNK2001: unresolved external symbol __imp__glGenTextures@8 main.obj
Error 18 error LNK2001: unresolved external symbol __imp__glLoadIdentity@0 main.obj
Error 19 fatal error LNK1120: 18 unresolved externals



So i downloaded the glut lib found there : http://www.xmission.com/~nate/glut.html

I was surprising to see that the lib was very old (2001... !!!).

Then, i added this include to the code.

which redirect to what i downloaded.

#include <gl/glut.h>

And, miracle, the compilation works.

Is all i did is right ? Did i did anything wrong ?

Because when i stop the application, it crash.

I breakpoint the executation, i saw the error was after the main return.

If anybody has any idea ?

Thanks


Ps. I'm working with Seven and VisualStudio 2008

Pages: [1]