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

Pages: [1]
1
IT's very hard... I don't know where I can start...Can you help me, please??? Best regards,
lestroso :-[

2
Here I include 2 screenshots. from xcode 12.4 thanks a lot....Lestroso :( :(

3
hi, I'm trying to compile without success the sfml library...I have tried with Xcode, Netbeans, Eclipse...but nothing works here on my Macmini M1 with Big Sur 11.2...Can Somebody help me?? please?? Best regards, Lestroso :-[ :-[ :-[

4
Graphics / Re: Problem Loading Images on App Bundle on Mac os x
« on: April 08, 2020, 06:59:33 pm »
hi...
thank you for your support....but i need in truth an easy way to do that....i tryed to load the a template with xcode...without success.. i dont' use xcode too difficult...i'm working with netbeans to be crossplatform...so...i wonder me if in the bundle do i must customize theplist.file to load that resources.. to tell to the bundle where to fish theresources...

Any other ideas??? Or Help?? best regards, lestroso :)

5
Graphics / Re: Problem Loading Images on App Bundle on Mac os x
« on: April 07, 2020, 02:29:26 pm »
Dear eXpl0it3r,

i thank you so much for your answer....but i don't see any solution....there....

i tryed this to link to my bundle...:
 t3.loadFromFile("Resource/images/ball.png"); <----------but nothing works...
 
I have tryed to link to my bundle Resources...but nothing...
Do you have any other idea???

Best regards, Lestroso :)

6
Graphics / Problem Loading Images on App Bundle on Mac os x
« on: April 06, 2020, 07:53:47 pm »
Hi,
i try to play with this code, to make an Arkanoid...in Macosx With Netbeans 13...

#include <SFML/Graphics.hpp>
#include <time.h>
using namespace sf;

int main()
{
    srand(time(0));

    RenderWindow app(VideoMode(520, 450), "Arkanoid!");
    app.setFramerateLimit(60);

    Texture t1,t2,t3,t4;
    t1.loadFromFile("images/block01.png");
    t2.loadFromFile("images/background.jpg");
    t3.loadFromFile("images/ball.png");
    t4.loadFromFile("images/paddle.png");

    Sprite sBackground(t2), sBall(t3), sPaddle(t4);
    sPaddle.setPosition(300,440);

    Sprite block[1000];

    int n=0;
    for (int i=1;i<=10;i++)
    for (int j=1;j<=10;j++)
      {
         block[n].setTexture(t1);
         block[n].setPosition(i*43,j*20);
         n++;
      }

    float dx=6, dy=5;
    float x=300, y=300;

    while (app.isOpen())
    {
       Event e;
       while (app.pollEvent(e))
       {
         if (e.type == Event::Closed)
             app.close();
       }

    x+=dx;
    for (int i=0;i<n;i++)
        if ( FloatRect(x+3,y+3,6,6).intersects(block[i].getGlobalBounds()) )
             {block[i].setPosition(-100,0); dx=-dx;}

    y+=dy;
    for (int i=0;i<n;i++)
        if ( FloatRect(x+3,y+3,6,6).intersects(block[i].getGlobalBounds()) )
             {block[i].setPosition(-100,0); dy=-dy;}

    if (x<0 || x>520)  dx=-dx;
    if (y<0 || y>450)  dy=-dy;

    if (Keyboard::isKeyPressed(Keyboard::Right)) sPaddle.move(6,0);
    if (Keyboard::isKeyPressed(Keyboard::Left)) sPaddle.move(-6,0);

    if ( FloatRect(x,y,12,12).intersects(sPaddle.getGlobalBounds()) ) dy=-(rand()%5+2);

    sBall.setPosition(x,y);

    app.clear();
    app.draw(sBackground);
    app.draw(sBall);
    app.draw(sPaddle);

    for (int i=0;i<n;i++)
     app.draw(block[i]);

    app.display();
    }

  return 0;
}
 

Ok , this code is very good..but when i make the final app bundle...the app starts, the window ok.. but i don't see any images!!!but inside Netbeans this code works fine..

I have tryed anything like this::
Texture t1,t2,t3,t4;
    t1.loadFromFile("./images/block01.png"); <---------
    t2.loadFromFile("../images/background.jpg"); <--------
    t3.loadFromFile("Resource/images/ball.png"); <----------
    t4.loadFromFile("images/paddle.png");
 
it seems dont see where the link is....
Nothing works here???...Can somebody help me please??? Best regards, Lestroso  :) :) :)

7
General / Re: Solved !!!Error Compilation on Mac Os X 10.13.6
« on: April 05, 2020, 10:28:14 pm »
Dear friends,

i have succeded either in Debug and Release Mode....With Netbeans!!!!Macosx!!!

The trik was to give the right headers either in debug and release mode..and also to put the right strings in the c++ Linker....Now unfortunetly i have problems with the resorce that don't load very well....Ok..Thanks a lot,, lestroso

8
General / Solved! Re: Error Compilation on Mac Os X 10.13.6
« on: April 05, 2020, 09:30:12 pm »
Dear Friend,

i have succeded for the half to Compile SMFL Library!!!!

I have used NetBeans IDE 11.3  with my mac os x 10.13.6 High Sierra..version of gcc is 9...

Now in Debug Mode my app works fine...i have compiled the demo example source for Linux...ok..

I have had to setup also in the linker (inside netbeans) this line of code:"-lsfml-graphics -lsfml-window -lsfml-system".
Also i have putted on c++ the Hedears Library Reference located in the system frameworks....


Ok now if i compile in release mode the compiler say to me:
cd '/Users/saverio/NetBeansProjects/testsmfl'
/usr/bin/make -f Makefile CONF=Release
"/Applications/Xcode.app/Contents/Developer/usr/bin/make" -f nbproject/Makefile-Release.mk QMAKE= SUBPROJECTS= .build-conf
"/Applications/Xcode.app/Contents/Developer/usr/bin/make"  -f nbproject/Makefile-Release.mk dist/Release/GNU-MacOSX/testsmfl
mkdir -p dist/Release/GNU-MacOSX
g++     -o dist/Release/GNU-MacOSX/testsmfl build/Release/GNU-MacOSX/main.o -framework SFML
Undefined symbols for architecture x86_64:
  "sf::CircleShape::CircleShape(float, unsigned long)", referenced from:
      _main in main.o
  "sf::RenderStates::Default", referenced from:
      _main in main.o
  "sf::RenderTarget::draw(sf::Drawable const&, sf::RenderStates const&)", referenced from:
      _main in main.o
  "sf::RenderTarget::clear(sf::Color const&)", referenced from:
      _main in main.o
  "sf::RenderWindow::RenderWindow(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&)", referenced from:
      _main in main.o
  "sf::RenderWindow::~RenderWindow()", referenced from:
      _main in main.o
  "sf::Color::Color(unsigned char, unsigned char, unsigned char, unsigned char)", referenced from:
      _main in main.o
  "sf::Shape::setFillColor(sf::Color const&)", referenced from:
      _main in main.o
  "sf::Shape::setOutlineColor(sf::Color const&)", referenced from:
      _main in main.o
  "sf::Shape::setOutlineThickness(float)", referenced from:
      _main in main.o
  "sf::Shape::~Shape()", referenced from:
      _main in main.o
  "sf::String::String(char const*, std::__1::locale const&)", referenced from:
      _main in main.o
  "sf::Window::close()", referenced from:
      _main in main.o
  "sf::Window::display()", referenced from:
      _main in main.o
  "sf::Window::pollEvent(sf::Event&)", referenced from:
      _main in main.o
  "sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)", referenced from:
      _main in main.o
  "sf::Window::isOpen() const", referenced from:
      _main in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [dist/Release/GNU-MacOSX/testsmfl] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2

BUILD FAILED (exit value 2, total time: 87ms)


 
Can some bodyhelp me please???Thanks a lot!!! Lestroso :) :) :)

9
General / Solved !!!Error Compilation on Mac Os X 10.13.6
« on: April 03, 2020, 11:44:47 pm »
Dear Friends....
I have Macosx 10.13.6...
i'm trying to compile without success this Beautiful Library...but i've got this message:
Undefined symbols for architecture x86_64:
  "sf::String::String(char const*, std::locale const&)", referenced from:
      _main in main.o
ld: symbol(s) not found for architecture x86_64
 

i followed this steps...
compiled with this....: g++ -c main.cpp

then: g++ main.o -o sfml-app -lsfml-graphics -lsfml-window -lsfml-system

but in this point i ecounter this problem....
Undefined symbols for architecture x86_64:
  "sf::String::String(char const*, std::locale const&)", referenced from:
      _main in main.o
ld: symbol(s) not found for architecture x86_64
 

not so far i have upgraded the c++ to c++9 and created a link for c++ to c++9....

I'm sorry for this Casino.....I'm a litttle confused...

But now i have installed right followed this link.:https://www.sfml-dev.org/tutorials/2.5/start-linux.php

I'm sure ...i have installed the library right.....and then i tryed this code:
#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear();
        window.draw(shape);
        window.display();
    }

    return 0;
}

 

Can somebody help me please?? I'm desperado...Best Regards, Lestroso :'( :'( :'(

Pages: [1]
anything