why i can't use ByteArray?

Post here your questions about the C++ API for SFS2X

Moderators: Lapo, Bax, MBagnati

bqlf1907
Posts: 25
Joined: 13 May 2013, 10:28

why i can't use ByteArray?

Postby bqlf1907 » 15 May 2013, 14:51

Code: Select all

ByteArray* pByteArray = new ByteArray();


i use ByteArray Compile error。(use in SFS2X_Cpp_Examples too).
error LNK2019: Unresolved external symbol "public: __thiscall Sfs2X::Util::ByteArray::ByteArray(void)" (??0ByteArray@Util@Sfs2X@@QAE@XZ),The symbol in the function "public: void __thiscall ClientDelegate::sendLoginMasterServerPP(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,char *,int)" (?sendLoginMasterServerPP@ClientDelegate@@QAEXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0PADH@Z) Is referenced

win7 + VS2010 + API 0.9.5
User avatar
Bax
Site Admin
Posts: 4395
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: why i can't use ByteArray?

Postby Bax » 16 May 2013, 08:12

This will be fix in the next release, due in couple of weeks.
If you have an urgent need, you can make the change yourself. Open the /util/ByteArray.h file and make the following changes:
1) change the class declaration from class ByteArray to class DLLImportExport ByteArray
2) add #include "../Util/Common.h" before the other includes
Paolo Bax
The SmartFoxServer Team
bqlf1907
Posts: 25
Joined: 13 May 2013, 10:28

Re: why i can't use ByteArray?

Postby bqlf1907 » 17 May 2013, 03:13

thanks, it's work now.
MBagnati
Posts: 125
Joined: 12 Feb 2013, 10:57

Re: why i can't use ByteArray?

Postby MBagnati » 11 Jun 2013, 09:09

Fix is contained into API version 0.9.6

Return to “SFS2X C++ API”

Who is online

Users browsing this forum: No registered users and 1 guest