Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile error #16

Open
a-ahmed opened this issue Oct 27, 2020 · 2 comments
Open

compile error #16

a-ahmed opened this issue Oct 27, 2020 · 2 comments

Comments

@a-ahmed
Copy link

a-ahmed commented Oct 27, 2020

I got the following error when compiling

Error LNK2019 unresolved external symbol "__declspec(dllimport) public: __thiscall sf::String::String(char const *,class std::locale const &)" (_imp??0String@sf@@QAE@PBDABVlocale@std@@@z) referenced in function "public: void __thiscall Overlay::createWindow(void)" (?createWindow@Overlay@@QAEXXZ)

you can also check the screenshot

https://imgur.com/IAHqTOR

@atiksoftware
Copy link
Owner

bro as far as i remember,
you not linked sfml library as successfuly

be care about Release or Debug mod, and care for x86 and x64
choose true sfml library version,

download 32Bit version if you compile for x86(32bit), or download 64bit from sfml offical website.
and add libs for relase/debug mod
ex for debug: sfml-window-d.lib
ex for release: sfml-window.lib

steps :
https://prnt.sc/v7imzg

https://prnt.sc/v7inff
SFML_STATIC for static library. its mean: sfml libs put in your exe or dll. you will not need sfml .dll files next times. thats already embeded in your compiled app
(but its make little slow compiling. if you not want use static libs, dont add SFML_STATIC and dont add ...-s.. libs)

https://prnt.sc/v7iole
add lib folder to additional libs

https://prnt.sc/v7ip22
links example

opengl32.lib
openal32.lib
freetype.lib
winmm.lib
gdi32.lib
flac.lib
vorbisenc.lib
vorbisfile.lib
vorbis.lib
ogg.lib
ws2_32.lib
sfml-graphics-s.lib
sfml-window-s.lib
sfml-system-s.lib

sfml-system -{static library} -{debug mod}
sfml-system-s-d.lib : its mean static library for debug mod
you can add ...-s.lib for release mod

but importantly be sure for 32 or 64 bit versions

Not : i was get crash error if i use audio library and audio effect for injectable dll file.
actualy i dont know why, I did not research about it.

@a-ahmed
Copy link
Author

a-ahmed commented Oct 27, 2020

thank you so much, I solved it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants