Basically, I wanted to test out Packets, so I copied and pasted some code on the tutorial into a test file. However, every time I ran the code, the error "ld: open() failed, errno=30 for 'test'" always appeared (test is the name of the file.)
I put the relevant code below:
#include <iostream>
#include "SFML/Network.hpp"
using namespace std;
using namespace sf;
int main(){
UdpSocket socket;
Uint16 x = 10;
string s = "hello";
double d = 0.6;
Packet packet;
packet << x << s << d;
IpAddress recipientAddress = "192.168.0.5";
unsigned short recipientPort = 10293;
socket.send(packet, recipientAddress, recipientPort);
}
At the moment, I don't have code running to receive the file, but I expected that to be the error instead of what I have right now. After some researching, I found that errno = 30 means that it is a "Read-only file system", but that can't be the case since it worked when I tested the exact same file with only the Graphics library.
As for additional information, I am running the code on Xcode and using homebrew for SFML. My computer is a Mac with a Silicon M1 chip, and I run the code through terminal.
Please inform me if I need to add any more information/making rookie mistakes. I did already try restarting the computer, but it did nothing.