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 - annaL

Pages: [1]
1
General / Re: link errors
« on: April 05, 2022, 09:26:52 pm »
Thank you!!!! It works. This is so exciting. But, I realized I've been thinking about SFML wrong. I was trying to load an array of data into a texture, and then display the texture in my window. But I think these functions are meant for working with an actual image file, not just arrays. So I get an error. I think I'm using the wrong class entirely. Could you point me in a better direction?

Thank you so much for all your help! I'm really excited that this is nearly functional.

2
General / Re: link errors
« on: April 05, 2022, 12:58:10 am »
I'm still a little confused, I'm sorry! As I understand it I should be linking to SFML lib files that are compatible with my Visual Studio platform (as opposed to my OS). It is my understanding that Visual Studio 2015 isn't offered as a 64 bit program, but it still allows you to compile for either 64 bit or 32 bit operation. So, in order to compile a 64 bit program I need to use the 64 bit SFML libs and I need to upgrade to a 64 bit version of Visual Studio? 

Thank you so much for your help! I'm sorry I'm asking such silly questions.

Best regards,
Anna

3
General / link errors
« on: April 04, 2022, 09:24:31 pm »
Hi -

I'm really excited about these tools, but I'm having a little getting started issue. I downloaded SFML-2.5.1-windows-vc14-32-bit from the SFML site. I'm using Visual Studio 2015 which I believe is actually running a 32 bit platform. I made a simple test case that only calls the following:


#include "SFML\Window.hpp"
#include "SFML\Graphics.hpp"

int main()
{
    // Create the main window
    int width = 640;
    int height = 480;
    sf::RenderWindow window(
      sf::VideoMode(width, height),       // size of the client area we want
      L"hdmidisplay"                      // The text to appear on the window title
    );
    return EXIT_SUCCESS;
}

but I get link errors when I compile - pasted below.

Severity   Code   Description   Project   File   Line   Suppression State
Error   LNK1120   5 unresolved externals   SFMLTest   C:\Temp\SFMLTest\x64\Debug\SFMLTest.exe   1   
Error   LNK2019   unresolved external symbol "__declspec(dllimport) public: __cdecl sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (__imp_??0VideoMode@sf@@QEAA@III@Z) referenced in function main   SFMLTest   C:\Temp\SFMLTest\SFMLTest\Window.obj   1   
Error   LNK2019   unresolved external symbol "__declspec(dllimport) public: __cdecl sf::String::~String(void)" (__imp_??1String@sf@@QEAA@XZ) referenced in function main   SFMLTest   C:\Temp\SFMLTest\SFMLTest\Window.obj   1   
Error   LNK2019   unresolved external symbol "__declspec(dllimport) public: __cdecl sf::String::String(wchar_t const *)" (__imp_??0String@sf@@QEAA@PEB_W@Z) referenced in function main   SFMLTest   C:\Temp\SFMLTest\SFMLTest\Window.obj   1   
Error   LNK2019   unresolved external symbol "__declspec(dllimport) public: __cdecl sf::RenderWindow::RenderWindow(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (__imp_??0RenderWindow@sf@@QEAA@VVideoMode@1@AEBVString@1@IAEBUContextSettings@1@@Z) referenced in function main   SFMLTest   C:\Temp\SFMLTest\SFMLTest\Window.obj   1   
Error   LNK2019   unresolved external symbol "__declspec(dllimport) public: virtual __cdecl sf::RenderWindow::~RenderWindow(void)" (__imp_??1RenderWindow@sf@@UEAA@XZ) referenced in function main   SFMLTest   C:\Temp\SFMLTest\SFMLTest\Window.obj   1   

I included my vcxproj. I'm linking to the debug version of the lib files, and I'm compiling for debug x64. I'm not sure what I'm doing wrong. Do I need to compile new lib files? If so, do I download source to compile from github?

I really appreciate your help. I tried to look through the forum and tutorials as much as possible. I'm sorry to bother you with such a simple problem.

Thanks,
Anna

Pages: [1]