Compiling FLHook
-
Apologies for the late response, but I just tested my old setup (VC 2003 Toolkit + Windows 2003 Platform SDK + Code::Blocks) on Windows 7 and it works fine after a few configuration tweaks.
How-to:
1. Download and install the Visual C++ Toolkit 2003.
2. Download and install the Windows Server 2003 Platform SDK.
2. Download and install Code::Blocks. Code::Blocks should automatically detect the toolkit compiler.
3. Import the Visual Studio solution file. This can be done by opening File|Import project|MS Visual Studio solution and selecting the file in the project-vc7 directory.
4. Try compiling FLHook. This didn’t work for me the first time, as the search directories for the compiler weren’t set up properly (it couldn’t find windows.h). If this is the case, add the Windows Server 2003 Platform SDK include and lib directories to the Compiler and Linker search directories respectively. This can be done in the Settings|Compiler and debugger dialog.
I next had linker issues, which were related to not having the correct libraries specified in the linker settings. Right-click on the FLHook project and select Build options. Switch to the Linker settings tab. In the Link libraries list you should see some …/source/libs/ entries. Add a .lib to the end of those entries. Finally, add shell32 and user32 to the list. When you’re done it should look like this.
5. Compile FLHook. It should all work now, though there will probably be some warnings. I was able to get rid of the linker warnings by removing /debug from the Other linker options. It also didn’t specify any compiler optimization for the release build - you’ll probably want Maximize speed (/O2) on. -
Hey thanks for the answer! I am currently trying to get the Server SDK to work, don’t seem to have much success though as the 64 bit version complains about my windows version whereas the 32 bit version complains about a “non-native or WoW environment” I’ll keep searching for solutions but there’s little chance I guess.
EDIT: The PSDK-amd64.exe seems to work although I have got an Intel CPU……
-
Huh, I used the SDK files straight from my XP partition, I’ll have to test actually installing it. Also, the PSDK-amd64.exe is just the 64 bit version of the SDK as far as I know; the amd is there just because the first 64 bit x86 processors were made by AMD.
-
Alright, did the same things you did but still using vs2010, however I now ran into this:
cl : Command line warning D4024: unrecognized source file type ‘ÿþ/’, object file assumed
and this:
LINK : fatal error LNK1181: cannot open input file ’ ■/.obj’
Seems pretty weird as I’m sure I don’t have a ■/.obj
-
Using CodeBlocks, I get this:
LINK||fatal error LNK1181: cannot open input file ‘…/source/libs/server.obj’|
||=== Build finished: 1 errors, 0 warnings ===|.lib includes are set up the same way as in the image posted by M0tah previously in this post.
-
Sounds like there’s something wrong with your paths then - make sure the path to the libs relative to the project files is correct. For example, if the Code::Blocks project is in src instead of a subdirectory you’ll need to adjust the paths to be ./source/libs/ *.lib (remove the leading .).
-
Hello there… M0tah (and community).
I was going to make a new post in starport, actually my first, but found this one and thought it fitted.
I currently have M0tah’s 1.6.7 FLHook code… I was planning to do big upgrade for FLHook actually (I just played up to now and I thought it would be fair to give something back to the community) but faced some issues, so I changed the plan to do something more simple and have been simplifying the approche up to the point of simply capturing FLHook process to feed TO and FROM it, but still faced a new issue.
Basically all my issues have been related to one thing only… and that is not being able to compile the code. I know this is not a code issue for sure so I was wondring if I could get help understanding what am I lacking.First of all, and before I ask anyting help on that… no one happends to have a c++.NET version project arround, don’t you?
Thanks and best regards,
-
M0tah wrote:
Sounds like there’s something wrong with your paths then - make sure the path to the libs relative to the project files is correct. For example, if the Code::Blocks project is in src instead of a subdirectory you’ll need to adjust the paths to be ./source/libs/ *.lib (remove the leading .).There is no server.obj anywhere
-
I was fool like Pinocchio
From folder project-vc9 of http://svn.the-starport.net/flhookplugin FLHook compiles like a charm with VS2008 C++ Express
Thx, Cannon!
-
Hello everyone,
I also have problems using FLHook 1.6.7.The fact is that the compilation works perfectly under MSVC++ Express 2007 | 2010 (Only got security warnings).
But the problem comes when I try to run FLHook, I think I’ve done everything good, but it doesn’t launch. Only FLServer runs…
The weirds thing, is that when I launch FLServer, and then FLHookStart, it tolds me that flserver.exe is not runningSo, is there a trick to solve that ?
(I didn’t succeed to compile FLHook under Code::Blocks, there were too many errors)Thanks
-
Tried M0tah’s instructions, got this.
–------------ Build: Debug Win32 in FLHook ---------------
cl : Command line error D2004 : ‘/W’ requires an argument
Process terminated with status 2 (0 minutes, 0 seconds)
0 errors, 0 warningsNo idea what went wrong.
-
Thanks. That’s one error down, one new one.
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\Windows.h|157|fatal error C1083: Cannot open include file: ‘excpt.h’: No such file or directory|
||=== Build finished: 1 errors, 0 warnings ===|