Jebbs / DSFML-C

The back end for DSFML
4 stars 3 forks source link

Issue building with Visual Studio 2015 #16

Closed odensc closed 9 years ago

odensc commented 9 years ago

I am using Visual Studio 2015 on Windows 8.1 32-bit, trying to build the DSFML libraries. I am getting a lot of errors like:

c:\users\ieuser\documents\dsfml-c\src\dsfml\network\http.cpp(114) : error C4716:
 'sfHttpResponse_getMajorVersion': must return a value
c:\users\ieuser\documents\dsfml-c\src\dsfml\network\http.cpp(121) : error C4716:
 'sfHttpResponse_getMinorVersion': must return a value

in various files in network, graphics, etc. The only libraries that build correctly are system and window. It seems those methods are missing a return. For some reason, the exact same source builds fine on Linux.

Jebbs commented 9 years ago

Try this repository. It's the one I'm currently pushing to.

https://github.com/Jebbs/DSFMLC

It goes along with this branch of the binding.

https://github.com/Jebbs/DSFML/tree/2.1-rc

Jebbs commented 9 years ago

Some names of libs produced are a little different, but it's mostly the same. Let me know if you need any help. Actual docs are being worked on. :P

odensc commented 9 years ago

That fixes up the return value errors, now I'm getting this error:

[ 85%] Linking CXX shared library ..\..\..\lib\dsfmlc-graphics-2.dll
   Creating library ..\..\..\lib\dsfmlc-graphics.lib and object ..\..\..\lib\dsf
mlc-graphics.exp
freetype.lib(bdf.obj) : error LNK2019: unresolved external symbol _sprintf refer
enced in function __bdf_parse_properties
jpeg.lib(jerror.obj) : error LNK2001: unresolved external symbol _sprintf
jpeg.lib(jerror.obj) : error LNK2019: unresolved external symbol _fprintf refere
nced in function _output_message
jpeg.lib(jerror.obj) : error LNK2019: unresolved external symbol ___iob_func ref
erenced in function _output_message
jpeg.lib(jmemmgr.obj) : error LNK2019: unresolved external symbol _sscanf refere
nced in function _jinit_memory_mgr
..\..\..\lib\dsfmlc-graphics-2.dll : fatal error LNK1120: 4 unresolved externals

LINK failed. with 1120
NMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe"' : return cod
e '0xffffffff'

It doesn't seem like its linking freetype and jpeg correctly?

odensc commented 9 years ago

I found this. After replacing the binaries in extlibs/libs-msvc/x86 with the ones included in that zip file, it now builds. Yay! :+1:

Jebbs commented 9 years ago

Awesome. I will make a note of that. Glad you got it working!