username0x0a / eternityplugins

Collection of self-made or modded Miranda IM plugins
0 stars 0 forks source link

FB compilation error in proto.cpp #79

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What product and product version are you using?
svn r80

What steps will reproduce the problem?
1. Checkout svn r80
2. Load facebook.vcproj in VS2010 or VS2005
3. Build project

What is the expected output? What do you see instead?
1>------ Build started: Project: facebook, Configuration: Debug Unicode Win32 
------
1>Performing Pre-Build Event...
1>Compiling...
1>utils.cpp
1>theme.cpp
1>stubs.cpp
1>proto.cpp
1>d:\eternityplugins-read-only\trunk\facebook\proto.cpp(85) : error C2440: '=' 
: cannot convert from 'INT_PTR' to 'HANDLE'
1>        Conversion from integral type to pointer type requires 
reinterpret_cast, C-style cast or function-style cast
1>messages.cpp
1>main.cpp
1>json.cpp
1>http.cpp
1>events.cpp
1>dialogs.cpp
1>contacts.cpp
1>connection.cpp
1>communication.cpp
1>avatars.cpp
1>Generating Code...
1>Build log was saved at 
"file://d:\eternityplugins-read-only\trunk\facebook\Debug Unicode\BuildLog.htm"
1>facebook - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Original issue reported on code.google.com by DeeJayC...@gmail.com on 28 Sep 2010 at 3:16

GoogleCodeExporter commented 9 years ago
I'm using Visual Studio 2005 x86 and don't have such issue. Are you trying to 
make a x64 build?

Original comment by n3weRm0re.ewer on 10 Oct 2010 at 12:04

GoogleCodeExporter commented 9 years ago
No, I first wanted to compile the x86 version as you can see in the first 
output log line. Afterwards, if successful, I want to try a x64 build.

The error is in the following line of code:
hAvatarFolder_ = FoldersRegisterCustomPath(m_szModuleName,"Avatars",
    def_avatar_folder_.c_str());

FoldersRegisterCustomPath returns an INT_PTR while the type of hAvatarFolder_ 
is a HANDLE. Isn't there a cast missing in the code?

Original comment by DeeJayC...@gmail.com on 10 Oct 2010 at 12:30

GoogleCodeExporter commented 9 years ago
@DeeJayChol:
It seems you are using outdated headers

Use the m_folders.h from http://eblis.tla.ro/projects/miranda/Folders/ , 
version 0.1.5.1, it returns an HANDLE:
__inline static HANDLE FoldersRegisterCustomPath(const char *section, const 
char *name, const char *defaultPath)

jarvis, can you please uplioad headers to SVN?
Its a pain to collect them and to take care about their versions

Original comment by wishmaster51 on 10 Oct 2010 at 12:43

GoogleCodeExporter commented 9 years ago
Thank you, now it compiles successfully. In the Miranda svn, they also use two 
different versions for m_folders.h - the one with the INT_PTR in avs, and the 
one with the HANDLE in MSN.

Original comment by DeeJayC...@gmail.com on 10 Oct 2010 at 4:55