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

Pages: [1] 2
1
C / Re: partical system and shader effects
« on: March 17, 2015, 09:18:42 pm »
Alright, thx guys, is it hard to do it from scratch?

2
C / Re: partical system and shader effects
« on: March 17, 2015, 08:40:40 pm »
like. really?

3
C / partical system and shader effects
« on: March 17, 2015, 07:53:00 pm »
Back then when I used sfml I would simply add to the class sf::drawable if I'm doing partical system or shader effects, just wondering what is the equivalent in csfml since I don't observe the sf::drawable class?

4
C / Re: sf has not been declared
« on: March 11, 2015, 09:32:45 pm »
Oh nvm I got it, thx

5
C / Re: sf has not been declared
« on: March 11, 2015, 09:31:08 pm »
ty for the reply, but how do I translate?

6
C / Re: sf has not been declared
« on: March 11, 2015, 09:26:24 pm »
btw I simply copied and pasted the tutorial code from the tutorial page, pretty sure the scope is for c++ but how do I make it compatible with c?

7
C / sf has not been declared
« on: March 11, 2015, 09:18:30 pm »
Hi I was having some trouble with using csfml, my comman to build is:

g++.exe -Wall -g -Wall -Iinclude -IC:\CSFML-2.2\include -c C:\test\src\test.cpp -o obj\Debug\src\test.o

and then the error messages pop up:

C:\test\src\test.cpp:2:17: error: 'sf' is not a namespace-name
 using namespace sf;
                 ^
C:\test\src\test.cpp:2:19: error: expected namespace-name before ';' token
 using namespace sf;
                   ^
C:\test\src\test.cpp: In function 'int main()':
C:\test\src\test.cpp:6:5: error: 'sf' has not been declared
     sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
     ^
C:\test\src\test.cpp:7:5: error: 'sf' has not been declared
     sf::CircleShape shape(100.f);
     ^
C:\test\src\test.cpp:8:5: error: 'shape' was not declared in this scope
     shape.setFillColor(sf::Color::Green);
     ^
C:\test\src\test.cpp:8:24: error: 'sf' has not been declared
     shape.setFillColor(sf::Color::Green);
                        ^
C:\test\src\test.cpp:10:12: error: 'window' was not declared in this scope
     while (window.isOpen())
            ^
C:\test\src\test.cpp:12:9: error: 'sf' has not been declared
         sf::Event event;
         ^
C:\test\src\test.cpp:13:33: error: 'event' was not declared in this scope
         while (window.pollEvent(event))
                                 ^
C:\test\src\test.cpp:15:31: error: 'sf' has not been declared
             if (event.type == sf::Event::Closed)


any idea?

8
General / Re: cant run SFML on Code::Blocks
« on: March 11, 2015, 03:51:42 am »
OMG finally I got it, thank you all for all the help.

The issue came down to incompatibility with compiler and my computer's architecture, I got an architecture of x64 but downloaded and installed x86 version of Mingw(which is Mingw32 in there offical website). I had to download not Mingw but mingw-w64 instead and then get the correct version of the library and finally everything worked

9
General / Re: cant run SFML on Code::Blocks
« on: March 11, 2015, 12:20:58 am »
command line was like this :

mingw32-g++.exe -L..\SFML-2.2\lib -o bin\Debug\test.exe obj\Debug\src\test.o   -lsfml-graphics -lsfml-window -lsfml-system

10
General / Re: cant run SFML on Code::Blocks
« on: March 10, 2015, 11:38:10 pm »
Thank you for the help

I did read through the tutorial but still can't get it working, i tried static and dynamic linking with release mode, the files are there, but when I use dynamic linking and delete the SFML_STATIC define, i got some different error messages:

||=== Build: Debug in test (compiler: GNU GCC Compiler) ===|
obj\Debug\src\test.o||In function `main':|
C:\test\src\test.cpp|5|undefined reference to `_imp___ZN2sf6StringC1EPKcRKSt6locale'|
C:\test\src\test.cpp|5|undefined reference to `_imp___ZN2sf9VideoModeC1Ejjj'|
C:\test\src\test.cpp|5|undefined reference to `_imp___ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'|
C:\test\src\test.cpp|6|undefined reference to `_imp___ZN2sf11CircleShapeC1Efj'|
C:\test\src\test.cpp|7|undefined reference to `_imp___ZN2sf5Color5GreenE'|
C:\test\src\test.cpp|7|undefined reference to `_imp___ZN2sf5Shape12setFillColorERKNS_5ColorE'|
C:\test\src\test.cpp|15|undefined reference to `_imp___ZN2sf6Window5closeEv'|
C:\test\src\test.cpp|12|undefined reference to `_imp___ZN2sf6Window9pollEventERNS_5EventE'|
C:\test\src\test.cpp|18|undefined reference to `_imp___ZN2sf5ColorC1Ehhhh'|
C:\test\src\test.cpp|18|undefined reference to `_imp___ZN2sf12RenderTarget5clearERKNS_5ColorE'|
C:\test\src\test.cpp|19|undefined reference to `_imp___ZN2sf12RenderStates7DefaultE'|
C:\test\src\test.cpp|19|undefined reference to `_imp___ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE'|
C:\test\src\test.cpp|20|undefined reference to `_imp___ZN2sf6Window7displayEv'|
C:\test\src\test.cpp|9|undefined reference to `_imp___ZNK2sf6Window6isOpenEv'|
C:\test\src\test.cpp|23|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'|
C:\test\src\test.cpp|23|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'|
C:\test\src\test.cpp|23|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'|
obj\Debug\src\test.o||In function `ZN2sf11CircleShapeD1Ev':|
C:\test\..\SFML-2.2\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `_imp___ZTVN2sf11CircleShapeE'|
C:\test\..\SFML-2.2\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `_imp___ZTVN2sf11CircleShapeE'|
C:\test\..\SFML-2.2\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `_imp___ZN2sf5ShapeD2Ev'|
||=== Build failed: 20 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

11
General / Re: cant run SFML on Code::Blocks
« on: March 10, 2015, 03:00:56 am »
the ide itself even give me autocomplete, if i type "sf::R" renderwindow will show up

12
General / Re: cant run SFML on Code::Blocks
« on: March 10, 2015, 02:56:43 am »
libfreetype.a
libglew.a
libjpeg.a
libopenal32.a
libsfml-audio.a
etc

it is the gcc 4.8.1 x64 version of sfml 2.2, i got the correct gcc version and 64bit os

13
General / Re: cant run SFML on Code::Blocks
« on: March 10, 2015, 12:47:23 am »
under link libraries i got sfml-graphics sfml-window and sfml-system in that order, as u can see i got dynamic links and i included my linker and compiler with SFML\lib and SFML\include, i tried static linking with command
mingw32-g++.exe -LC:\SFML-2.2\lib -o bin\Debug\test.exe obj\Debug\src\test.o   -lsfml-graphics-s -lsfml-window-s -lsfml-system-s -lwinmm -lgdi32 -lglew32 -ljpeg -lfreetype -lopengl32
but same thing happened

14
General / Re: cant run SFML on Code::Blocks
« on: March 10, 2015, 12:04:48 am »
thx for the reply, i used Code::Blocks to compile and the command is
mingw32-g++.exe -Wall -DSFML_STATIC -g -IC:\SFML-2.2\include -Iinclude -c C:\test\src\test.cpp -o obj\Debug\src\test.o
i think all the linkers are working fine else i will get error message on that

15
General / Re: cant run SFML on Code::Blocks
« on: March 09, 2015, 07:58:41 pm »
tried to link other dependencies but got same error

Pages: [1] 2