Two problems compiling an FLHook plugin
-
I decided I wanted to try making FLHook plugins, so I thought I’d begin by making a simple /rules command. Should be simple, right? Took a copy of the condata plugin and replaced it’s Main.cpp file.
At the moment, it doesn’t send the actual rules, but ‘test’. I’ll change that when this works.
I’ve been having trouble getting VC++2010 express to actually compile it into a .dll file. No matter what I tried, it never outputted a .dll file, and the log always said this:
1>–---- Build started: Project: Condata Plugin, Configuration: Release Win32 ------
1> Main.cpp
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========So I sent it to a friend who has VC++2010 pro, and it compiled fine for him once he changed the FLHook.h and plugin.h to the location of his copies of the files. He sent the file back, and I tried to load it up.
Error, could not load plugin: rules.dll (rules.ini)
So now I’m kinda lost. Any ideas?
Edit: Apparently he built the plugin in VC9.
-
There are a lot of horrible issues with Hook plugin compatibility.
Essentially, if you want to build plugins for 1.6.0, stick to VS2005. If you want to build for 1.6.1, rebuild the project in VS2008 and then compile the plugins with it too.
The problem is that often there are small but important changes between compiler versions which make them incompatible for dynamic DLL loading, like what FLHook does. You may be able to bypass that, but I personally never managed to do it.
You also need to look at what compiler options were used for FLHook and copy them. Some of them are unimportant, but others, especially things related to charsets, are.
-
http://download.microsoft.com/download/8/3/a/83aad8f9-38ba-4503-b3cd-ba28c360c27b/ENU/vcsetup.exe
I got all the professional versions (2k3/2k5/2k8/2k10) for free, thanks to my being a student
Only one I had to buy was VS6 Pro, but that’s cheap as hell now it’s so old.
-
Download Win SDK for 2008 server for example
Check path to libraries and includes