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

Author Topic: Static Audio Linker errors  (Read 5216 times)

0 Members and 1 Guest are viewing this topic.

Tim0n

  • Newbie
  • *
  • Posts: 5
    • View Profile
Static Audio Linker errors
« on: June 14, 2014, 05:55:37 pm »
Hello I'm trying to build a static project but I believe that I have included both the SFML_STATIC and sfml-audio-s.lib correctly (it is working when I'm not using sf::sound or sf::soundbuffer) but when I try to run it with sound it gives me alot of linker errors (see below) I'm using SFML 2.1 and Visual Studios 2013 and this template: http://en.sfml-dev.org/forums/index.php?topic=13010.0

Release static:
(click to show/hide)

Debug Static:
(click to show/hide)

Does anyone know what I am doing wrong? I've read somewhere that linking has changed in SFML 2.1 but haven't found what it changed to.

I also have another bug, when I'm trying to exit my normal release and debug versions I get "Unhandled exception at 0x7719A4B9 (ole32.dll) in Pong.exe: 0xC0000005: Access violation reading location 0xFEEEFEEE." Does anyone know how to solve this as well?

I hope I have given enough information but am prepared to give more in case I've missed something.

Thanks!

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10998
    • View Profile
    • development blog
    • Email
Re: Static Audio Linker errors
« Reply #1 on: June 14, 2014, 06:24:12 pm »
You can find some information about static linking past SFML 2.1 on the wiki. Meaning you have to link all the dependencies.

Are you by chance tim0n who made a Firefall hack? :P
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Tim0n

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Static Audio Linker errors
« Reply #2 on: June 14, 2014, 06:46:12 pm »
You can find some information about static linking past SFML 2.1 on the wiki. Meaning you have to link all the dependencies.

Are you by chance tim0n who made a Firefall hack? :P

Oh thank you for that! It seems to work now, however I'm getting a new error "LINK : fatal error LNK1104: cannot open file 'sfml-system.lib'" do you by any chance know what the problem might be here?

I added this to my code:

#pragma comment(lib, "openal32.lib")
#pragma comment(lib, "sndfile.lib")
#pragma comment(lib, "sfml-system.lib")

And I'm unfortunately not that Tim0n, we just happen to use the same name, I began using Tim0n back in 2009 so it's not because I'm some kind of "wannabe" ;)

Edit: Idiot question, I shouldn't have included sfml-system.lib because I've already included it, so now debug static is working, but my release static says "1>LINK : fatal error LNK1181: cannot open input file 'sfml-graphics-s.lib'" Which is weird, because I have used release static before.
« Last Edit: June 14, 2014, 07:02:33 pm by Tim0n »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10998
    • View Profile
    • development blog
    • Email
Re: Static Audio Linker errors
« Reply #3 on: June 14, 2014, 09:47:49 pm »
"Cannot open" basically means it can't be found. So make sure you provide the path to where all the lib files are.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Tim0n

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Static Audio Linker errors
« Reply #4 on: June 15, 2014, 12:58:36 pm »
"Cannot open" basically means it can't be found. So make sure you provide the path to where all the lib files are.

Okay I readded everything and now it's working perfectly thank you for your help! It has been much appreciated!