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

Author Topic: Having trouble with tmxloader  (Read 2700 times)

0 Members and 2 Guests are viewing this topic.

Student555

  • Guest
Having trouble with tmxloader
« on: February 23, 2016, 10:33:02 am »
From the looks of it, it looks like I'm doing everything right. I have Windows 10 and running VS Express 2012. I get an error that reads could not open zlib.h. The include folder, that is linked to does not have the folder (zlib.h), but the directions on its official site says that I must attach the two existing files MapLoaderPrivate and MapLoaderPublic --- https://github.com/fallahn/sfml-tmxloader

I downloaded zlib-1.2.7.tar and renamed it to zlib.lib. Then I linked using the following

C/C++:
General - Additional Include Directories: C:\SFML-2.1\include; C:\sfml-tmxloader-master\include;

Linker:
 General - Additional Library Directories: C:\SFML-2.1\lib; C:\sfml-tmxloader-master\lib;

Input - sfml-graphics-d.lib; sfml-system-d.lib; sfml-window-d.lib; sfml-audio-d.lib; zlib.lib;

Then I add, the two files. Still not getting it to  compile. How does one obtain the zlib.h file?
 


fallahn

  • Hero Member
  • *****
  • Posts: 507
  • Buns.
    • View Profile
    • Trederia
Re: Having trouble with tmxloader
« Reply #1 on: February 23, 2016, 10:39:19 am »
Did it not come with the zlib library? Where did you get zlib from? This link from the loader wiki explains how to properly build zlib for visual studio.

Student555

  • Guest
Re: Having trouble with tmxloader
« Reply #2 on: February 23, 2016, 08:41:06 pm »
I had to download it from the main site, but then I got a .tar instead. Could not find the website you just linked anywhere until now.

So, I followed the directions from the site, and produced both zlibwapi.dll from debug and release. I first used the release, in the debug for my project. I linked it in input with zlibwapi.lib. When I run the program, however, I'm getting the following error:
Code: [Select]
Error 1 error LNK1104: cannot open file 'zlibwapi.lib'

I still get the same error with a zlibwapi.lib from debug. (Currently, compiling under debug mode)

What am I missing?

OualidH38

  • Newbie
  • *
  • Posts: 46
    • View Profile
    • Email
Re: Having trouble with tmxloader
« Reply #3 on: February 24, 2016, 06:42:12 pm »
I linked it in input with zlibwapi.lib. When I run the program, however, I'm getting the following error:
Code: [Select]
Error 1 error LNK1104: cannot open file 'zlibwapi.lib'

You need to link it in input with zlibstat.lib.

Student555

  • Guest
Re: Having trouble with tmxloader
« Reply #4 on: February 25, 2016, 10:25:10 pm »
I just linked zlibstat.lib. I'm now getting the following errors.

Code: [Select]
Error 1 error LNK2001: unresolved external symbol "private: virtual void __thiscall DebugShape::draw(class sf::RenderTarget &,class sf::RenderStates)const " (?draw@DebugShape@@EBEXAAVRenderTarget@sf@@VRenderStates@3@@Z)

Error 2 error LNK2001: unresolved external symbol "private: virtual void __thiscall DebugShape::draw(class sf::RenderTarget &,class sf::RenderStates)const " (?draw@DebugShape@@EBEXAAVRenderTarget@sf@@VRenderStates@3@@Z)

Error 16 error LNK2001: unresolved external symbol "private: virtual void __thiscall tmx::MapLayer::draw(class sf::RenderTarget &,class sf::RenderStates)const " (?draw@MapLayer@tmx@@EBEXAAVRenderTarget@sf@@VRenderStates@4@@Z)

Error 17 error LNK2001: unresolved external symbol "private: virtual void __thiscall tmx::MapLayer::draw(class sf::RenderTarget &,class sf::RenderStates)const " (?draw@MapLayer@tmx@@EBEXAAVRenderTarget@sf@@VRenderStates@4@@Z)


fallahn

  • Hero Member
  • *****
  • Posts: 507
  • Buns.
    • View Profile
    • Trederia
Re: Having trouble with tmxloader
« Reply #5 on: February 26, 2016, 11:27:12 am »
An unresolved external symbol is when the linker can't find the definitions of the requested functions. This is usually because you haven't linked the library in which they reside, or because you didn't compile the .cpp containing them (although there are other causes).