Cant get zziplib to work (link error?)

Hello,

I’m having trouble getting zziplib to work and it’s probably something
stupid i’m not seeing.
I’m using zziplib-0.10.82 and zlib122 in MSVC6 and the linker says:

Code.obj : error LNK2001: unresolved external symbol _SDL_RWFromZZIP
Release/Build.exe : fatal error LNK1120: 1 unresolved externals

The following includes are in the source:

#include “zzip/zzip.h”
#include “SDL.h”
#include “SDL_rwops_zzip.h”

Linked (both in lib folder):
zdll.lib
zziplib.lib

Project folder:
SDL_rwops_zzip.c
SDL_rwops_zzip.h

Include folder:
zzip/__debug.h
zzip/__dirent.h
zzip/__hints.h
zzip/__mmap.h
zzip/_config.h
zzip/_msvc.h
zzip/conf.h
zzip/file.h
zzip/format.h
zzip/lib.h
zzip/plugin.h
zzip/stdint.h
zzip/zzip.h

zlib.h
zconf.h

Did i forget includes or links here? cant figure it out… thanks.

F. de Vries

PS: ive searched the mailinglist, google and my below average knowledge of
C++, but couldnt find a solution.

Hi there.

“unresolved external symbol” means that the linker
did not found the code for “_SDL_RWFromZZIP”.
It happens when you include the declaration of a
function (so the compiler says “it is ok, this
function exists, maybe it is declared in some other
source file”), but the linker did not find it in the
object files that it is linking.
Make sure the lib that contain the code for
"_SDL_RWFromZZIP" is included in the libs of your
project (or solution).

Hope I had helped,

In?cio.

— “F. de Vries” escreveu:> Hello,

I’m having trouble getting zziplib to work and it’s
probably something
stupid i’m not seeing.
I’m using zziplib-0.10.82 and zlib122 in MSVC6 and
the linker says:

Code.obj : error LNK2001: unresolved external symbol
_SDL_RWFromZZIP
Release/Build.exe : fatal error LNK1120: 1
unresolved externals

The following includes are in the source:

#include “zzip/zzip.h”
#include “SDL.h”
#include “SDL_rwops_zzip.h”

Linked (both in lib folder):
zdll.lib
zziplib.lib

Project folder:
SDL_rwops_zzip.c
SDL_rwops_zzip.h

Include folder:
zzip/__debug.h
zzip/__dirent.h
zzip/__hints.h
zzip/__mmap.h
zzip/_config.h
zzip/_msvc.h
zzip/conf.h
zzip/file.h
zzip/format.h
zzip/lib.h
zzip/plugin.h
zzip/stdint.h
zzip/zzip.h

zlib.h
zconf.h

Did i forget includes or links here? cant figure it
out… thanks.

F. de Vries

PS: ive searched the mailinglist, google and my
below average knowledge of
C++, but couldnt find a solution.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Converse com seus amigos em tempo real com o Yahoo! Messenger

Thanks for your reply.
The docs with SDL_RWFromZZIP state:

“Just copy the two files SDL_rwops_zzip.h and SDL_rwops_zzip.c to the
directory with your other project sources, and make sure to link it somehow
to your programs.”

I’ve copied the two files to my project folder and added a #include
"SDL_rwops_zzip.h" at the top of my source, apparently this isnt enough.
How do I link these files to my project?

Folkert> ----- Original Message -----

From: jinacio3@yahoo.com.br (J Inacio)
To: "A list for developers using the SDL library. (includes SDL-announce)"

Sent: Monday, May 30, 2005 12:56 PM
Subject: Re: [SDL] Cant get zziplib to work (link error?)

Hi there.

“unresolved external symbol” means that the linker
did not found the code for “_SDL_RWFromZZIP”.
It happens when you include the declaration of a
function (so the compiler says “it is ok, this
function exists, maybe it is declared in some other
source file”), but the linker did not find it in the
object files that it is linking.
Make sure the lib that contain the code for
"_SDL_RWFromZZIP" is included in the libs of your
project (or solution).

Hope I had helped,

In?cio.

— “F. de Vries” <@F_de_Vries> escreveu:

Hello,

I’m having trouble getting zziplib to work and it’s
probably something
stupid i’m not seeing.
I’m using zziplib-0.10.82 and zlib122 in MSVC6 and
the linker says:

Code.obj : error LNK2001: unresolved external symbol
_SDL_RWFromZZIP
Release/Build.exe : fatal error LNK1120: 1
unresolved externals

The following includes are in the source:

#include “zzip/zzip.h”
#include “SDL.h”
#include “SDL_rwops_zzip.h”

Linked (both in lib folder):
zdll.lib
zziplib.lib

Project folder:
SDL_rwops_zzip.c
SDL_rwops_zzip.h

Include folder:
zzip/__debug.h
zzip/__dirent.h
zzip/__hints.h
zzip/__mmap.h
zzip/_config.h
zzip/_msvc.h
zzip/conf.h
zzip/file.h
zzip/format.h
zzip/lib.h
zzip/plugin.h
zzip/stdint.h
zzip/zzip.h

zlib.h
zconf.h

Did i forget includes or links here? cant figure it
out… thanks.

F. de Vries

PS: ive searched the mailinglist, google and my
below average knowledge of
C++, but couldnt find a solution.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Converse com seus amigos em tempo real com o Yahoo! Messenger
http://br.download.yahoo.com/messenger/


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

I don’t know if you’re using a development environment, but it sounds
like you’re not including the C file in your actual project. This is
easy to rectify for VC++ or Dev-C++ or any other such editor, simply
add the file and recompile.

JoshOn 5/30/05, F. de Vries wrote:

Thanks for your reply.
The docs with SDL_RWFromZZIP state:

“Just copy the two files SDL_rwops_zzip.h and SDL_rwops_zzip.c to the
directory with your other project sources, and make sure to link it somehow
to your programs.”

I’ve copied the two files to my project folder and added a #include
"SDL_rwops_zzip.h" at the top of my source, apparently this isnt enough.
How do I link these files to my project?

Folkert

----- Original Message -----
From: “J Inacio”
To: "A list for developers using the SDL library. (includes SDL-announce)"

Sent: Monday, May 30, 2005 12:56 PM
Subject: Re: [SDL] Cant get zziplib to work (link error?)

Hi there.

“unresolved external symbol” means that the linker
did not found the code for “_SDL_RWFromZZIP”.
It happens when you include the declaration of a
function (so the compiler says “it is ok, this
function exists, maybe it is declared in some other
source file”), but the linker did not find it in the
object files that it is linking.
Make sure the lib that contain the code for
"_SDL_RWFromZZIP" is included in the libs of your
project (or solution).

Hope I had helped,

In?cio.

— “F. de Vries” escreveu:

Hello,

I’m having trouble getting zziplib to work and it’s
probably something
stupid i’m not seeing.
I’m using zziplib-0.10.82 and zlib122 in MSVC6 and
the linker says:

Code.obj : error LNK2001: unresolved external symbol
_SDL_RWFromZZIP
Release/Build.exe : fatal error LNK1120: 1
unresolved externals

The following includes are in the source:

#include “zzip/zzip.h”
#include “SDL.h”
#include “SDL_rwops_zzip.h”

Linked (both in lib folder):
zdll.lib
zziplib.lib

Project folder:
SDL_rwops_zzip.c
SDL_rwops_zzip.h

Include folder:
zzip/__debug.h
zzip/__dirent.h
zzip/__hints.h
zzip/__mmap.h
zzip/_config.h
zzip/_msvc.h
zzip/conf.h
zzip/file.h
zzip/format.h
zzip/lib.h
zzip/plugin.h
zzip/stdint.h
zzip/zzip.h

zlib.h
zconf.h

Did i forget includes or links here? cant figure it
out… thanks.

F. de Vries

PS: ive searched the mailinglist, google and my
below average knowledge of
C++, but couldnt find a solution.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Converse com seus amigos em tempo real com o Yahoo! Messenger
http://br.download.yahoo.com/messenger/


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Hi there.

Have you added the .c file to your project? (Some
IDEs just compile what is on the project, wich is a
script containing the list of files to compile).
Give a look at the docs of the IDE you are using and
see if it works like that.

Hope I Helped,

In?cio.

— “F. de Vries” escreveu:> Thanks for your reply.

The docs with SDL_RWFromZZIP state:

“Just copy the two files SDL_rwops_zzip.h and
SDL_rwops_zzip.c to the
directory with your other project sources, and make
sure to link it somehow
to your programs.”

I’ve copied the two files to my project folder and
added a #include
"SDL_rwops_zzip.h" at the top of my source,
apparently this isnt enough.
How do I link these files to my project?

Folkert

----- Original Message -----
From: “J Inacio” <@J_Inacio1>
To: "A list for developers using the SDL library.
(includes SDL-announce)"

Sent: Monday, May 30, 2005 12:56 PM
Subject: Re: [SDL] Cant get zziplib to work (link
error?)

Hi there.

“unresolved external symbol” means that the linker
did not found the code for “_SDL_RWFromZZIP”.
It happens when you include the declaration of a
function (so the compiler says “it is ok, this
function exists, maybe it is declared in some
other
source file”), but the linker did not find it in
the
object files that it is linking.
Make sure the lib that contain the code for
"_SDL_RWFromZZIP" is included in the libs of your
project (or solution).

Hope I had helped,

In?cio.

— “F. de Vries” escreveu:

Hello,

I’m having trouble getting zziplib to work and
it’s

probably something
stupid i’m not seeing.
I’m using zziplib-0.10.82 and zlib122 in MSVC6
and

the linker says:

Code.obj : error LNK2001: unresolved external
symbol

_SDL_RWFromZZIP
Release/Build.exe : fatal error LNK1120: 1
unresolved externals

The following includes are in the source:

#include “zzip/zzip.h”
#include “SDL.h”
#include “SDL_rwops_zzip.h”

Linked (both in lib folder):
zdll.lib
zziplib.lib

Project folder:
SDL_rwops_zzip.c
SDL_rwops_zzip.h

Include folder:
zzip/__debug.h
zzip/__dirent.h
zzip/__hints.h
zzip/__mmap.h
zzip/_config.h
zzip/_msvc.h
zzip/conf.h
zzip/file.h
zzip/format.h
zzip/lib.h
zzip/plugin.h
zzip/stdint.h
zzip/zzip.h

zlib.h
zconf.h

Did i forget includes or links here? cant figure
it

out… thanks.

F. de Vries

PS: ive searched the mailinglist, google and my
below average knowledge of
C++, but couldnt find a solution.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Converse com seus amigos em tempo real com o
Yahoo! Messenger
http://br.download.yahoo.com/messenger/


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Yahoo! Mail, cada vez melhor: agora com 1GB de espa?o gr?tis! http://mail.yahoo.com.br

Hello all,

Thanks for your reply.
The docs with SDL_RWFromZZIP state:

“Just copy the two files SDL_rwops_zzip.h and SDL_rwops_zzip.c to the
directory with your other project sources, and make sure to link it somehow
to your programs.”

I’ve copied the two files to my project folder and added a #include
"SDL_rwops_zzip.h" at the top of my source, apparently this isnt enough.
How do I link these files to my project?

Folkert

     Maybe you should add both .h and .c to your project, not
 just copy them into project folder. If you use VS, this can be
 done by r-clicking on "source files" and "header files" icons in
 solution explorer window, then selecting "Add->Add Existing Item"
 menu item.--

Best regards,
Flashback

I’ve copied the two files to my project folder and added a #include
"SDL_rwops_zzip.h" at the top of my source, apparently this isnt enough.
How do I link these files to my project?

Did you include the SDL_rwops_zzip.c in the project source list (or
whatever it’s called in your vc). Are you shure it get’s compiled?On 5/30/05, F. de Vries wrote:

Thanks for your reply.
The docs with SDL_RWFromZZIP state:

“Just copy the two files SDL_rwops_zzip.h and SDL_rwops_zzip.c to the
directory with your other project sources, and make sure to link it somehow
to your programs.”

I’ve copied the two files to my project folder and added a #include
"SDL_rwops_zzip.h" at the top of my source, apparently this isnt enough.
How do I link these files to my project?

Folkert

----- Original Message -----
From: “J Inacio”
To: "A list for developers using the SDL library. (includes SDL-announce)"

Sent: Monday, May 30, 2005 12:56 PM
Subject: Re: [SDL] Cant get zziplib to work (link error?)

Hi there.

“unresolved external symbol” means that the linker
did not found the code for “_SDL_RWFromZZIP”.
It happens when you include the declaration of a
function (so the compiler says “it is ok, this
function exists, maybe it is declared in some other
source file”), but the linker did not find it in the
object files that it is linking.
Make sure the lib that contain the code for
"_SDL_RWFromZZIP" is included in the libs of your
project (or solution).

Hope I had helped,

In?cio.

— “F. de Vries” escreveu:

Hello,

I’m having trouble getting zziplib to work and it’s
probably something
stupid i’m not seeing.
I’m using zziplib-0.10.82 and zlib122 in MSVC6 and
the linker says:

Code.obj : error LNK2001: unresolved external symbol
_SDL_RWFromZZIP
Release/Build.exe : fatal error LNK1120: 1
unresolved externals

The following includes are in the source:

#include “zzip/zzip.h”
#include “SDL.h”
#include “SDL_rwops_zzip.h”

Linked (both in lib folder):
zdll.lib
zziplib.lib

Project folder:
SDL_rwops_zzip.c
SDL_rwops_zzip.h

Include folder:
zzip/__debug.h
zzip/__dirent.h
zzip/__hints.h
zzip/__mmap.h
zzip/_config.h
zzip/_msvc.h
zzip/conf.h
zzip/file.h
zzip/format.h
zzip/lib.h
zzip/plugin.h
zzip/stdint.h
zzip/zzip.h

zlib.h
zconf.h

Did i forget includes or links here? cant figure it
out… thanks.

F. de Vries

PS: ive searched the mailinglist, google and my
below average knowledge of
C++, but couldnt find a solution.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Converse com seus amigos em tempo real com o Yahoo! Messenger
http://br.download.yahoo.com/messenger/


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

hehe… lol, didn’t see the other replys when i wrote mine, like 4
variants of the same reply :POn 5/30/05, Joakim Kolsj? <@Joakim_Kolsjo> wrote:

I’ve copied the two files to my project folder and added a #include
"SDL_rwops_zzip.h" at the top of my source, apparently this isnt enough.
How do I link these files to my project?

Did you include the SDL_rwops_zzip.c in the project source list (or
whatever it’s called in your vc). Are you shure it get’s compiled?

On 5/30/05, F. de Vries wrote:

Thanks for your reply.
The docs with SDL_RWFromZZIP state:

“Just copy the two files SDL_rwops_zzip.h and SDL_rwops_zzip.c to the
directory with your other project sources, and make sure to link it somehow
to your programs.”

I’ve copied the two files to my project folder and added a #include
"SDL_rwops_zzip.h" at the top of my source, apparently this isnt enough.
How do I link these files to my project?

Folkert

----- Original Message -----
From: “J Inacio”
To: "A list for developers using the SDL library. (includes SDL-announce)"

Sent: Monday, May 30, 2005 12:56 PM
Subject: Re: [SDL] Cant get zziplib to work (link error?)

Hi there.

“unresolved external symbol” means that the linker
did not found the code for “_SDL_RWFromZZIP”.
It happens when you include the declaration of a
function (so the compiler says “it is ok, this
function exists, maybe it is declared in some other
source file”), but the linker did not find it in the
object files that it is linking.
Make sure the lib that contain the code for
"_SDL_RWFromZZIP" is included in the libs of your
project (or solution).

Hope I had helped,

In?cio.

— “F. de Vries” escreveu:

Hello,

I’m having trouble getting zziplib to work and it’s
probably something
stupid i’m not seeing.
I’m using zziplib-0.10.82 and zlib122 in MSVC6 and
the linker says:

Code.obj : error LNK2001: unresolved external symbol
_SDL_RWFromZZIP
Release/Build.exe : fatal error LNK1120: 1
unresolved externals

The following includes are in the source:

#include “zzip/zzip.h”
#include “SDL.h”
#include “SDL_rwops_zzip.h”

Linked (both in lib folder):
zdll.lib
zziplib.lib

Project folder:
SDL_rwops_zzip.c
SDL_rwops_zzip.h

Include folder:
zzip/__debug.h
zzip/__dirent.h
zzip/__hints.h
zzip/__mmap.h
zzip/_config.h
zzip/_msvc.h
zzip/conf.h
zzip/file.h
zzip/format.h
zzip/lib.h
zzip/plugin.h
zzip/stdint.h
zzip/zzip.h

zlib.h
zconf.h

Did i forget includes or links here? cant figure it
out… thanks.

F. de Vries

PS: ive searched the mailinglist, google and my
below average knowledge of
C++, but couldnt find a solution.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Converse com seus amigos em tempo real com o Yahoo! Messenger
http://br.download.yahoo.com/messenger/


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

jup, and it worked, kinda…
the link error is gone, obviously (how could I forget to add the files :()

But now I get the following errors:
C:\Coding\Cpp\Project 21\SDL_rwops_zzip.c(24) : error C2491: ‘_read’ :
definition of dllimport function not allowed
C:\Coding\Cpp\Project 21\SDL_rwops_zzip.c(24) : warning C4028: formal
parameter 1 different from declaration
C:\Coding\Cpp\Project 21\SDL_rwops_zzip.c(24) : warning C4028: formal
parameter 3 different from declaration
C:\Coding\Cpp\Project 21\SDL_rwops_zzip.c(24) : warning C4029: declared
formal parameter list different from definition
C:\Coding\Cpp\Project 21\SDL_rwops_zzip.c(57) : warning C4113: ‘int (__cdecl
*)(int ,void *,unsigned int )’ differs in parameter lists from ‘int (__cdecl
*)(struct SDL_RWops *,void *,int ,int )’

I’ve looked some stuff up and found
http://www.devolution.com/pipermail/sdl/2002-December/051080.html but this
didnt fix it at all.

Still using zziplib-0.10.82 and zlib122 in MSVC6

Thanks again,
Folkert> ----- Original Message -----

From: trejje@gmail.com (Joakim Kolsjo)
To: "A list for developers using the SDL library. (includes SDL-announce)"

Sent: Monday, May 30, 2005 3:45 PM
Subject: Re: [SDL] Cant get zziplib to work (link error?)

hehe… lol, didn’t see the other replys when i wrote mine, like 4
variants of the same reply :stuck_out_tongue:

On 5/30/05, Joakim Kolsj? wrote:

I’ve copied the two files to my project folder and added a #include
"SDL_rwops_zzip.h" at the top of my source, apparently this isnt enough.
How do I link these files to my project?

Did you include the SDL_rwops_zzip.c in the project source list (or
whatever it’s called in your vc). Are you shure it get’s compiled?

On 5/30/05, F. de Vries <@F_de_Vries> wrote:

Thanks for your reply.
The docs with SDL_RWFromZZIP state:

“Just copy the two files SDL_rwops_zzip.h and SDL_rwops_zzip.c to the
directory with your other project sources, and make sure to link it
somehow
to your programs.”

I’ve copied the two files to my project folder and added a #include
"SDL_rwops_zzip.h" at the top of my source, apparently this isnt enough.
How do I link these files to my project?

Folkert

----- Original Message -----
From: “J Inacio”
To: "A list for developers using the SDL library. (includes
SDL-announce)"

Sent: Monday, May 30, 2005 12:56 PM
Subject: Re: [SDL] Cant get zziplib to work (link error?)

Hi there.

“unresolved external symbol” means that the linker
did not found the code for “_SDL_RWFromZZIP”.
It happens when you include the declaration of a
function (so the compiler says “it is ok, this
function exists, maybe it is declared in some other
source file”), but the linker did not find it in the
object files that it is linking.
Make sure the lib that contain the code for
"_SDL_RWFromZZIP" is included in the libs of your
project (or solution).

Hope I had helped,

In?cio.

— “F. de Vries” <@F_de_Vries> escreveu:

Hello,

I’m having trouble getting zziplib to work and it’s
probably something
stupid i’m not seeing.
I’m using zziplib-0.10.82 and zlib122 in MSVC6 and
the linker says:

Code.obj : error LNK2001: unresolved external symbol
_SDL_RWFromZZIP
Release/Build.exe : fatal error LNK1120: 1
unresolved externals

The following includes are in the source:

#include “zzip/zzip.h”
#include “SDL.h”
#include “SDL_rwops_zzip.h”

Linked (both in lib folder):
zdll.lib
zziplib.lib

Project folder:
SDL_rwops_zzip.c
SDL_rwops_zzip.h

Include folder:
zzip/__debug.h
zzip/__dirent.h
zzip/__hints.h
zzip/__mmap.h
zzip/_config.h
zzip/_msvc.h
zzip/conf.h
zzip/file.h
zzip/format.h
zzip/lib.h
zzip/plugin.h
zzip/stdint.h
zzip/zzip.h

zlib.h
zconf.h

Did i forget includes or links here? cant figure it
out… thanks.

F. de Vries

PS: ive searched the mailinglist, google and my
below average knowledge of
C++, but couldnt find a solution.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Converse com seus amigos em tempo real com o Yahoo! Messenger
http://br.download.yahoo.com/messenger/


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

should you include the .c file?

i don’t think so.

the errors you are getting sound as if the file was written to be part
of the library.

if so, then it will be part of the SDL library, you just need to
include the header.

i’m no expert on dlls or anything so feel free to contradict me.

brian

no the .c file should be included, the code inthere isnt part of any lib but
makes use of functions in the zzip lib.
if the function were part of the library, it wouldv been simple :}

Folkert> ----- Original Message -----

From: brian.ripoff@gmail.com (Brian Barrett)
To: "A list for developers using the SDL library. (includes SDL-announce)"

Sent: Monday, May 30, 2005 5:19 PM
Subject: Re: [SDL] Cant get zziplib to work (link error?)

should you include the .c file?

i don’t think so.

the errors you are getting sound as if the file was written to be part
of the library.

if so, then it will be part of the SDL library, you just need to
include the header.

i’m no expert on dlls or anything so feel free to contradict me.

brian


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

C:\Coding\Cpp\Project 21\SDL_rwops_zzip.c(24) : error C2491: ‘_read’ :
definition of

 ***___ dllimport___***

function not allowed

dllimport sounds DLL related to me

and i often get link errors when (ab) using a library