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

Author Topic: Compilation errors with music.hpp  (Read 2826 times)

0 Members and 1 Guest are viewing this topic.

Fungiy

  • Newbie
  • *
  • Posts: 2
    • View Profile
Compilation errors with music.hpp
« on: June 06, 2019, 11:08:51 am »
Hello!

I am trying to install SFML into my already existing old SFML project. However, after following the tutorial I received these compiler errors after build:

'{': no matching token found -> line 49

syntax error: ')' -> line 75

syntax error: 'constant' -> line 75

syntax error: missing ';' before 'constant' -> line 75

unexpected token (s) preceding ':'; skipping apparent function body -> line 75

All errors come from the music.hpp file.

I already tried all 3 different versions of SFML. vs12 vs14 and vs15. 32 bit for all.

I'm running windows10 as my os

If anyone had similar problems I would love to know! Thanks!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Compilation errors with music.hpp
« Reply #1 on: June 06, 2019, 11:33:51 am »
Hi

Does a cpp file containing just this, produces the errors?
#include <SFML/Audio/Music.hpp>

If so, you'll have to tell us in details what you did to install SFML. If not, then please provide a complete and minimal code that reproduces the problem.
Laurent Gomila - SFML developer

Fungiy

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Compilation errors with music.hpp
« Reply #2 on: June 07, 2019, 01:24:32 am »
Thanks for the reply.

I did not find an instance in my code where I included that file specifically.
I included Audio.hpp however.

I attached a couple of screenshots of my setup. Can you tell me if I installed it correctly?

I did include the SFML_STATIC; macro

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Compilation errors with music.hpp
« Reply #3 on: June 07, 2019, 08:05:42 am »
Please answer the questions instead of posting tons of irrelevant details ;)

Quote
Does a cpp file containing just this, produces the errors?
#include <SFML/Audio/Music.hpp>
That meant: try it!

And then, depending on the result (compiles or not):
Quote
If so, you'll have to tell us in details what you did to install SFML. If not, then please provide a complete and minimal code that reproduces the problem.
Laurent Gomila - SFML developer

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10801
    • View Profile
    • development blog
    • Email
Re: Compilation errors with music.hpp
« Reply #4 on: June 07, 2019, 08:35:00 am »
Probably not causing any issues, but do you really need to link SFML and SDL at the same time.
Also if you link SFML statically, you have to link SFML's dependencies as well.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything