Jump to content

Recommended Posts

  • Premium

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?

 

  • Love 1
Link to comment
Share on other sites

  • Premium
3 hours ago, TheGameDeveloper said:

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

  • 1 year later...
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:

IRcd1CQ.jpg

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 by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

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

  • 2 months later...
  • Honorable Member

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; }

 

  • Love 1

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.