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.


Messages - BigZiggityZ

Pages: [1]
1
SFML projects / Re: 'Tiled' Tile-map Loader
« on: September 23, 2013, 02:43:54 am »
Good lord, I am a moron. It's working beautifully. Thanks!

2
SFML projects / Re: 'Tiled' Tile-map Loader
« on: September 22, 2013, 08:47:42 pm »
Okay, I have linked zlib, and I am still getting the errors. Here's my code:

#include <MapLoader.h>
#include <SFML/Graphics.hpp>

int main()
{
        tmx::MapLoader myLoader("resources/maps/");
        myLoader.Load("rpgtest.tmx");
        sf::RenderWindow window(sf::VideoMode(300, 300), "TEST");
        while (window.isOpen())
        {
                sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                        {
                window.close();
                        }
                }
                window.clear();
                myLoader.Draw(window);
                window.display();
        }
}

And the error messages:
Quote
1>------ Build started: Project: RPGengine, Configuration: Debug Win32 ------
1>  main.cpp
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall tmx::MapLoader::MapLoader(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (??0MapLoader@tmx@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall tmx::MapLoader::~MapLoader(void)" (??1MapLoader@tmx@@QAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: bool const __thiscall tmx::MapLoader::Load(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?Load@MapLoader@tmx@@QAE?B_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall tmx::MapLoader::Draw(class sf::RenderTarget &)" (?Draw@MapLoader@tmx@@QAEXAAVRenderTarget@sf@@@Z) referenced in function _main
1>D:\Documents\Programming\C++\SFML Games\RPGengine\Debug\RPGengine.exe : fatal error LNK1120: 4 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

3
SFML projects / Re: 'Tiled' Tile-map Loader
« on: September 21, 2013, 03:45:58 am »
I'm trying to use your code, which looks great by the way. Whenever I call a function, I get an unresolved external symbol error message. My guess would be I didn't set it up correctly. I'm using visual studio 2012. I went into the project properties and added the "include" directory to the additional includes field. Is there anything else I need to do? Thanks!

4
Graphics / Re: LoadFromFile issues in VS2012
« on: May 12, 2013, 04:20:24 am »
Thanks for the quick replies!

"C:\Users\Username\Documents\Visual Studio 2012\Projects\SFML Game1\Debug\ball.jpg"
probably wouldn't work because \ is escape character that should be escaped in path string.

Whoops, forgot to mention that I was using escape sequences when I tried the above method. Also, this is just out of desperation to make it work, I know I can't hard code in a directory.

I have my image in the same folder as my .cpp file, the Visual Studio project files, and the debug folder. It also exists in the output folder with the .exe. I still can't see what I'm doing wrong.

5
Graphics / LoadFromFile issues in VS2012
« on: May 11, 2013, 09:34:24 pm »
Hello,

Whenever I try to call LoadFromFile, all I get is a message in the console that says 'failed to load "texture.png' followed by a long stream of gibberish, without ever closing the quote marks on texture.png. In addition, I get a seemingly random sequence of beeps coming out of my speakers. While reading I found that this can be a result of trying to access a file that does not exist, but the error still happens when I write out the full file path, e.g. "C:\Users\Username\Documents\Visual Studio 2012\Projects\SFML Game1\Debug\ball.jpg". I am completely lost and hoping someone can offer some insight.

Code:

#include<SFML\graphics.hpp>
using namespace sf;

int main()
{
    Texture myText;
        if (!myText.loadFromFile("Ball.jpg"))
        {
                return 1;
        }
    return 0;
}
 

Where Ball.jpg is in the directory "C:\Users\Username\Documents\Visual Studio 2012\Projects\SFML Game1\Debug" and "C:\Users\Username\Documents\Visual Studio 2012\Projects\SFML Game1\SFML Game1"

Pages: [1]
anything