project-navigation
Personal tools

Author Topic: Linking Error with VC++ 2005 Express  (Read 2894 times)

Hell

  • Guest
Linking Error with VC++ 2005 Express
« on: February 27, 2007, 07:11:32 pm »
Hi all,
thanks especially to Mattn for activating my account  :D .

I'm trying to compile the sources (2.0 -RC6) with VC++ Express.
What I did until now: I installed the Platform SDK, DirextX SDK, SDL and ZLib as described in the WIKI (ZLib is missing in the WIKI) and added the paths in the Options menu.
I'm using ZLib Verson 1.2.3.

There was one source file (physically) missing which was still in the project
but I don't remember the name. I deleted it from the project.

When I build the project I finally get some linker errors telling me that there are several unresolved external symbols.

    Verknüpfen...
    cl_campaign.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_compress" in Funktion "_CL_GameSave".
    cl_campaign.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_uncompress" in Funktion "_CL_GameLoad".
    unzip.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_fill_fopen_filefunc" in Funktion "_unzOpen2".
    unzip.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_inflateInit2_" in Funktion "_unzOpenCurrentFile3".
    unzip.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_inflate" in Funktion "_unzReadCurrentFile".
    unzip.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_crc32" in Funktion "_unzReadCurrentFile".
    unzip.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_inflateEnd" in Funktion "_unzCloseCurrentFile".



For example there is the function CL_GameSave in file CL_campaign.c. CL_GameSave itself calls the function compress which is declared in zlib.h.

CL_GameSave gets compiled with no errors. I also can jump to the declaration of the compress function when rightclicking the function (so my path settings in general options seem to be OK).

This is what I understood so far.

How can I tell the linker where to look to resolve the symbols?
In Project settings, General options?
What exactly does the linker need? The path to the lib?
My C knowledge is a little bit rusty   :)

Thanks for any help

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Linking Error with VC++ 2005 Express
« Reply #1 on: February 27, 2007, 07:39:25 pm »
hi and welcome to the forums

first of all, you should try to use the trunk version - there were some patches for ms vc recently - though i'm not sure whether everything works as expected.

please extend the zlib stuff in the wiki - you only have to sign up to edit articles.

if there are still linker problems with the trunk version, please let us know

best regards
martin