User forums > Help

first use of C::B >> undefined references

<< < (2/3) > >>

sethjackson:

--- Quote from: MoonKid on February 23, 2006, 09:55:15 pm ---> 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.

--- End quote ---

Basically if you were linking a wx app, and you had a static build of wxWidgets you would need to link in wxzlib to solve the above problems...... I see you aren't using wx though.... Hmm could you try a nightly build????

thomas:

--- Quote ---Hmm could you try a nightly build????
--- End quote ---
That will not make anything better. If you don't link properly, then it will not work either way.

1. Make sure that you actually have the zlib library. "Have" means above all that it has to be in a place where the linker will find it.
2. One way to assure that this is the case is to put it into your lib folder (that one is usually in the linker's search path, if not, add it).
3. Add zlib to "Link libraries", the IDE will automatically replace that with the correct file name (libzlib.a in this case).

EDIT:
As a general sidenote, you should set your compiler options to "full command line" when encountering a problem.
The string "Linking console executable" does not tell anything useful. However, the full commandline usually shows the source of the problem right away.

MoonKid:
> nightly builds

Not possible at this time, because that are unicode builds that does not run under Win98se. But I work on it.

> 1. Make sure that you actually have the zlib library.

Yes, I have.

> 2. One way to assure that this is the case is to put it into your lib
> folder (that one is usually in the linker's search path, if not, add it).
> 3. Add zlib to "Link libraries", the IDE will automatically replace
> that with the correct file name (libzlib.a in this case).

I thougt have to put a concret lib-file in "link libraries". No I tried it your way: "zlib" in "link libraries" and adding the zlib-lib-directory to the linker search-path. Now the linker links zlib.lib I do not want, because I need a zlib1.dll for it.

Actualy I deleted the lib-search path and added the lib "libz.a" directly to "link libraries". It worked. The project links and starts without asking for any DLLs.

It is quite complicaded and confusing me. Thanks for your help!



EDIT:
As a general sidenote, you should set your compiler options to "full command line" when encountering a problem.
The string "Linking console executable" does not tell anything useful. However, the full commandline usually shows the source of the problem right away.

GLfoat:
i also do have this probrem with liblary and linker
i do not understand why i have to learn so much about complier.
why do i need a linker when i already have a compiler.
a good ide as coldbocks should do that for me , isn't it ?
could it not find for me, it would be much easier then !
thanks for all your help !

thomas:
My fault... the library is called libz.a, so you obviously have to type z into "Link libraries"...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version