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

Pages: [1]
1
General / Re: Static Linking SFML with MinGW in Eclipse
« on: December 14, 2017, 09:19:38 pm »
I don't know what you expect from us.

Oh, I'm already very happy with the answers I got, thank you :) I just figured this might be the most likely place to find someone who has had a similar problem. Apart from that I think you can consider this case closed.

2
General / Re: Static Linking SFML with MinGW in Eclipse
« on: December 09, 2017, 05:51:23 pm »
I think so, but only when statically linking, which I don't really understand.

3
General / Re: Static Linking SFML with MinGW in Eclipse
« on: December 08, 2017, 09:34:03 am »
Thank you! I added the necessary dependencies and now it builds and runs properly.

I encounter some strange error messages now, though. They only show in the editor, not during build. So at the moment, dynamic and static building (and running) works, but I get some errors in the static project that don't appear in the exact same code in the dynamic project, like:


sf::CircleShape shape(100.f);
shape.setPointCount(128);

"The type 'sf::CircleShape' must implement the inherited pure virtual method 'sf::Shape::getPoint' "
"Invalid arguments '
Candidates are:
void setPointCount(?)
'"


Can anyone explain? The project properties of the static and the dynamic one are exactly the same, aside from different libraries and the "SFML_STATIC" preprocessor directive.

4
General / Static Linking SFML with MinGW in Eclipse
« on: November 25, 2017, 05:23:30 pm »
I'm sorry, this is probably the 10000th time someone posted about this issue and I already feel like a complete idiot about this, but I just couldn't get static linking of SFML libraries to work for me. Maybe I failed to follow the tutorials and documentations I've read about this, or maybe they were incomplete or not suitable for my case. I'd be very happy to have someone help me with this, please be patient with me  :-[

So, my OS is Windows 10 Pro 64 bit. I'd like to use the Eclipse (Eclipse Oxygen for C/C++ 64bit) IDE, because I'm familiar with it from using Java. I had already installed MinGW 6.3.0 (64 bit) for some C++ projects in Eclipse, which worked fine for me.

I downloaded SFML 2.4.2 (GCC 6.1.0 MinGW (DW2) - 32-bit) from https://www.sfml-dev.org/download/sfml/2.4.2/, and used the link to download the suiting MinGW environment (MinGW Builds 6.1.0 (32-bit)).

I figured, I could just rename my MinGW installation folder (C:\MinGW was added to the path variable and recognized by eclipse) to the version I want to use, so I changed it to the fresh 6.1.0 version that way.

This worked for me, so I think I configured Eclipse properly to work with the required MinGW 6.1.0 (32bit).
I put the SFML folder in another place, let's say {SFML_DIR}.

I set up a new project, and set the properties to the following values:
Include paths (debug/release): {SFML_DIR}\include
Library search path (debug/release): {SFML_DIR}\lib
Libraries:
sfml-graphics-d
sfml-window-d
sfml-audio-d
sfml-network-d
sfml-system-d
(debug, without the '-d' for release).

This also worked fine for me.

But the same configurations (besides changing library names accordingly and defining SFML_STATIC) for static linking failed , I get the following error message:

17:10:59 **** Incremental Build of configuration Debug for project TemplateSFMLStatic ****
Info: Configuration "Debug" uses tool-chain "MinGW GCC" that is unsupported on this system, attempting to build anyway.
Info: Internal Builder is used for build
g++ "-LC:\\Projekte\\Libraries\\C++\\SFML-2.4.2-MinGW-32\\lib" -o TemplateSFMLStatic.exe "src\\TemplateSFML.o" -lsfml-graphics-s-d -lsfml-window-s-d -lsfml-audio-s-d -lsfml-network-s-d -lsfml-system-s-d
C:\Projekte\Libraries\C++\SFML-2.4.2-MinGW-32\lib/libsfml-graphics-s-d.a(RenderTarget.cpp.obj): In function `ZN2sf12RenderTarget5clearERKNS_5ColorE':
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/RenderTarget.cpp:106: undefined reference to `glClearColor@16'
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/RenderTarget.cpp:107: undefined reference to `glClear@4'
C:\Projekte\Libraries\C++\SFML-2.4.2-MinGW-32\lib/libsfml-graphics-s-d.a(RenderTarget.cpp.obj): In function `ZN2sf12RenderTarget4drawEPKNS_6VertexEjNS_13PrimitiveTypeERKNS_12RenderStatesE':
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/RenderTarget.cpp:276: undefined reference to `glVertexPointer@16'
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/RenderTarget.cpp:277: undefined reference to `glColorPointer@16'

.
.
.

D:/sfml-release/_Sources/SFML/src/SFML/System/Win32/SleepImpl.cpp:44: undefined reference to `_imp__timeBeginPeriod@4'
D:/sfml-release/_Sources/SFML/src/SFML/System/Win32/SleepImpl.cpp:50: undefined reference to `_imp__timeEndPeriod@4'
collect2.exe: error: ld returned 1 exit status

17:11:00 Build Finished (took 355ms)


The original error message is much longer, but it mainly consists of "undefined reference" errors, so I figured that it maybe wouldn't provide any more information. If it should be important, I can post the whole thing.


Could someone please help me understand why I get this error? Does it maybe have to do with other dependencies? I'm fine with using the dynamic linking for now, but I think I would want to use the static linking one day. But maybe, if this can't get resolved easily, it's better for me to stick to dynamic linking after all, what do you think?

Thank you in advance.


Pages: [1]