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

Author Topic: static GUI library statically linking SFML  (Read 2774 times)

0 Members and 1 Guest are viewing this topic.

kennyrkun

  • Newbie
  • *
  • Posts: 9
  • a pretty mediocre programmer
    • View Profile
    • mehsowb
static GUI library statically linking SFML
« on: May 26, 2018, 07:24:15 am »
I'm writing a basic GUI system using SFML. It links SFML statically into it, and the lib itself is meant to be statically linked. Apparently this is bad, but I'm not sure how.

LNK4006 _vorbis_encode_init already defined in vorbisenc.lib(vorbisenc.obj); second definition ignored  SFUI    P:\aRepositories\SFUI\SFUI\vorbis.lib(vorbisenc.obj)

I am still able to link this library into main applications, and it works fine. But I don't like these warnings and I'd like to know if there's anything I can do to get rid of them, of there's a proper way to do what I'm wanting to do. The idea is that the main application ships with no extra dlls or installers.

 ;)
it's probably terrible.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: static GUI library statically linking SFML
« Reply #1 on: May 26, 2018, 09:09:04 am »
What's your verbose build command? Sounds to me you're double linking stuff.

https://www.sfml-dev.org/faq.php#tr-grl-verbose-ide
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

kennyrkun

  • Newbie
  • *
  • Posts: 9
  • a pretty mediocre programmer
    • View Profile
    • mehsowb
it's probably terrible.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: static GUI library statically linking SFML
« Reply #3 on: May 27, 2018, 11:50:26 am »
Did you raise the warning levels? Never seen these warnings otherwise. I mean there are even some warnings for system libs. In the end those are just warnings that can be ignored.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

kennyrkun

  • Newbie
  • *
  • Posts: 9
  • a pretty mediocre programmer
    • View Profile
    • mehsowb
Re: static GUI library statically linking SFML
« Reply #4 on: May 27, 2018, 10:27:24 pm »
Yes, I use W4 level for my release builds.
it's probably terrible.

dabbertorres

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • website/blog
Re: static GUI library statically linking SFML
« Reply #5 on: May 29, 2018, 11:21:52 pm »
If SFML is statically linked to its dependencies, then your SFUI library shouldn't need to link in SFML's dependencies.

(I'm looking at line 114 of your pastebin - your SFUI lib is linking SFML static libs AND its dependencies)

 

anything