FireBreath FB::PluginWindowWin include problem

痴心易碎 提交于 2019-12-12 05:42:52

问题


I tried to follow the steps in the answer of Directx control in browser plugin

but when I added the solution mentioned in http://colonelpanic.net/2010/11/firebreath-tips-drawing-on-windows/ FireBreath Tips: Drawing on Windows

"1.Make your plugin object windows specific

change the type of the event source specified in EVENTTYPE_CASE to FB::PluginWindowWin (as well as the type in the handlers) and you will have your object cast in the way you need it."

I got 119 errors, all are in winsock2.h file, which I included in other file, saying redefinition, different linkage. what to do?

Thanks, Sara


回答1:


did you add the #include "Win/PluginWindowWin.h"?

another thing that can help that is #include "win_common.h" early in the file. The include order of certain windows headers and winsock matters, so that can cause this issue if they get out of order.




回答2:


This is a general problem occures when one tries to include windows.h and winsock2.h.

windows.h includes winsock.h itself, therefore, if you include winsock2.h after it, several redefinition conflicts arise.

Solution: include "winsock2.h" first.



来源:https://stackoverflow.com/questions/6109545/firebreath-fbpluginwindowwin-include-problem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!