.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Releases, Installers, Docs & Coding (http://forums.bots-united.com/forumdisplay.php?f=48)
-   -   How to compile binaries (dll, so) under windows (http://forums.bots-united.com/showthread.php?t=4822)

KWo 11-04-2011 07:32

Re: How to compile binaries (dll, so) under windows
 
I can't see on these screenshots metamod folder with metamod sources inside in Your main folder (botsunited). Another thing makefile from podbot folder expects hlsdk folder (not hlsdk-2.3-p3) so rename it to the right one.

Mr_Red 13-05-2011 08:58

Re: How to compile binaries (dll, so) under windows
 
Hi all,

I'm trying to build the source for PodBOT-MM. I'm trying to make some mod-specific changes that will make the bots behave a little better in my Zombie Plague server.

I'm on Windows using Cygwin. I can produce a podbot_mm.dll file. However when I try to load it up in game I get this error message.

Code:

L 05/12/2011 - 23:48:29: [META] WARNING: dll: Failed query plugin '<podbot_mm.dll>'; Couldn't open file 'c:/program files (x86)/steam/steamapps/my_account/counter-strike/cstrike/addons/podbot/podbot_mm.dll': Invalid handle.
L 05/12/2011 - 23:48:29: [META] WARNING: dll: Skipping plugin '<podbot_mm.dll>'; couldn't query
L 05/12/2011 - 23:48:29: [META] WARNING: dll: Failed to reload plugin '<podbot_mm.dll>' after unloading

I noticed there are two ways to build the Windows DLL. The first way (using mingw32-make) fails for me. It says Permission denied on the object.win32 folder. The second way (using MSYS and just typing 'make') is what I used to build it.

Something else which may be of interest. In my server I'm using Metamod-P. Does this have any affect on loading up the DLL? I am using the source of plain Metamod 1.19 in my build-path, not Metamod-P.

KWo 13-05-2011 22:57

Re: How to compile binaries (dll, so) under windows
 
If You are using cygwin to get dll (windows binaries), but You are using it under windows - then the make file is layed and it may go the way like for linux (so the binary doesn't load correctly).
I mean this part:
Code:

ifdef ComSpec
    ifeq "$(HOST)" "cygwin"
        OS=LINUX
#        MCPU=-mcpu
        MCPU=-mtune
        PATH_WIN=/usr/local/cross-tools/i386-mingw32msvc/bin
        CLEAN=clean_linux
    else
        OS=WIN32
        MCPU=-mtune
        PATH_WIN=/mingw/bin
        CLEAN=clean_win32
    endif
else
    ifdef COMSPEC
        ifeq "$(HOST)" "cygwin"
            OS=LINUX
#            MCPU=-mcpu
            MCPU=-mtune
            PATH_WIN=/usr/local/cross-tools/i386-mingw32msvc/bin
            CLEAN=clean_linux
        else
            OS=WIN32
            MCPU=-mtune
            PATH_WIN=/mingw/bin
            CLEAN=clean_msys_w32
        endif
    else
        OS=LINUX
        PATH_WIN=/usr/local/cross-tools/i386-mingw32msvc/bin
        CLEAN=clean_linux
#        MCPU=-mcpu
        MCPU=-mtune
    endif
endif

You need to get it working with mingw. The other part for cygwin was prepared to let linux users make windows dll.

Metamod 19p32 doesn't make any difference for loading the dll. If You are compiling sources of podbot mm against the standard metamod - that is correct.

Mr_Red 14-05-2011 04:24

Re: How to compile binaries (dll, so) under windows
 
Thanks for pointing this out KWO. I changed this area of the makefile to look for a "type" variable which I will pass in. If I'm building the DLL, I leave it blank. If I want to build a .SO for Linux, I say make type=so. I can run the DLL on my local listen server, and the .SO loads and runs fine on my dedicated Linux server. :clap:

Code:

ifeq "$(type)" "so"
        OS=LINUX
        MCPU=-mcpu
        MCPU=-mtune
        PATH_WIN=/usr/local/cross-tools/i386-mingw32msvc/bin
        CLEAN=clean_linux
else
        OS=WIN32
        MCPU=-mtune
        PATH_WIN=/mingw/bin
        CLEAN=clean_win32
endif


KWo 16-05-2011 06:52

Re: How to compile binaries (dll, so) under windows
 
Quote:

Originally Posted by Mr_Red (Post 63484)
I'm trying to make some mod-specific changes that will make the bots behave a little better in my Zombie Plague server.

When You find something to make them working better at Zombie Mod servers, You can post some parts of Your code in a separate topic dedicated "Zombie Mods compatibility" (You need to create such topic).

eXeXe 08-10-2012 11:51

Re: How to compile binaries (dll, so) under windows
 
Hello!
I try compile with MSYS and get lots of "warnings" in the end.

http://best-articles.org/images/errors.jpg

Dll is created (432kb) but does not boot. What am I doing wrong? Still I could not find and install "cygwin-gcc-linux.tar.bz2" might be in this case? And if possible, put please again "vcproj". Thank you!

buktor 30-10-2012 11:20

Re: How to compile binaries (dll, so) under windows
 
is it possible to compile these sources using Visual C + + 2008, if possible, how?

buktor 31-10-2012 16:47

Re: How to compile binaries (dll, so) under windows
 
Thank you all, the issue is closed, he disassembled

Sorry for being too lazy to edit it just click "Edit" was not!

And by the way, who should give the link to the project file to compile the bots in the VC + + 2008, please do not take as spam, just a link I gave KWO is already broken, here you go.
Download link:
podbot_mm.vcproj

Installation: simply move the project file in the folder "podbot."

adamhingoro 12-06-2013 21:05

Re: How to compile binaries (dll, so) under windows
 
http://i44.tinypic.com/nvxikw.png
I am Stuck here :(

[NvT]_KaszpiR_ 25-06-2013 16:23

Re: How to compile binaries (dll, so) under windows
 
Try running this command from cygwin window (bash).


All times are GMT +2. The time now is 19:12.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.