Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: More Problems...  (Read 12259 times)

0 Members and 1 Guest are viewing this topic.

chessguy

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
More Problems...
« on: June 12, 2012, 08:22:18 pm »
Greetings all. A while back, I came here trying SFML as my first library, and had extensive troubles getting it to work (dynamically), but finally got it with help. Then , I tried it using a new computer, and it doesn't work anymore.

I  am using Code::Blocks with MinGW.

I made a new, empty project.

I went to project > properties, then set it to a GUI application for both debug and release.

I went to project > build options, search directories, and added the SFML/include folder for compiler, andlib for linker.

I went to other linker options, and had -lsfml-window, -lsfml-graphics, -lsfml-system. Although, I got the same results linking the respective libraries in that order the other way, both tried seperately.

I put those dlls (window, graphics, and system) - the plain .a versions of the libraries, as I was doing it dynamically.

Made some test code, included the libraries, with system first and the others following (I switched them to see if that was the problem but it wasn't). At first I screwed up but then I recalled you need the .hpp. Hrm.

I ran it, and get this error: The program cannot start because sfml-graphics-2.dll is missing. Try reinstalling...

etc. Anyhow, far as I know, backed up by searching in /lib, such a library does not exists. I tried removing the #include for the graphics mudle, and it jumped to system, so it does not seem to be a specific one. It seems as though it is quite similar to the problem whenyou don'tput the libraries next to the .exe, but I did. (In bin/debug/ , I think.)

Any ideas how to fix this? I feel like it is simple, but cannot find an answer. Searching the internet seemed to mention something about this occuring because you weren't using the debug libraries, but experimentation with this also proved to be inconclusive. They also mentioned Visual, so mabye that is why.

Can anybody offer me some guidance on how to fix this?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: More Problems...
« Reply #1 on: June 12, 2012, 08:30:07 pm »
If you follow the tutorial carefully and step by step it should work. Everything that you need to know is explained there.

Quote
searching in /lib, such a library does not exists
It should. Which archive did you download?
Laurent Gomila - SFML developer

chessguy

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Re: More Problems...
« Reply #2 on: June 12, 2012, 09:47:17 pm »
Tuturials exists for SFML 2 now?

I downloaded the release candiate... your saying sfml-xxx-2 libraries exist?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: More Problems...
« Reply #3 on: June 12, 2012, 09:58:18 pm »
Quote
Tuturials exists for SFML 2 now?
Why don't you just check?

Quote
I downloaded the release candiate...
I know. What I ask is: which SFML 2 archive did you download?
Laurent Gomila - SFML developer

chessguy

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Re: More Problems...
« Reply #4 on: June 12, 2012, 10:05:04 pm »
Found them. Seems it is a bit different then the way it worked for me with the rc last time... hrm.

Um... Windows32 bit... whatever one had code:blocks and mingw in it, I  think. I will check.

http://www.sfml-dev.org/download/2.0-rc/SFML-2.0-rc-windows-32-gcc4-sjlj.zip

EDIT:

Thisthe wrong release?

Also, Itried following the tuturial that is up now, same problem, so I am not sure where the problem likes exactly,but no libraries with a 2 seem to exist. Ideas?
« Last Edit: June 12, 2012, 11:02:34 pm by chessguy »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: More Problems...
« Reply #5 on: June 13, 2012, 12:24:34 am »
Also, Itried following the tuturial that is up now, same problem, so I am not sure where the problem likes exactly,but no libraries with a 2 seem to exist. Ideas?

The libraries don't have any '2' in their name, it's just sfml-PACKAGE(-s)(-d).lib.

(Additionally it's one thing not having English as it's native language but it's another one taking a bit more time to write something with more care and less spelling mistakes, so it will get way easier to understand. ;) )
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

chessguy

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Re: More Problems...
« Reply #6 on: June 13, 2012, 03:31:53 am »
So I thought. Why, then, can the program "not find" this non-existant library, you think?

I looked back but did not find any spelling errors. What do you mean?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: More Problems...
« Reply #7 on: June 13, 2012, 08:05:40 am »
Quote
The libraries don't have any '2' in their name
The import libraries (.lib / .a) don't, but the shared libraries (.dll) do.

Quote
Why, then, can the program "not find" this non-existant library, you think?
It's written in the tutorial. You must copy the SFML DLLs to your executable directory.
Laurent Gomila - SFML developer

chessguy

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Re: More Problems...
« Reply #8 on: June 13, 2012, 07:03:07 pm »
I copied the .a files to the directory... I don't seem to have any ending in.dll. Am I missing libaries, and if so, how could I get them? Only thing in sfml-directory-here/lib is the .a files - the .a, -s.a, -d.a, and -s-d.a, the various from of each library for the five modules. Nothing else. Twenty libraries. Am I missing some?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: More Problems...
« Reply #9 on: June 13, 2012, 07:33:51 pm »
I told you many times to read the tutorial.

If you look carefully, everything you need to know is explicitely written:
Quote
don't forget to copy the SFML DLLs (they are in <sfml-install-path/bin>)

It's so irritating...
« Last Edit: June 13, 2012, 07:35:22 pm by Laurent »
Laurent Gomila - SFML developer

chessguy

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Re: More Problems...
« Reply #10 on: June 13, 2012, 08:03:06 pm »
Ah... I had been thinking of something else, and also was a bit confused on how you link to the .a libraries, but include the DLL's. Guess that was where I made my mistake, sorry.

So, to be clear: When linking dynamically, you link to the .a libraries but include the DLL's with the exutable?

Then, assuming I am using GCC, (MinGW) to link statically I can just not include anything and use the -s libraries instead?

Not sure why I am so bad at this. It is like all my troubleshooting is in the wrong places...hrm. Quite sorry.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: More Problems...
« Reply #11 on: June 13, 2012, 08:22:10 pm »
Many things can be confusing for beginners: the difference between preprocessing, compiling and linking, shared vs static libraries, import libraries vs runtime libraries, what files are and where they should be, etc.

You can live without knowing everything about this stuff, but understanding it really makes a programer's life easier. Once you understand that, everything becomes clearer.
Laurent Gomila - SFML developer

chessguy

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Re: More Problems...
« Reply #12 on: June 15, 2012, 06:59:08 pm »
Preprocessing as in the preprossesor, which is sort of a text editot, as in #define? (or commonly, #include)

I think I get compiling and linking. Compiling it makes object files, (Still not quite certain how those work by themselves, though), and the linkers combines them into the exutable. Import libraries... I thought I had an idea of what a run time library was, but in that case I might not be especially studied on an import library, so not much on either. Shared vs static, most definetly confused how they work. It seems the jist of it is one exutable (static) vs exutable with libraries stroed seperately with it (dynamic, shared, etc)... never knew what a .hpp was either before I saw SFML.

Most people probably could. Generally people get annoyed because I ask to many questions :) unfortunately, I cannot find many sources that go into much detail on most notably dynamic/static libraries, and other similar things. Do you know of a source that provides more detail on the subject?

One thing I still wonder is, HOW programming started. There were high leveled languages.. scripiting languages.. html stuff... machine, assembly, etc. but how did it even understand anything in the first place? Hrm.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: More Problems...
« Reply #13 on: June 15, 2012, 10:29:45 pm »
It's ok if you ask too many questions about SFML. But these questions are too much for me :P
Laurent Gomila - SFML developer

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: More Problems...
« Reply #14 on: June 16, 2012, 01:45:24 am »
Do you know of a source that provides more detail on the subject?
At first you don't need much detail and thus wikipedia will help you a bit. Then use google it's not that hard to find whatevery you desire though google. ;)

One thing I still wonder is, HOW programming started. There were high leveled languages.. scripiting languages.. html stuff... machine, assembly, etc. but how did it even understand anything in the first place? Hrm.
I guess there are a few good introductions etc but to really understand how stuff gets executed on a CPU and how you can program it etc you'll have to learn everything from the beginning. That's what you study in computer science courses. ;)
But you might be surprised how simple the whole thing actually is. The complexity of highlanguages and compilers is probably way complicated than the processor, but once you get to that level of abstraction you can do way more.
If you're really really interested I can provide you this link, where you go from creating your own processor (with simulation programs), over assembly, to higher language to your own tetris run on your own processor with your own high language compiled to your own assembly. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/