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

Pages: [1]
1
Graphics / Re: sf::Image loadFromFile is not working
« on: August 30, 2021, 02:29:11 pm »
are you sure you're not mixing x86 and x64 libraries?
and also not mixing debug and release libraries?
Yes I'm sure, I've checked all the libraries before I made the post.

2
Graphics / sf::Image loadFromFile is not working
« on: August 23, 2021, 12:45:03 am »
so, i'm using code blocks 16.01 with a TDM 5.1.0 compiler with SFML version 2.5.1, i'm doing a project to convert an RGBA image to ASCII characters using SFML. I'm loading an image in by doing this:

sf::Image img;
if(!img.loadFromFile(file_path))
{
     std::cout<<"error loading image"<<std::endl;
}
 

but instead of the code outputing "error loading image", it gives me an error:

obj\Release\main.o:main.cpp:(.text.startup+0x87)||undefined reference to `sf::Image::loadFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'|
 

can anyone help?

3
Network / multiple tcplisteners
« on: August 08, 2021, 05:42:09 am »
Hi! im a fellow newbie who just found out about sfml

i was wondering if we can have multiple Tcplisteners and socketSelectors on multiple different port, if i cant, is there anyway i can have a server listening to multiple different ports?

Thanks!

4
Network / [SOLVED] sf::Packet doesn't work
« on: July 17, 2021, 05:54:20 pm »
Hi, a fellow newbie here, if anyone knows the solution to this problem, please help.


So, i have planned a lot about making my new multiplayer sort of game so i screw around some tcp clients and server, just experimenting how they work. i used strings to send data around but encoding and decoding them was too hard.

So i was going to use sf::Packet to send data to the server or client but when i do this:
sf::Packet newPac;
newPac << somedata;
socket.send(newPac);
 

it would give me this error: 'newPac' does not name a type
what should i do to get rid of the error?

Pages: [1]
anything