Raised This Month: $32 Target: $400
 8% 

Need some tips or help for compiling Metamod Win32 Addon


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RoboCop
AlliedModders Donor
Join Date: Dec 2010
Location: Dundee, Scotland
Old 08-13-2016 , 10:19   Need some tips or help for compiling Metamod Win32 Addon
Reply With Quote #1

Hello I'm trying to fix and recompile Foxbot Metamod Win32 build for TFC using VS 2015 but it appears to be given me 'LNK2001' Linker errors for some reason. So I tried the alternative compiler, Codelite - powered by MinGW - to Compare and Contrast the results after a few essential tweaks and adjustments it appears to compile fine but Metamod v1.21.1-am fails to load FoxBot with this log:

Code:
L 08/12/2016 - 22:31:55: [META] ERROR: dll: Failed query plugin '<foxbot_mm.dll>'; Couldn't open file 'c:/program files (x86)/steam/steamapps/common/half-life/tfc/addons/foxbot/foxbot_mm.dll': The specified module could not be found.
To cut a long story short, it maybe something to do with -Xlinker and -shared flags that is required for MinGW. Or it maybe caused by the '#define EXPORT _declspec( dllexport ) marco redefinition' warning message. But I am starting to run out of ideas and which linker options and settings are equivalent for VS 2015 compared to those 2 corresponding flags.

Plus I even tried to compile this Win32 build on VC++ 6.0 but gave me the same 'LNK2001' errors

As for the VS 2015 project for the latest Foxbot found in the Src zip it appears that Zybby from Omni-bot, who worked on upgrading Foxbot left a bit of a mess in the .vcproj file. Where he missed out a few important .cpp source files required for the compile build and only used Borland for Win32 compiling instead. I've never tried Borland before and therefore need to learn how to use it.

I am a bit of a C/C++ amateur but do any of you folks know?
__________________
vBulletin Webmaster Since 2001
Bots-United Webmaster and Botmaster

Last edited by RoboCop; 08-13-2016 at 10:21.
RoboCop is offline
Send a message via Skype™ to RoboCop
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-13-2016 , 12:54   Re: Need some tips or help for compiling Metamod Win32 Addon
Reply With Quote #2

well, "The specified module could not be found" implies the file doesn't exist.
__________________
Arkshine is offline
RoboCop
AlliedModders Donor
Join Date: Dec 2010
Location: Dundee, Scotland
Old 08-13-2016 , 14:30   Re: Need some tips or help for compiling Metamod Win32 Addon
Reply With Quote #3

Well this 'file not exist' error should exist as I put 'win32 addons\foxbot\foxbot_mm.dll' in addons\metamod\plugins.ini file from where it is actually located...but Metamod can't find it? Doesn't make any sense. Also the Linux version runs quite well using the same src codes, HLSDK and Metamod src codes etc.

Zybby must of also left the _WIN32 if/else statements unfinished as the cpp scripts also contain preprocessor support for '#ifdef __BORLANDC__' but has been commented out. Saddly Zybby appeared to given up and left Foxbot in 2010 with this mysterious issue.
__________________
vBulletin Webmaster Since 2001
Bots-United Webmaster and Botmaster
RoboCop is offline
Send a message via Skype™ to RoboCop
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-13-2016 , 15:17   Re: Need some tips or help for compiling Metamod Win32 Addon
Reply With Quote #4

This error is not related to metamod itself. Metamod actually tried to open this file with the Microsoft LoadLibrary() function. It looks like this error means file could be located but could not be loaded.

Likely a dependency issue since you compiled with something else?

Attach or link the source code, I can try to compile it.
__________________

Last edited by Arkshine; 08-13-2016 at 15:20.
Arkshine is offline
RoboCop
AlliedModders Donor
Join Date: Dec 2010
Location: Dundee, Scotland
Old 08-13-2016 , 20:02   Re: Need some tips or help for compiling Metamod Win32 Addon
Reply With Quote #5

https://www.dropbox.com/s/wj5ejrg54l...oxbot.zip?dl=0

There.
__________________
vBulletin Webmaster Since 2001
Bots-United Webmaster and Botmaster
RoboCop is offline
Send a message via Skype™ to RoboCop
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-14-2016 , 05:11   Re: Need some tips or help for compiling Metamod Win32 Addon
Reply With Quote #6

Are you sure you gave the right source code? It misses some files like tf_defs.h.
__________________
Arkshine is offline
RoboCop
AlliedModders Donor
Join Date: Dec 2010
Location: Dundee, Scotland
Old 08-14-2016 , 05:36   Re: Need some tips or help for compiling Metamod Win32 Addon
Reply With Quote #7

Yes I'm quite sure and the compiler didn't give my any errors on failing to find tf_defs.h. That header file is found in 'hlsdk-2.3-p4\multiplayer\cl_dll' I've also kept the other versions of HLSDK in My Documents to compare the original/patched/modified versions.

You trying to say that header should be in the main Foxbot source folder? I couldn't of deleted it from there unless DrEvil or Zybby did when they were upgrading Foxbot...

As for the other files that maybe missing I believe Zybby had excluded cbase.cpp, fsubs.cpp, fworld.cpp and globals.cpp in the compiler directory from the main /foxbot folder; but are found in the VC++ 6.0 .dsw file.
__________________
vBulletin Webmaster Since 2001
Bots-United Webmaster and Botmaster

Last edited by RoboCop; 08-14-2016 at 08:14.
RoboCop is offline
Send a message via Skype™ to RoboCop
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-14-2016 , 10:08   Re: Need some tips or help for compiling Metamod Win32 Addon
Reply With Quote #8

It was my bad, tried to compile against Alliedmods HLSDK/Metamod.

Your link errors are because you provide wrong information when you use "extern" on some global variables.

Most of the errors are because you added "const", like "extern const my_global_variable". Not sure why.
And the others left are because you declared a global variable as "int" but use "extern bool my_global_variable".

Once this done, it compiles fine.
__________________

Last edited by Arkshine; 08-14-2016 at 10:22.
Arkshine is offline
RoboCop
AlliedModders Donor
Join Date: Dec 2010
Location: Dundee, Scotland
Old 08-14-2016 , 11:17   Re: Need some tips or help for compiling Metamod Win32 Addon
Reply With Quote #9

Well no. I believe it was Zybby that added those but never finished fixing it. As far as I know with altering the cpp codes: the only changes I made were commenting the Mod support for FrontLine Forces, CS 1.6, DMC, HLDM and Op4 as they seem pointless as RCBot1, POD-Bot and JK_Botti have superceded based from this code ripped from Botman's HPB.

Plus the older Foxbot build for Linux needed fixed in h_export from the LoadLibrary() for the newer SteamPipe tfc.so binary and ignore the older HLDSUpdatetool tfc_i386.so.

This error on const you mentioned could explain why Zybby used a different compiler like Borland but never repaired those global variable errors. I'll have a look and sort it out now! Thanks.
__________________
vBulletin Webmaster Since 2001
Bots-United Webmaster and Botmaster
RoboCop is offline
Send a message via Skype™ to RoboCop
RoboCop
AlliedModders Donor
Join Date: Dec 2010
Location: Dundee, Scotland
Old 08-14-2016 , 12:57   Re: Need some tips or help for compiling Metamod Win32 Addon
Reply With Quote #10

Alright it seems to be working now thanks!
__________________
vBulletin Webmaster Since 2001
Bots-United Webmaster and Botmaster
RoboCop is offline
Send a message via Skype™ to RoboCop
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:02.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode