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

Pages: [1]
1
General / Re: Can't load image (C++, CodeBlocks)
« on: April 23, 2019, 02:43:27 am »
and on mine it's actually SFML/Graphics/Texture.hpp

I was just looking at the texture demo in the SFML demo files.

Jeff

2
General / Re: Can't load image (C++, CodeBlocks)
« on: April 23, 2019, 02:42:34 am »
Have you compiled any demos or programs at all yet with SFML?  You might be missing a .lib in the LINKER INPUT settings for the solution/project.

Right click on your project in Visual Studio, all the way down to properties, open Linker tab, then highlight INPUT settings, and they should be listed under 'Additional Dependencies'.  (You may already be familiar with this, and you may already have it setup correctly, just double checking.)  8)

For now, that's all I have,

Jeff

3
General / Re: Can't load image (C++, CodeBlocks)
« on: April 22, 2019, 01:56:33 am »
Do you need to include texture.hpp?
#include <Texture.hpp>

Regards,

Jeff Cummings

4
General / Re: VS2017 and VS2019 work just fine with same solution
« on: April 22, 2019, 01:54:01 am »
Ok, so when you rebuild, do you get all new .lib files, and all new .dll files?  I'll have to try that...!

Thank you,

Jeff Cummings

5
General / Re: VS2017 and VS2019 work just fine with same solution
« on: April 21, 2019, 08:13:01 am »
Ok, I just tried to re-build the solution with VS2017....

I had to change the platform toolset back to VS2017 v141, because it compiles with VS2019 v142.

...but it works.

I'm going to try to figure out some of this network stuff, maybe multi-player?  Wish me luck guys,

Jeff Cummings

6
General / VS2017 and VS2019 work just fine with same solution
« on: April 21, 2019, 07:56:17 am »
I'm not sure if this is how it's supposed to work, but it works for me:

I did a fresh install of Visual Studio 2017 and setup and compiled SFML examples (with a little bit of help from this forum, see my previous thread....rofl).

Then I did a fresh install of Visual Studio 2019 side by side on the same computer with VS2017, and the first solution I opened was my SFML solution, and it popped up with the retarget window, which I did, and it works, compiles and runs, right out of the box!

Is there something I'm missing?  Don't get me wrong, I'm glad it's working, as I'm going to try to replicate this success on another computer setup (my main setup for programming), and on my laptop also.

I just wanted some comments on this, because the website tutorial specifies that you need to compile and etc, do all this extra stuff to run SFML code in Visual Studio 2019...?

Here's the quote from the website:

Quote
You must download the package that matches your version of Visual C++. Indeed, a library compiled with VC++ 10 (Visual Studio 2010) won't be compatible with VC++ 12 (Visual Studio 2013) for example. If there's no SFML package compiled for your version of Visual C++, you will have to build SFML yourself.

Because this VS2019 install, I didn't compile SFML, I just loaded the solution and ran it out of the box.

Alright, let the commenting begin, and thanks,

Jeff Cummings

7
General / Re: Just started, but can't start
« on: April 21, 2019, 05:47:31 am »
OMG, thanks for your reply!  I was just linking the dependencies, not the modules themselves!  I feel stupid.

I knew it had to be something like that..... dang.

Really appreciate it!  It compiles and runs!

 8) :o ;D :D ;) :) :P ::)

Jeff Cummings

8
General / Re: Just started, but can't start
« on: April 20, 2019, 07:59:38 am »
Here are the additional dependencies that I have listed in the project:

sfml-window.lib
sfml-window-s.lib
sfml-system.lib
opengl32.lib
freetype.lib
winmm.lib
gdi32.lib
openal32.lib
flac.lib
vorbisenc.lib
vorbisfile.lib
vorbis.lib
ogg.lib
ws2_32.lib

9
General / Re: Just started, but can't start
« on: April 20, 2019, 07:48:47 am »
Exact error list is here:

1>------ Build started: Project: SFML1, Configuration: Release x64 ------
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class sf::RenderStates const sf::RenderStates::Default" (__imp_?Default@RenderStates@sf@@2V12@B)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl sf::CircleShape::CircleShape(float,unsigned __int64)" (__imp_??0CircleShape@sf@@QEAA@M_K@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl sf::RenderWindow::~RenderWindow(void)" (__imp_??1RenderWindow@sf@@UEAA@XZ)
1>main.obj : error LNK2001: 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)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl sf::Color::Color(unsigned char,unsigned char,unsigned char,unsigned char)" (__imp_??0Color@sf@@QEAA@EEEE@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl sf::Window::display(void)" (__imp_?display@Window@sf@@QEAAXXZ)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl sf::Window::pollEvent(class sf::Event &)" (__imp_?pollEvent@Window@sf@@QEAA_NAEAVEvent@2@@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl sf::Window::isOpen(void)const " (__imp_?isOpen@Window@sf@@QEBA_NXZ)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl sf::Window::close(void)" (__imp_?close@Window@sf@@QEAAXXZ)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class sf::Color const sf::Color::Green" (__imp_?Green@Color@sf@@2V12@B)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl sf::RenderTarget::draw(class sf::Drawable const &,class sf::RenderStates const &)" (__imp_?draw@RenderTarget@sf@@QEAAXAEBVDrawable@2@AEBVRenderStates@2@@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl sf::RenderTarget::clear(class sf::Color const &)" (__imp_?clear@RenderTarget@sf@@QEAAXAEBVColor@2@@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl sf::Shape::setFillColor(class sf::Color const &)" (__imp_?setFillColor@Shape@sf@@QEAAXAEBVColor@2@@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl sf::String::String(char const *,class std::locale const &)" (__imp_??0String@sf@@QEAA@PEBDAEBVlocale@std@@@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (__imp_??0VideoMode@sf@@QEAA@III@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl sf::CircleShape::~CircleShape(void)" (__imp_??1CircleShape@sf@@UEAA@XZ)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl sf::String::~String(void)" (__imp_??1String@sf@@QEAA@XZ)
1>c:\Users\jcummings\source\repos\SFML1\x64\Release\SFML1.exe : fatal error LNK1120: 17 unresolved externals
1>Done building project "SFML1.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

10
General / Just started, but can't start
« on: April 20, 2019, 06:48:32 am »
Hello, SFML!

So I downloaded SFML, and tried to compile and link everything blah blah blah, and I get linker errors, my question is:  How do I know what lib links I'm missing?  I've included all the .lib links, and it still gives LNK errors.

Any help would be appreciated, I'm working in Visual Studio 2017, and just downloaded the package from the website.

I remember trying out SFML years ago, and I was able to get all the demos working, but I decided not to use it.  Until now, when I'm going to take a serious look at it.

Thanks,

Jeff Cummings
Hobby Programmer looking to release something soon!  :D

Pages: [1]