Search code examples
pluginsdirectxwinsock2firebreath

FireBreath FB::PluginWindowWin include problem


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


Solution

  • 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.