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

Pages: [1]
1
Graphics / Re: No matching member function for call to 'draw'
« on: January 11, 2025, 11:14:58 am »
gcc (MinGW.org GCC-6.3.0-1) 6.3.0

2
Graphics / Re: No matching member function for call to 'draw'
« on: January 06, 2025, 09:27:40 pm »
FAILED: _deps/sfml-build/src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/RenderTarget.cpp.obj
C:\MinGW\bin\c++.exe -DSFML_STATIC -DSTBI_FAILURE_USERMSG -IC:/PATH/cmake-build-debug/_deps/sfml-src/include -IC:/PATH/cmake-build-debug/_deps/sfml-src/src -isystem C:/PATH/cmake-build-debug/_deps/sfml-src/extlibs/headers/stb_image -isystem C:/PATH/cmake-build-debug/_deps/sfml-src/extlibs/headers/glad/include -isystem C:/PATH/cmake-build-debug/_deps/sfml-src/extlibs/headers/freetype2 -g -fdiagnostics-color=always  -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wcast-align -Wunused -Woverloaded-virtual -Wconversion -Wsign-conversion -Wdouble-promotion -Wformat=2 -Wnull-dereference -Wold-style-cast -Wpedantic -Wmisleading-indentation -Wduplicated-cond -Wlogical-op -MD -MT _deps/sfml-build/src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/RenderTarget.cpp.obj -MF _deps\sfml-build\src\SFML\Graphics\CMakeFiles\sfml-graphics.dir\RenderTarget.cpp.obj.d -o _deps/sfml-build/src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/RenderTarget.cpp.obj -c C:/PATH/cmake-build-debug/_deps/sfml-src/src/SFML/Graphics/RenderTarget.cpp
In file included from C:/PATH/cmake-build-debug/_deps/sfml-src/include/SFML/Graphics.hpp:46:0,
                 from c:\users\esadk\onedrive\desktop\programming\physicsengine\circle.h:7,
                 from C:/PATH/cmake-build-debug/_deps/sfml-src/include/SFML/Graphics/RenderTarget.hpp:41,
                 from C:/PATH/cmake-build-debug/_deps/sfml-src/src/SFML/Graphics/RenderTarget.cpp:28:
C:/PATH/cmake-build-debug/_deps/sfml-src/include/SFML/Graphics/RenderTexture.hpp:48:48: error: invalid use of incomplete type 'class sf::RenderTarget'
 class SFML_GRAPHICS_API RenderTexture : public RenderTarget
                                                ^~~~~~~~~~~~
In file included from C:/PATH/cmake-build-debug/_deps/sfml-src/include/SFML/Graphics/Shape.hpp:32:0,
                 from C:/PATH/cmake-build-debug/_deps/sfml-src/include/SFML/Graphics/CircleShape.hpp:32,
                 from C:/PATH/cmake-build-debug/_deps/sfml-src/include/SFML/Graphics.hpp:34,
                 from c:\users\esadk\onedrive\desktop\programming\physicsengine\circle.h:7,
                 from C:/PATH/cmake-build-debug/_deps/sfml-src/include/SFML/Graphics/RenderTarget.hpp:41,
                 from C:/PATH/cmake-build-debug/_deps/sfml-src/src/SFML/Graphics/RenderTarget.cpp:28:
C:/PATH/cmake-build-debug/_deps/sfml-src/include/SFML/Graphics/Drawable.hpp:37:7: note: forward declaration of 'class sf::RenderTarget'
 class RenderTarget;
       ^~~~~~~~~~~~
In file included from C:/PATH/cmake-build-debug/_deps/sfml-src/include/SFML/Graphics.hpp:47:0,
                 from c:\users\esadk\onedrive\desktop\programming\physicsengine\circle.h:7,
                 from C:/PATH/cmake-build-debug/_deps/sfml-src/include/SFML/Graphics/RenderTarget.hpp:41,
                 from C:/PATH/cmake-build-debug/_deps/sfml-src/src/SFML/Graphics/RenderTarget.cpp:28:
C:/PATH/cmake-build-debug/_deps/sfml-src/include/SFML/Graphics/RenderWindow.hpp:44:62: error: invalid use of incomplete type 'class sf::RenderTarget'
 class SFML_GRAPHICS_API RenderWindow : public Window, public RenderTarget
                                                              ^~~~~~~~~~~~
In file included from C:/PATH/cmake-build-debug/_deps/sfml-src/include/SFML/Graphics/Shape.hpp:32:0,
                 from C:/PATH/cmake-build-debug/_deps/sfml-src/include/SFML/Graphics/CircleShape.hpp:32,
                 from C:/PATH/cmake-build-debug/_deps/sfml-src/include/SFML/Graphics.hpp:34,
                 from c:\users\esadk\onedrive\desktop\programming\physicsengine\circle.h:7,
                 from C:/PATH/cmake-build-debug/_deps/sfml-src/include/SFML/Graphics/RenderTarget.hpp:41,
                 from C:/PATH/cmake-build-debug/_deps/sfml-src/src/SFML/Graphics/RenderTarget.cpp:28:
C:/PATH/cmake-build-debug/_deps/sfml-src/include/SFML/Graphics/Drawable.hpp:37:7: note: forward declaration of 'class sf::RenderTarget'
 class RenderTarget;
       ^~~~~~~~~~~~
C:/PATH/cmake-build-debug/_deps/sfml-src/src/SFML/Graphics/RenderTarget.cpp: In member function 'void sf::RenderTarget::draw(sf::RectangleShape, const sf::RenderStates&)':
C:/PATH/cmake-build-debug/_deps/sfml-src/src/SFML/Graphics/RenderTarget.cpp:268:32: error: 'virtual void sf::Shape::draw(sf::RenderTarget&, sf::RenderStates) const' is private within this context
     drawable.draw(*this, states);
                                ^
In file included from C:/PATH/cmake-build-debug/_deps/sfml-src/include/SFML/Graphics/CircleShape.hpp:32:0,
                 from C:/PATH/cmake-build-debug/_deps/sfml-src/include/SFML/Graphics.hpp:34,
                 from c:\users\esadk\onedrive\desktop\programming\physicsengine\circle.h:7,
                 from C:/PATH/cmake-build-debug/_deps/sfml-src/include/SFML/Graphics/RenderTarget.hpp:41,
                 from C:/PATH/cmake-build-debug/_deps/sfml-src/src/SFML/Graphics/RenderTarget.cpp:28:
C:/PATH/cmake-build-debug/_deps/sfml-src/include/SFML/Graphics/Shape.hpp:277:18: note: declared private here
     virtual void draw(RenderTarget& target, RenderStates states) const;
                  ^~~~
ninja: build stopped: subcommand failed.

3
Graphics / No matching member function for call to 'draw'
« on: January 05, 2025, 10:08:02 pm »
New to c++ and sfml,
Tried to implement my circle into a separate header and class file.
.draw() doesnt accept that my circle.shape is a drawable.
tho It seems to work with sf::RectangleShape.
I did the almost exact same wtith RectShape and that draws it no problem.

header file ; https://pastebin.com/n7enWda9

circle class: https://pastebin.com/Pq0cAXfn

main file (demo, essentially) : https://pastebin.com/mdDULJfQ

Pages: [1]
anything