Open dmitryuck opened 5 years ago
I get link problems with macOS (10.13.6), ~master (2.4):
Like: Undefined symbols for architecture x86_64: "_sfFont_getTexture", referenced from: __D5dsfml8graphics4font4Font10getTextureMFkZxCQBrQBo7texture7Texture in libdsfml_graphics.a(font_182_197.o)
My env Windows 10 (x64) mingw32-make, MinGW Makefiles dub, dmd, ldc2
also tried with Visual Studio 2017 compilers (nmake, NMake Files)
I compiled build.exe util from this repository (latest version), copied SFML (include content) to SFML folder and building the libraries. build passed ok, I've got dsfml-window.lib, dsfml-system.lib and others in lib folder.
The problem when I build my project using these libraries. The problem in linking:
lld-link: error:: undefined symbol: sfErr_redirect
lld-link: error: : undefined symbol: sfFont_getTexture
lld-link: error: : undefined symbol: sfFont_getUnderlineThickness
lld-link: error: : undefined symbol: sfFont_getUnderlinePosition
lld-link: error: : undefined symbol: sfFont_getLineSpacing
lld-link: error: : undefined symbol: sfFont_getKerning
lld-link: error: : undefined symbol: sfFont_getGlyph
lld-link: error: : undefined symbol: sfFont_destroy
lld-link: error: : undefined symbol: sfFont_copy
lld-link: error: : undefined symbol: sfFont_loadFromStream
lld-link: error: : undefined symbol: sfFont_loadFromMemory
lld-link: error: : undefined symbol: sfFont_loadFromFile
lld-link: error: : undefined symbol: sfFont_construct
lld-link: error: : undefined symbol: sfImage_flipVertically
lld-link: error: : undefined symbol: sfImage_flipHorizontally
lld-link: error: : undefined symbol: sfImage_getSize
lld-link: error: : undefined symbol: sfImage_getPixelsPtr
lld-link: error: : undefined symbol: sfImage_getPixel
lld-link: error: : undefined symbol: sfImage_setPixel
my dub.json file next:
"sourcePaths": [ "src" ], "importPaths": [ "src", "bin" ], "targetPath": "bin", "version": "1.0.0", "configurations": [ { "targetType": "executable", "name": "default", "mainSourceFile": "src/main.d" } ], "dependencies": {}, "libs": [ "lib/dsfml-system", "lib/dsfml-graphics", "lib/dsfml-audio", "lib/dsfml-window", "lib/dsfml-network" ]
What am I doing wrong?
I opened dsfml-system.lib file, and found 1.txt file there, it contains the line:
src\DSFMLC\System\CMakeFiles\dsfmlc-system.dir\Err.cpp.obj _sfErr_redirect
but when linking it's looking for the:
lld-link: error:: undefined symbol: sfErr_redirect
without a _ symbol on the beginning