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

Pages: [1]
1
General / Re: SFML Audio Dependencies
« on: February 23, 2017, 12:00:15 pm »
I think what mistified me is that the dynamic build I made worked without linking the non-sfml "libraries," (I had included the main 3 SFML ones from the tutorial, but I figured that was redundant since my static build required many more dependencies), so I figured that dynamic linking must just search everything on your path (how else would it find standard C/C++ libraries?) and assumed that to be the same for user libraries as well. It seems oddly inconsistent that it doesn't work that way!
The dynamic SFML libraries were already linked against the other libraries, thus they are "included" in the SFML libraries themselves. When you decide to go with static linking, you're basically saying to yourself, that you want to do everything and as such, it's also your responsibility to link the other libraries.
In earlier versions of SFML, this wasn't the case, but back then there was an ugly hack, which lead to issues.

Ah. That kind of makes sense, I suppose.

The more I think about this, the more I realize that there is a lot of magic going on that I don't understand, though. How, for example, does the compiler know where to look for dlls like "opengl32" without my giving it any kind of path to that file, or having that file on my path (to my knowledge. Maybe I do? / same with all of the other dependencies like gdi32, winmm, jpeg, etc. etc.?)

At first I was actually looking for these files on my system and trying to find/link to the full url and extension, before I realized that SFML/the compiler somehow just "know" these files and where to look for them ???

2
General / Re: SFML Audio Dependencies
« on: February 23, 2017, 11:48:21 am »
Quote
I can say that I did need to include jpeg to make the example work
The "getting started" tutorial mentions it, in the list of libraries to link in case of static linking.

Quote
and a lot of other things were not straight forward/seem not to be mentioned. It could be written more clearly, and I have some suggestions regarding how to do that
Suggestions about how to improve the documentation are always welcome :)

Quote
I was under the impression that:
- simply having the dll in the appropriate folder meant that it was implicitly linked dynamically
- including it in the linked list would make it static
You always have to link a library that you use, and it's the library itself which is built either as a static one or a dynamic one (that's why you have both regular and -s libraries in SFML).
And there's no such thing as "implicit linking".

Thanks. As you can tell, I'm kind of new to C++ and still wrapping my head around this linking business! I think what mystified me is that the dynamic build I made worked without linking the non-sfml "libraries," (I had included the main 3 SFML ones from the tutorial, but I figured that was redundant since my static build required many more dependencies), so I figured that dynamic linking must just search everything on your path (how else would it find standard C/C++ libraries?) and assumed that to be the same for user libraries as well. It seems oddly inconsistent that it doesn't work that way!

[Edit] Except that, I just realized, I don't have SFML on my path :P
Actually, maybe this is consistent and I just wasn't thinking. Would it dynamically link "automatically" if it were on my path?

3
General / Re: SFML Audio Dependencies
« on: February 23, 2017, 09:01:13 am »
Oh, geez. Apparently I don't understand the nature of dynamic linking and the SFML_STATIC flag.

I was under the impression that:
- simply having the dll in the appropriate folder meant that it was implicitly linked dynamically
- including it in the linked list would make it static

So I had removed it from the linked list when I copied it into my project folder.

I readded it to the list and it works now. Thanks a lot!

4
General / Re: SFML Audio Dependencies
« on: February 23, 2017, 08:48:20 am »
Since you list openal32 and the linker doesn't complain about it not being found, it means you must have a libopenal32.a located somewhere. But because the linker can't find the dynamic/import (_imp__) symbols in that provided libopenal32.a, it means that you must have obtained a static version of libopenal32.a from somewhere other than SFML.
So what steps did you take in trying to get OpenAL to work. Tell us even the ones that in your opinion failed.

I did the following:
- tried to link to it along with everything else. I did this by simply adding it to the list of linked (debug) libraries as "openal32"

- got errors, googled, and found that it can't be statically linked.

- did a search on my computer for openal32.dll, found it in my SMFL-2.4.1/bin folder, copied it into my project folder.

- It appeared to work. I could declare variables such as sf::SoundBuffer without a problem.

- I then tried loading and playing a sound with the following lines and got the above compiler errors:
    sf::SoundBuffer buffer;
    if (!buffer.loadFromFile("jump.wav"))
        return -1;
    sf::Sound sound;
    sound.setBuffer(buffer);
    sound.play();

5
General / Re: SFML Audio Dependencies
« on: February 23, 2017, 08:42:51 am »
Quote
I'm finding that the dependencies are not fully listed in the tutorials *or* the documentation - even the basic "SFML Works!" program requires libraries not mentioned anywhere in the tutorial. The list of dependencies I am using is just a list that I found in an online search  for "full list of sfml dependencies in order"
Really? It is exactly the list given in the tutorials. And no, it is not wrong nor incomplete, it does work.
Let's first solve your problem, and draw conclusions about the documentation later ;)

Quote
-openal32 cannot be linked statically
The official documentation never says it can. And that's why the SFML SDK contains the corresponding DLL.

Quote
-ws2-32, whatever it is, does not exist on my machine or installation of sfml to my knowledge.
I can't see any error in your linker log about ws2_32, which means that it is correctly found and linked. So what's wrong with it?

Quote
-audio still doesn't work for some reason which I hope to solve
Yes, let's focus on that please. Going into "SFML doesn't work" or "documentation is wrong" discussions won't help to solve your specific problem ;)

Sorry - I'm just incredibly frustrated, and following the tutorials to the letter and still getting errors (and googling them only to get other people doing the same thing, often without resolutions to the problems) is discouraging.

I can say that I did need to include jpeg to make the example work, and a lot of other things were not straight forward/seem not to be mentioned. It could be written more clearly, and I have some suggestions regarding how to do that which I think would help people like myself who might otherwise spend days googling and asking questions here just to get things working! Perhaps here is not the place to discuss this, though.

So, is there anything you can tell that I have apparently missed in regards to Audio?

6
General / Re: SFML Audio Dependencies
« on: February 23, 2017, 08:31:56 am »
So where did you copy/download from the static OpenAL lib that you're trying linking?

SFML-2.4.1/bin
I'm just throwing it next to my exe in my Debug folder. I assume that is sufficient for dynamic linking, correct?
I'm not entirely sure how to mix both static and dynamic linking in Code::Blocks.
It seems to work and doesn't complain when, say, initialiazing variables. But when I try loading/playing sounds, I get compile errors.

Am I doing something wrong here?

7
General / Re: SFML Audio Dependencies
« on: February 23, 2017, 06:43:41 am »
I'm actually not using release libs, which is why I'm confused about those error messages. I'm building in debug and linking to -s-d libraries.

I'm using code blocks, for reference.

I didn't actually link to the audio libraries in my release setup. Could that still be causing errors even though I'm building the project in Debug?

Edit: I've double, triple, quadruple checked, and linked the -s-d libraries in debug and the -s libraries in static and it still doesn't work...
I also added a file, ws2_32, which I found in my Windows/system32 folder, and it makes no difference.

8
There were a few missing dependencies in the tutorial for me, namely "jpeg" and I think one or two others.

This is a good list to start with:

sfml-graphics-s
freetype
jpeg
sfml-window-s
opengl32
gdi32
sfml-system-s
winmm

Do not include the file extensions or even path if you are using Code::Blocks and following the tutorial. Just type these in as-is. That tripped me up for a while.

To my knowledge, all of those were required to compile that program for me on windows. I may be wrong about freetype, but jpeg is for sure.

9
General / SFML Audio Dependencies
« on: February 23, 2017, 06:27:32 am »
After much headache, I've finally got SFML mostly working both when linking dynamically and statically, but one thing still eludes me:

Audio. I have the following setup:

- openal32.dll in my project folder next to my .exe

- the following libraries statically linked in the following order:
sfml-graphics-s-d
freetype
jpeg
sfml-window-s-d
opengl32
gdi32
sfml-audio-s-d
openal32 [Edit] woops! Didn't have this linked after all... Read further to understand my confusion on this point if you encounter this problem :)
flac
vorbisenc
vorbisfile
vorbis
ogg
sfml-network-s-d
sfml-system-s-d
winmm

and the following, relevant code:
#include <SFML/Graphics.hpp>
#include <iostream>
#include <windows.h>
#include <conio.h>
#include <math.h>
#include <SFML/System/Vector2.hpp>
#include <SFML/Audio.hpp>

[...]

    //Audio
    sf::SoundBuffer buffer;
    if (!buffer.loadFromFile("jump.wav"))
        return -1;
    sf::Sound sound;
    sound.setBuffer(buffer);
    sound.play();

[...]
 

My error message:
||=== Build: Debug in ProtoGame (compiler: GNU GCC Compiler) ===|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(SoundBuffer.cpp.obj)||In function `ZN2sf11SoundBufferC2Ev':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\SoundBuffer.cpp|46|undefined reference to `_imp__alGenBuffers'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(SoundBuffer.cpp.obj)||In function `ZN2sf11SoundBufferC2ERKS0_':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\SoundBuffer.cpp|58|undefined reference to `_imp__alGenBuffers'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(SoundBuffer.cpp.obj)||In function `ZN2sf11SoundBufferD2Ev':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\SoundBuffer.cpp|80|undefined reference to `_imp__alDeleteBuffers'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(SoundBuffer.cpp.obj)||In function `ZNK2sf11SoundBuffer13getSampleRateEv':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\SoundBuffer.cpp|180|undefined reference to `_imp__alGetBufferi'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(SoundBuffer.cpp.obj)||In function `ZNK2sf11SoundBuffer15getChannelCountEv':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\SoundBuffer.cpp|190|undefined reference to `_imp__alGetBufferi'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(SoundBuffer.cpp.obj)||In function `ZN2sf11SoundBuffer6updateEjj':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\SoundBuffer.cpp|265|undefined reference to `_imp__alBufferData'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(Sound.cpp.obj)||In function `ZN2sf5Sound4playEv':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\Sound.cpp|73|undefined reference to `_imp__alSourcePlay'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(Sound.cpp.obj)||In function `ZN2sf5Sound5pauseEv':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\Sound.cpp|80|undefined reference to `_imp__alSourcePause'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(Sound.cpp.obj)||In function `ZN2sf5Sound4stopEv':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\Sound.cpp|87|undefined reference to `_imp__alSourceStop'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(Sound.cpp.obj)||In function `ZN2sf5Sound9setBufferERKNS_11SoundBufferE':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\Sound.cpp|104|undefined reference to `_imp__alSourcei'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(Sound.cpp.obj)||In function `ZN2sf5Sound7setLoopEb':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\Sound.cpp|111|undefined reference to `_imp__alSourcei'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(Sound.cpp.obj)||In function `ZN2sf5Sound16setPlayingOffsetENS_4TimeE':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\Sound.cpp|118|undefined reference to `_imp__alSourcef'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(Sound.cpp.obj)||In function `ZNK2sf5Sound7getLoopEv':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\Sound.cpp|133|undefined reference to `_imp__alGetSourcei'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(Sound.cpp.obj)||In function `ZNK2sf5Sound16getPlayingOffsetEv':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\Sound.cpp|143|undefined reference to `_imp__alGetSourcef'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(Sound.cpp.obj)||In function `ZN2sf5Sound11resetBufferEv':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\Sound.cpp|192|undefined reference to `_imp__alSourcei'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(ALCheck.cpp.obj)||In function `ZN2sf4priv12alCheckErrorEPKcjS2_':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\ALCheck.cpp|41|undefined reference to `_imp__alGetError'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(AudioDevice.cpp.obj)||In function `ZN2sf4priv11AudioDeviceC2Ev':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\AudioDevice.cpp|54|undefined reference to `_imp__alcOpenDevice'|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\AudioDevice.cpp|59|undefined reference to `_imp__alcCreateContext'|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\AudioDevice.cpp|64|undefined reference to `_imp__alcMakeContextCurrent'|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\AudioDevice.cpp|73|undefined reference to `_imp__alListenerf'|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\AudioDevice.cpp|74|undefined reference to `_imp__alListener3f'|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\AudioDevice.cpp|75|undefined reference to `_imp__alListenerfv'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(AudioDevice.cpp.obj)||In function `ZN2sf4priv11AudioDeviceD2Ev':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\AudioDevice.cpp|93|undefined reference to `_imp__alcMakeContextCurrent'|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\AudioDevice.cpp|95|undefined reference to `_imp__alcDestroyContext'|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\AudioDevice.cpp|99|undefined reference to `_imp__alcCloseDevice'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(AudioDevice.cpp.obj)||In function `ZN2sf4priv11AudioDevice20isExtensionSupportedERKSs':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\AudioDevice.cpp|115|undefined reference to `_imp__alcIsExtensionPresent'|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\AudioDevice.cpp|117|undefined reference to `_imp__alIsExtensionPresent'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(AudioDevice.cpp.obj)||In function `ZN2sf4priv11AudioDevice25getFormatFromChannelCountEj':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\AudioDevice.cpp|138|undefined reference to `_imp__alGetEnumValue'|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\AudioDevice.cpp|139|undefined reference to `_imp__alGetEnumValue'|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\AudioDevice.cpp|140|undefined reference to `_imp__alGetEnumValue'|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\AudioDevice.cpp|141|undefined reference to `_imp__alGetEnumValue'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(AudioDevice.cpp.obj)||In function `ZN2sf4priv11AudioDevice15setGlobalVolumeEf':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\AudioDevice.cpp|157|undefined reference to `_imp__alListenerf'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(AudioDevice.cpp.obj)||In function `ZN2sf4priv11AudioDevice11setPositionERKNS_7Vector3IfEE':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\AudioDevice.cpp|174|undefined reference to `_imp__alListener3f'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(AudioDevice.cpp.obj)||In function `ZN2sf4priv11AudioDevice12setDirectionERKNS_7Vector3IfEE':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\AudioDevice.cpp|193|undefined reference to `_imp__alListenerfv'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(AudioDevice.cpp.obj)||In function `ZN2sf4priv11AudioDevice11setUpVectorERKNS_7Vector3IfEE':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\AudioDevice.cpp|213|undefined reference to `_imp__alListenerfv'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(SoundSource.cpp.obj)||In function `ZN2sf11SoundSourceC2Ev':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\SoundSource.cpp|37|undefined reference to `_imp__alGenSources'|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\SoundSource.cpp|38|undefined reference to `_imp__alSourcei'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(SoundSource.cpp.obj)||In function `ZN2sf11SoundSourceC2ERKS0_':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\SoundSource.cpp|45|undefined reference to `_imp__alGenSources'|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\SoundSource.cpp|46|undefined reference to `_imp__alSourcei'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(SoundSource.cpp.obj)||In function `ZN2sf11SoundSourceD2Ev':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\SoundSource.cpp|60|undefined reference to `_imp__alSourcei'|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\SoundSource.cpp|61|undefined reference to `_imp__alDeleteSources'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(SoundSource.cpp.obj)||In function `ZN2sf11SoundSource8setPitchEf':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\SoundSource.cpp|68|undefined reference to `_imp__alSourcef'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(SoundSource.cpp.obj)||In function `ZN2sf11SoundSource9setVolumeEf':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\SoundSource.cpp|75|undefined reference to `_imp__alSourcef'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(SoundSource.cpp.obj)||In function `ZN2sf11SoundSource11setPositionEfff':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\SoundSource.cpp|82|undefined reference to `_imp__alSource3f'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(SoundSource.cpp.obj)||In function `ZN2sf11SoundSource21setRelativeToListenerEb':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\SoundSource.cpp|96|undefined reference to `_imp__alSourcei'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(SoundSource.cpp.obj)||In function `ZN2sf11SoundSource14setMinDistanceEf':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\SoundSource.cpp|103|undefined reference to `_imp__alSourcef'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(SoundSource.cpp.obj)||In function `ZN2sf11SoundSource14setAttenuationEf':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\SoundSource.cpp|110|undefined reference to `_imp__alSourcef'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(SoundSource.cpp.obj)||In function `ZNK2sf11SoundSource8getPitchEv':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\SoundSource.cpp|118|undefined reference to `_imp__alGetSourcef'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(SoundSource.cpp.obj)||In function `ZNK2sf11SoundSource9getVolumeEv':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\SoundSource.cpp|128|undefined reference to `_imp__alGetSourcef'|
C:\SFML-2.4.1\lib\libsfml-audio-s-d.a(SoundSource.cpp.obj)||In function `ZNK2sf11SoundSource11getPositionEv':|
D:\sfml-release\_Sources\SFML\src\SFML\Audio\SoundSource.cpp|138|undefined reference to `_imp__alGetSource3f'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build failed: 50 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
 

What am I missing?

I'm finding that the dependencies are not fully listed in the tutorials *or* the documentation - even the basic "SFML Works!" program requires libraries not mentioned anywhere in the tutorial. The list of dependencies I am using is just a list that I found in an online search  for "full list of sfml dependencies in order" - but even it is incomplete / wrong, as I discovered a few quirks, namely:
-openal32 cannot be linked statically
-ws2-32, whatever it is, does not exist on my machine or installation of sfml to my knowledge. Not sure if this is relevant or not to the problem.
-audio still doesn't work for some reason which I hope to solve

10
General / Re: How to use SFML with MinGW in the simplest way possible
« on: February 08, 2017, 12:06:56 am »
for static debug you need this file
libsfml-graphics-s-d.a

of course you link it like this
sfml-graphics-s-d

for static release you need this file
libsfml-graphics-s.a

and you link it like this
sfml-graphics-s

same with all the other sfml files

I tried that, but it didn't seem to work. Thanks, though.
Do I need to point to the bin folder with the dlls in some kind of manner which is not mentioned in the tutorial?

11
General / Re: How to use SFML with MinGW in the simplest way possible
« on: February 07, 2017, 11:45:54 pm »
It assumes some prior knowledge and leaves some things entirely unexplained, such as where to find / how to link to opengl32, winmm and gdi32, and where to put those files in relation to the sfml libraries.
Those files are Windows system files and as such are stored in \Windows\System32
However, note that these must not be moved and do not need to be copied.

I don't know Code::Blocks but it looks like you should add those libraries to the list in "Linker Settings" (along with sfml-graphics, sfml-windows and sfml-system, for example)

Don't forget to add SFML_STATIC to the "#defines"!

All of that is only if you are linking statically. Dynamically, the common problem is missing DLLs - they need to be next to the built executable.

Wow. With regards to dynamic linking, that did it for me! Thanks! You may want to add that to the tutorial ;)
The only mention of the dll files in the entire tutorial is here in passing:
(click to show/hide)
I still get errors when attempting static linking however:

(click to show/hide)

I did all of the things you mentioned in regards to static linking, including setting the flag.


Edit: Hapax may have actually given me the very answer I was looking for. In regards to dynamic linking, if I want to setup another project outside of codeblocks, do I *only* need the dlls in the folder with my exe? Do I need any make files? I don't have to mess with linking settings or search directories or anything else? If that is the case, I don't understand the nature of the include statement in the example:
Code: [Select]
#include <SFML/Graphics.hpp>

12
General / Re: How to use SFML with MinGW in the simplest way possible
« on: February 07, 2017, 03:44:55 pm »
Well, I broke down and decided to try following the Code::Blocks tutorial.
I am using the correct versions of GCC and SFML (both 4.9.2). I've spent about a dozen hours following that tutorial to a T, and am still getting errors (granted, different ones depending on whether I'm static or dynamically linking). It assumes some prior knowledge and leaves some things entirely unexplained, such as where to find / how to link to opengl32, winmm and gdi32, and where to put those files in relation to the sfml libraries.

I'll post more on this in another thread if necessary, but I may ditch Code::Blocks and take a look at Cmake.

This is a supremely frustrating experience. I would normally solve this kind of thing by relentlessly googling and trying things all day every day until I finally get it working, but I simply don't have that kind of time now =/

Maybe I'll try some video tutorials. Those tend to be far more useful as you can actually see the user go through the process step by step...

13
General / How to use SFML with MinGW in the simplest way possible
« on: February 04, 2017, 11:41:09 am »
Hi everyone.

I am currently using very simple tools for learning C++ on Windows.
I'm writing my code in either of vim or sublime text, and compiling in command line using GCC/g++.

I would like to set up SFML so I can play with graphical elements, but when I search as to how to set up SFML, all of the topics I get are along the lines of "how to set up SFML for Visual Studio," "How to set up SFML in Code::Blocks", or instructions on how to compile the source code using Cmake to set up Static linking.

My question is, do I really need to do all this? Can I just copy the appropriate DLLs into my project folder, and #include them in my source code? Are there any dependencies that are not included in the DLLs that I would have to include somehow? My Google-fu seems to be kind of failing me.

*Note: I also asked this question on the cplusplus.com forums, but I'm reposting it here as I figure it may be a more appropriate place to ask.

Pages: [1]
anything