Premium Crystal™ 25 Posted October 28, 2017 Premium Share Posted October 28, 2017 I upgraded vs version to my source ,after cryptopp and libjpeg and i had some errors like this Spoiler Error C2872 'data': ambiguous symbol eterlib D:\DEV\METIN2CLIENT\Launcher 4 Inventare\Metin2Client\EterLib\JpegFile.cpp 216 so i changed jpegfile.cpp & .h with a fixed version and i am getting now like these Spoiler Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol "public: void __thiscall SpherePack::LostChild(class SpherePack *)" (?LostChild@SpherePack@@QAEXPAV1@@Z) referenced in function "public: void __thiscall SpherePack::Unlink(void)" (?Unlink@SpherePack@@QAEXXZ) UserInterface C:\Users\User\Desktop\work\Binary [source]32323\UserInterface\eterlib.lib(GrpObjectInstance.obj) 1 Error LNK2019 unresolved external symbol ___iob_func referenced in function _output_message UserInterface C:\Users\User\Desktop\work\Binary [source]32323\UserInterface\libjpeg-9aMT.lib(jerror.obj) 1 Error LNK1120 2 unresolved externals UserInterface C:\Users\User\Desktop\work\Binary [source]32323\bin\metin2client.exe 1 Do anyone can help me? 1 Link to comment Share on other sites More sharing options...
Justin 3 Posted October 28, 2017 Share Posted October 28, 2017 (edited) Edited August 24, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
TheGameDeveloper 55 Posted October 28, 2017 Share Posted October 28, 2017 https://metin2dev.org/board/index.php?/topic/12179-visual-studio-2008-2015/ Link to comment Share on other sites More sharing options...
Premium Crystal™ 25 Posted October 28, 2017 Author Premium Share Posted October 28, 2017 (edited) 2 hours ago, Justin said: The path is not the problem i just changed it Edited August 24, 2022 by Metin2 Dev Core X - External 2 Internal 2 Link to comment Share on other sites More sharing options...
Premium Crystal™ 25 Posted October 28, 2017 Author Premium Share Posted October 28, 2017 3 hours ago, TheGameDeveloper said: https://metin2dev.org/board/index.php?/topic/12179-visual-studio-2008-2015/ now i get these errors Spoiler Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol ___iob_func referenced in function _output_message UserInterface C:\Users\User\Desktop\work\Binary [source]32323\UserInterface\libjpeg-9aMT.lib(jerror.obj) 1 Error LNK1120 1 unresolved externals UserInterface C:\Users\User\Desktop\work\Binary [source]32323\bin\metin2client.exe 1 Link to comment Share on other sites More sharing options...
Premium Crystal™ 25 Posted October 28, 2017 Author Premium Share Posted October 28, 2017 #fixed Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 188 Posted December 17, 2018 Active Member Share Posted December 17, 2018 How did you fix it? Same problem here. Link to comment Share on other sites More sharing options...
Bot Metin2 Dev 4884 Posted December 17, 2018 Bot Share Posted December 17, 2018 Use LibJpeg-Turbo, it is much better.https://libjpeg-turbo.org/ 1 2 Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 188 Posted December 17, 2018 Active Member Share Posted December 17, 2018 56 minutes ago, Chyu ^^ said: Use LibJpeg-Turbo, it is much better.https://libjpeg-turbo.org/ Is the error gonna go away? Link to comment Share on other sites More sharing options...
Premium Jira 458 Posted December 17, 2018 Premium Share Posted December 17, 2018 2 hours ago, Mind Rapist said: How did you fix it? Same problem here. Run time library (MT & MTd) 1 Link to comment Share on other sites More sharing options...
Bot Metin2 Dev 4884 Posted December 18, 2018 Bot Share Posted December 18, 2018 12 hours ago, Mind Rapist said: Is the error gonna go away? Depends on configuration you will use. Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 188 Posted December 18, 2018 Active Member Share Posted December 18, 2018 (edited) 15 hours ago, Moț said: Run time library (MT & MTd) Can you please give some more details? I have no idea what to do here. My exact errors are these: Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 188 Posted December 20, 2018 Active Member Share Posted December 20, 2018 (edited) On 12/18/2018 at 6:01 PM, arves100 said: If you are compiling your client in /MT (type of C++ runtime), switch to /MD or build libjpeg-turbo with /MT flag (rather than /MD). Second fix faster to do but it's not really reccomanded, add this to UserInterface.cpp: #pragma comment(linker, "/NODEFAULTLIB: MSVCRT.lib") #pragma comment(linker, "/NODEFAULTLIB: MSVCRTD.lib"). For anyone having this error, please rebuild libjpeg or libjpeg-turbo with the toolset you're using, this fix everything. Thanks for the insight, @arves100. What I did in the first place was following your tutorial: so the problem seems to be at libjpeg-9c. After seeing your response I edited the CFLAGS of makefile.vc and I added -MT at the end just to be sure about the runtime. The libs were generated even tho I had an error in the end saying "cannot open file 'rdjpgcom.exe'" I tried to fix it by downloading it and pasting it into the folder (didn't work) but anw the libs were created so I copied them into the Extern folder and started compiling. The result was the same as my image. I also tried the 2nd solution you mentioned. The result was: Conclusion: C++ Runtime might not be as big of a deal as we thought. I'm suspecting the rdjpgcom.exe error has something to do with it but I'm not sure... Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 188 Posted December 20, 2018 Active Member Share Posted December 20, 2018 4 hours ago, arves100 said: If it builded libjpeg.lib you don't have to worry, about that you can also add it to the Visual studio project under "Ignore default libraries" you put MSVCRT.lib and MSVCRTD.lib OMG! That was it finally after a week I compiled the client! Thanks for everything @arves100 man you've helped me more than you realise Link to comment Share on other sites More sharing options...
Honorable Member Mali 41874 Posted March 17, 2019 Honorable Member Share Posted March 17, 2019 this works for me UserInterface.cpp find #include "WiseLogicXTrap.h" add //via https://stackoverflow.com/questions/30412951/unresolved-external-symbol-imp-fprintf-and-imp-iob-func-sdl2 #define stdin (__acrt_iob_func(0)) #define stdout (__acrt_iob_func(1)) #define stderr (__acrt_iob_func(2)) FILE _iob[] = { *stdin, *stdout, *stderr }; extern "C" FILE * __cdecl __iob_func(void) { return _iob; } 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now