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

Pages: [1]
1
General / Re: SFML 2.6 Unresolved external symbol
« on: August 21, 2023, 10:53:02 pm »
SOLVED:

Configuration were for x86 (32 bits) but I downloaded 64 bits version

2
General / Re: SFML 2.6 Unresolved external symbol
« on: August 21, 2023, 07:27:12 pm »
Did you build SFML yourself?

These errors look - to me - like they are linking to a library that is built with a different compiler. Or a 32-bit/64-bit mismatch.

Well I downloaded it there https://www.sfml-dev.org/download/sfml/2.6.0/ I put it on my "D:" and followed the tutorial

3
General / Re: SFML 2.6 Unresolved external symbol
« on: August 21, 2023, 06:58:07 pm »
If you're linking statically then definitely define SFML_STATIC.

You should also link all of the dependencies of all modules (as noted in the red box just above the dependencies table). I notice you're missing one from Graphics and plenty from Audio.

I verified and in C/C++ -> Preprocessor of Debug and Release "SFML_STATIC" was already added and now I link all these lib

Debug:
sfml-graphics-s-d.lib
sfml-audio-s-d.lib
sfml-window-s-d.lib
sfml-system-s-d.lib
opengl32.lib
winmm.lib
gdi32.lib
ws2_32.lib
freetype.lib
openal32.lib
flac.lib
vorbisenc.lib
vorbisfile.lib
vorbis.lib
ogg.lib

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

But when I try to compile, I still get the same errors...

4
General / SFML 2.6 Unresolved external symbol
« on: August 21, 2023, 06:01:11 pm »
Hi, I added SFML 2.6 to my project, I followed the documentations https://www.sfml-dev.org/tutorials/2.6/start-vc.php but I still get 17 errors saying "unresolved external symbol" i've tried everything but nothing seems to be working. Here is what I added to Debug and Release

Debug:
sfml-graphics-s-d.lib
sfml-audio-s-d.lib
sfml-window-s-d.lib
sfml-system-s-d.lib
opengl32.lib
winmm.lib
gdi32.lib
ws2_32.lib


Release:
sfml-graphics-s.lib
sfml-audio-s.lib
sfml-window-s.lib
sfml-system-s.lib
opengl32.lib
winmm.lib
gdi32.lib
ws2_32.lib

I followed step by step the tutorial, even tried the part where they talk about SFML_STATIC, but it didn't change anything, here is the example of error I get:

Error   LNK2019   unresolved external symbol "public: __thiscall sf::String::String(char const *,class std::locale const &)" (??0String@sf@@QAE@PBDABVlocale@std@@@Z) referenced in function _main   GameEngine   E:\Programmation\Apps\GameEngine\GameEngine\main.obj   1

Error   LNK2019   unresolved external symbol "public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (??0VideoMode@sf@@QAE@III@Z) referenced in function _main   GameEngine   E:\Programmation\Apps\GameEngine\GameEngine\main.obj   1   

Error   LNK2019   unresolved external symbol "public: __thiscall sf::Color::Color(unsigned char,unsigned char,unsigned char,unsigned char)" (??0Color@sf@@QAE@EEEE@Z) referenced in function _main   GameEngine   E:\Programmation\Apps\GameEngine\GameEngine\main.obj   1   

... and 14 more for Video::Video, Window::Window etc... Can you help me ?

5
Graphics / Re: sf::Color linker error
« on: August 21, 2023, 05:54:34 pm »
Sometimes it's useful to look at the date something was posted on. This thread is from 2011 and talks about SFML 1.6, which is very old... ;)

SFML_DYNAMIC doesn't exist in SFML 2.x, just make sure, you're actually linking SFML

https://www.sfml-dev.org/tutorials/2.6/start-vc.php
SMFL STATIC does exist in SFML 2.* as it is written in the documentations that I followed step by step but get the 17 errors anyway

6
Graphics / Re: sf::Color linker error
« on: August 21, 2023, 04:29:40 am »
In "Getting started": "SFML and Visual Studio"
http://www.sfml-dev.org/tutorials/1.6/start-vc.php

The relevant part is:
Quote
Important: if you link against the dynamic libraries, you have to define the SFML_DYNAMIC macro in your project's settings. If you don't, you'll get linker errors when compiling your application.

I did everything as shown and I followed what you said but I get 17 errors:
Error   LNK2019   unresolved external symbol "public: __thiscall sf::String::String(char const *,class std::locale const &)" (??0String@sf@@QAE@PBDABVlocale@std@@@Z) referenced in function _main   GameEngine   E:\Programmation\Apps\GameEngine\GameEngine\main.obj   1

Error   LNK2019   unresolved external symbol "public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (??0VideoMode@sf@@QAE@III@Z) referenced in function _main   GameEngine   E:\Programmation\Apps\GameEngine\GameEngine\main.obj   1   

Error   LNK2019   unresolved external symbol "public: __thiscall sf::Color::Color(unsigned char,unsigned char,unsigned char,unsigned char)" (??0Color@sf@@QAE@EEEE@Z) referenced in function _main   GameEngine   E:\Programmation\Apps\GameEngine\GameEngine\main.obj   1   

... and 14 more for Video::Video, Window::Window etc... Can you help me ?

7
General / Re: SFML 144 Errors in Rect.inl
« on: November 02, 2022, 04:28:43 am »
I figured that in my framwork.h that comes with the DLL project there is indeed an include to windows.h. But I cannot remote it, because when I remove it, yes the 144 errors disapears, but some other appears and make my dllmain.cpp stop working. What can I do

8
General / SFML 144 Errors in Rect.inl
« on: November 02, 2022, 04:18:59 am »
I installed SFML via Nugget Package Manager. I had it in another project and everything is working fine. Now I created a Dynamic Library project in C++ and reinstalled it. But I automatically got these errors

https://imgur.com/a/BrGVckU

I already read this but it didn't solve my problem:
https://en.sfml-dev.org/forums/index.php?topic=20008.0
https://en.sfml-dev.org/forums/index.php?topic=25059.0
https://en.sfml-dev.org/forums/index.php?topic=26401.0
https://en.sfml-dev.org/forums/index.php?topic=27880.0


Here are the only places where I use SFML. I really don't understand

#pragma once
#include <SFML/Graphics.hpp>

class World2D
{
   public:

      World2D(); // Empty World2D
      World2D(std::string windowName, double windowWidth, double windowsHeight); // World with size

   protected:

   private:
};




#pragma once
#include <SFML/Graphics.hpp>
#include <string>

class Sprite2D
{
   public:

      Sprite2D(); // Empty Sprite
      Sprite2D(std::string spritePath, double spriteWidth, double spriteHeight); // Sprite
      Sprite2D(std::string spritePath, double spriteWidth, double spriteHeight, double posX, double posY); // Sprite and a determined position
      ~Sprite2D();

   protected:

   private:

};

Pages: [1]