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

Author Topic: Trying to build with VS2015  (Read 9874 times)

0 Members and 1 Guest are viewing this topic.

deaddodo

  • Newbie
  • *
  • Posts: 3
    • View Profile
Trying to build with VS2015
« on: February 14, 2015, 08:36:03 am »
I'm having issues building with VS2015. I'm using cmake to generate a VS2015 Solution and then building that, which seems to work fine with all of the modules except sfml-graphics. Each time it tries to build sfml-graphics, it fails with the following errors:

1>     Creating library C:/Users/Jeff/Desktop/SFML-2.2/build/lib/Debug/sfml-graphics-d.lib and object C:/Users/Jeff/Desktop/SFML-2.2/build/lib/Debug/sfml-graphics-d.exp
1>freetype.lib(bdf.obj) : error LNK2019: unresolved external symbol sprintf referenced in function _bdf_parse_properties
1>jpeg.lib(jerror.obj) : error LNK2001: unresolved external symbol sprintf
1>jpeg.lib(jerror.obj) : error LNK2019: unresolved external symbol fprintf referenced in function output_message
1>jpeg.lib(jerror.obj) : error LNK2019: unresolved external symbol __iob_func referenced in function output_message
1>jpeg.lib(jmemmgr.obj) : error LNK2019: unresolved external symbol sscanf referenced in function jinit_memory_mgr
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib\amd64\OLDNAMES.lib : warning LNK4272: library machine type 'UNKNOWN' conflicts with target machine type 'x64'
1>C:\Users\Jeff\Desktop\SFML-2.2\build\lib\Debug\sfml-graphics-d-2.dll : fatal error LNK1120: 4 unresolved externals
 

I've generated and built this with the x86 and x64 library options (and confirmed that cmake was pointing to the proper locations) and the exact same issue occurs for both. It looks like, for whatever reason, the linking to cstdio is failing?

Any help would be appreciated since my VS compiler/linker knowledge is lackluster, at best.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
AW: Re: Trying to build with VS2015
« Reply #1 on: February 14, 2015, 10:39:02 am »
Any help would be appreciated since my VS compiler/linker knowledge is lackluster, at best.
If you have a lack of knowledge, why do you use preview/beta software?

If you had searched the forum, you'd have found the other thread(s) stating that you have to recompile some of SFML's dependencies.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Gambit

  • Sr. Member
  • ****
  • Posts: 283
    • View Profile
Re: Trying to build with VS2015
« Reply #2 on: February 14, 2015, 07:57:59 pm »
Just a side note - Visual Studio 2015 is a preview/beta as eXpl0it3r said. Because of this, there is generally no official support for it (Be it SFML, Qt, SDL, etc). Also I agree with eXpl0it3r. Use the tutorials and learn how to set it up with supported IDEs before you use unsupported ones (Common sense?).

deaddodo

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Trying to build with VS2015
« Reply #3 on: February 14, 2015, 09:40:47 pm »
Quote
why do you use preview/beta software?

I built the software being compiled with clang/llvm which includes certain c++11 features. These features are better supported by VS2015, so this was an attempt to test those.

Getting SFML to work with VS2013 is trivial.

Quote
If you had searched the forum, you'd have found the other thread(s) stating that you have to recompile some of SFML's dependencies.

I had attempted to search and found nothing directly pertinent, perhaps you can provide the link?

I had already attempted to rebuild both libjpeg and libfreetype previous to posting and statically linking against those, however this presented a whole slew of it's own issues...perhaps due to version differences (libfreetype alone, for example, has three levels of supported API at this point...freetype1, freetype2 and freetype6. building against the most recent freetype source spat out quite a few code-based errors).

I can dig through and diagnose these issues and possibly get it working. But the whole point of a community is to leverage knowledge or experience such as this, in case someone's already figured this out.

Quote
there is generally no official support for it

I'm asking a question on a forum, in case someone else has had similar issues, that's about the least official you can get.

Quote
Use the tutorials and learn how to set it up with supported IDEs before you use unsupported ones (Common sense?).

I'm quite well versed in SFML and have gotten it to work previously on multiple OSes and build chains. I was asking for support on a specific IDE that I have less experience with.

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Re: Trying to build with VS2015
« Reply #4 on: February 14, 2015, 11:07:26 pm »
Most of the Visual Studios should be the same on how you set things up to build SFML and other things unless something drastic has changed.

Try compiling for a lesser version of VS first than go for the better one. :)
I have many ideas but need the help of others to find way to make use of them.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: Trying to build with VS2015
« Reply #5 on: February 15, 2015, 12:46:47 am »
Most of the Visual Studios should be the same on how you set things up to build SFML and other things unless something drastic has changed.

Try compiling for a lesser version of VS first than go for the better one. :)
Reading of what has already been said would also show you, that everything you wrote has either already been answered or said, but it's not like the first time you do this...

I had attempted to search and found nothing directly pertinent, perhaps you can provide the link?
It's something that I'll never understand. Searching is so easy and yet tons and tons of people fail at it.



First and forth entry are the ones that I had in mind... ::)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/