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

Pages: 1 2 [3] 4 5 6
31
General / Re: Compiling on Windows
« on: February 21, 2013, 09:53:30 am »
Thank you eXpl0it3r. I will give this another go in the morning.

As for you being un able to close the window, I'm sorry about that, I usually remember to handle that even but with XCode I can simply click the stop button and it closes for me so I haven't needed to use the close button on the window yet.

As for the tips with the keyboard events, thank you, I'll be sure to do what you have suggested! :)

32
General / Re: Compiling on Windows
« on: February 21, 2013, 09:36:05 am »
The reason I'm not posting errors is that there's so many. and I find it odd that it compiles fine on Mac but then on Windows all my code is suddenly wrong. :/

I guess I'll post some of the errors tomorrow if no one has managed to help (I'm about to sleep and I'm not booting up my VM again atm haha)

Also the download is less than a megabyte I didn't think it would be that much of a hassle :o

Thank you for the reply. :)

33
General / Compiling on Windows
« on: February 21, 2013, 07:31:34 am »
Hello there! I have recently been coding a small game using SFML, it is called Pokemon Pong. It's pretty much just a Pokemon themed version of the original Pong.

I'm having a slight problem though. I can not seem to get this to compile on Windows so I can share my work with friends.

It compiles, runs and plays perfect on Mac, just when ever I stick all the files into Code::Blocks on my windows VM and compile I get errors thrown at me from all directions (Not SFML, I ran a basic SFML app beforehand and it worked fine)

So if anyone is able to compile this would you be able to show me step by step how you did it?

The download below contains all the source files along with the images and sounds for the game. :)

Download: http://www.mediafire.com/?dbbmvrubgsiu3up

34
General / Re: Networking and Code::Blocks
« on: February 17, 2013, 09:11:39 pm »
So the following would be correct? :)

sfml-graphics
sfml-window
sfml-network
sfml-audio
sfml-system

35
General / Re: Networking and Code::Blocks
« on: February 17, 2013, 08:22:40 pm »
Thanks :) and for future reference where would sfml-audio be placed?

36
General / Re: Networking and Code::Blocks
« on: February 17, 2013, 06:23:04 am »
What order would I add them in then?

sfml-graphics
sfml-window
sfml-system


where does sfml-network go?

37
General / Re: Networking and Code::Blocks
« on: February 17, 2013, 05:21:55 am »
I knew the order on that tutorial. I just didn't see an sfml-network or anything on there so I wouldn't have known where to put that.

I have tried compiling and running the following code:
#include <SFML/Network.hpp>

using namespace sf;

int main(){
sf::TcpListener listener;
return 0;
}
 

And I get the errors:
-------------- Build: Debug in SFML Networtk (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall  -g    -I..\..\..\Downloads\SFML-2.0-rc\include -I"C:\Program Files\CodeBlocks\include"  -c "C:\Users\newowner\Desktop\C++\SFML Networtk\main.cpp" -o obj\Debug\main.o
mingw32-g++.exe -L..\..\..\Downloads\SFML-2.0-rc\lib -L"C:\Program Files\CodeBlocks\lib"  -o "bin\Debug\SFML Networtk.exe" obj\Debug\main.o    -lsfml-graphics-d -lsfml-window-d -lsfml-system-d -lmingw32
obj\Debug\main.o: In function `main':
C:/Users/newowner/Desktop/C++/SFML Networtk/main.cpp:6: undefined reference to `_imp___ZN2sf11TcpListenerC1Ev'
obj\Debug\main.o: In function `~TcpListener':
C:\Users\newowner\Desktop\C++\SFML Networtk/../../../Downloads/SFML-2.0-rc/include/SFML/Network/TcpListener.hpp:43: undefined reference to `_imp___ZTVN2sf11TcpListenerE'
C:\Users\newowner\Desktop\C++\SFML Networtk/../../../Downloads/SFML-2.0-rc/include/SFML/Network/TcpListener.hpp:43: undefined reference to `_imp___ZN2sf6SocketD2Ev'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 3 seconds)
3 errors, 0 warnings (0 minutes, 3 seconds)

It works fine before I add a TcpListener, any ideas?

38
General / Re: Networking and Code::Blocks
« on: February 17, 2013, 05:13:04 am »
Well then if it's dependent of sfml-system then i'm sure that's not the reason I'm getting errors, I have always had trouble compiling my code I write on Mac on Windows, I guess I'll just mess around until I get it to work.

39
General / Networking and Code::Blocks
« on: February 17, 2013, 05:00:36 am »
Hello there! I have been trying to compile the following code in Code::Blocks

#include <iostream>
#include <SFML/Network.hpp>

using namespace sf;
using namespace std;

int main(){
    cout << "Would you like to be a server or client? (s/c)" << endl;
    char choice;
    cin >> choice;
    if(choice == 's'){
        TcpListener listener;
        listener.listen(1337);
        std::string message = "";
        Packet serverPacket;
        while(true){
            TcpSocket client;
            if(listener.accept(client) == Socket::Done){
                cout << "Client has connected from " << client.getRemoteAddress() << endl;
                cout << "Send message to client: ";
                cin >> message;
                serverPacket << message;
                client.send(serverPacket);
            }
        }
    }else{
        Packet clientPacket;
        std::string messageSent;
        TcpSocket socket;
        if(socket.connect("localhost", 1337)){
            cout << "Unable to find server." << endl;
        }else{
            cout << "Connected to server!" << endl;
        }
        while(true){
            socket.receive(clientPacket);
            if(clientPacket >> messageSent){
                cout << "[Server] " << messageSent << endl;
            }
        }
    }
    return 0;
}

I have followed the tutorial for SFML 2.0 on Windows using Code::Blocks and can run most applications I make fine.

I have only added sfml-graphics-s, sfml-window-s and sfml-system-s and their debugging equivalents to my linker options, am I suppose to add sfml-network-s to make this code compile and run correctly? :)

The reason I have not tried this myself already is because I'm not sure if sfml-network-s even exists and if it does what order I would add it into the linker options.

Thanks for reading. :)


40
General / Re: C++11 and SFML 2.0
« on: February 16, 2013, 08:38:12 am »
Finally got it working thanks to you :)

I couldn't just run my SFML project straight away, I had to set the search path and add the linked framework and library but it still works :D

Thanks again, you were a massive help!

41
General / Re: C++11 and SFML 2.0
« on: February 16, 2013, 05:40:54 am »
Oh jeez, only slightly outdated.. o.o

I have quite a slow connection due to where I live but once the tools have downloaded and I can run cmake and all that again I'll tell you how it went.

Thanks so much for the help, I really appreciate it. :D

42
General / Re: C++11 and SFML 2.0
« on: February 16, 2013, 05:28:32 am »
Thanks!

I'll go and install the command line tools and try again :)

Also I recently got the latest version of Xcode so I could use C++11 and the feedback I got from terminal was:
Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.4.2
Thread model: posix
 

43
General / Re: C++11 and SFML 2.0
« on: February 16, 2013, 05:19:06 am »
Drats, should I just instal the download you provided?

Mac OSX: 10.7.5
My compiler is the one that comes default with the latests Xcode.
'clang' does work as a command in terminal though so I'm guessing that's what I'm using.

44
General / Re: C++11 and SFML 2.0
« on: February 16, 2013, 04:52:23 am »
Followed it exactly.

Once I got to the sudo make install in terminal I got errors.

I pasted them to Pastebin: http://pastebin.com/4ZnpKFnm

 :-\

45
General / Re: C++11 and SFML 2.0
« on: February 15, 2013, 10:24:30 pm »
Sure man, that would be awesome! :D

Edit: Trying to be patient and all but if it's possible are you able to provide a download to SFML 2.0 compiled to work with C++11? :)

Pages: 1 2 [3] 4 5 6
anything