.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Offtopic (http://forums.bots-united.com/forumdisplay.php?f=23)
-   -   CZ released!!! (http://forums.bots-united.com/showthread.php?t=1168)

dead bwoy 31-03-2004 17:38

Re: CZ released!!!
 
well i got a successfull compile now but the thing still dont work right yet:
Couldn't get GiveFnptrsToDll in .\czero\addons\metamod\metamod_cz.dll
HOST_ERROR: Couldn't get DLL API from .\czero\addons\metamod\metamod_cz.dll

Pierre-Marie Baty 01-04-2004 00:33

Re: CZ released!!!
 
Could you post your GiveFnptrsToDll() prototype ?

dead bwoy 01-04-2004 17:37

Re: CZ released!!!
 
Code:

/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
* object code is restricted to non-commercial enhancements to products from
* Valve LLC. All other use, distribution, or modification is prohibited
* without written permission from Valve LLC.
*
****/
/*
===== h_export.cpp ========================================================
Entity classes exported by Halflife.
*/
#include "extdll.h"
#include "util.h"
#include "cbase.h"
// Holds engine functionality callbacks
enginefuncs_t g_engfuncs;
globalvars_t *gpGlobals;
#ifdef _WIN32
// Required DLL entry point
BOOL WINAPI DllMain(
HINSTANCE hinstDLL,
DWORD fdwReason,
LPVOID lpvReserved)
{
if        (fdwReason == DLL_PROCESS_ATTACH)
        {
        }
else if (fdwReason == DLL_PROCESS_DETACH)
        {
        }
return TRUE;
}
void DLLEXPORT GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals )
{
memcpy(&g_engfuncs, pengfuncsFromEngine, sizeof(enginefuncs_t));
gpGlobals = pGlobals;
}
#else
extern "C" {
void GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals )
{
memcpy(&g_engfuncs, pengfuncsFromEngine, sizeof(enginefuncs_t));
gpGlobals = pGlobals;
}
}
#endif

...I think this is what you're asking for

stefanhendriks 03-04-2004 19:24

Re: CZ released!!!
 
guys, i thought we had a similiar problem when we tried to compile metamod and such on our server. Can't we just get that source bundled?

Onno Kreuzinger 03-04-2004 21:17

Re: CZ released!!!
 
it is allready Pres :-)

http://server.bots-united.com/downloads

dead bwoy 04-04-2004 06:30

Re: CZ released!!!
 
so is this GiveFnptrsToDll() error; is it a sdk problem (still not current?) or is this a metamod code problem?

Pierre-Marie Baty 04-04-2004 23:42

Re: CZ released!!!
 
I think it's a compiler issue. Metamod is meant to compile with GCC on Linux, GCC + Cross-compiling (on Linux) for Windows, or MSVC natively for Windows. Other compilers may not behave correctly and GiveFnptrsToDll is not correctly exported.

How is "DLLEXPORT" defined in the code you're using ?

Onno Kreuzinger 05-04-2004 00:28

Re: CZ released!!!
 
Quote:

+ Cross-compiling (on Linux) for Windows
nope that is broken and not fixed, i read it after installing the cross compile stuff ...

dead bwoy 05-04-2004 03:34

Re: CZ released!!!
 
Code:

// Macro for function-exporting from DLL..
// from SDK dlls/cbase.h:
//! C functions for external declarations that call the appropriate C++ methods

// Windows uses "__declspec(dllexport)" to mark functions in the DLL that
// should be visible/callable externally.
//
// It also apparently requires WINAPI for GiveFnptrsToDll().
//
// See doc/notes_windows_coding for more information..

// Attributes to specify an "exported" function, visible from outside the
// DLL.
#undef DLLEXPORT
#ifdef _WIN32
                  #define DLLEXPORT __declspec(dllexport)
                  // WINAPI should be provided in the windows compiler headers.
                  // It's usually defined to something like "__stdcall".
#elif defined(linux)
                  #define DLLEXPORT /* */
                  #define WINAPI  /* */
#endif /* linux */

this?
__declspec(dllexport)

dead bwoy 07-04-2004 17:50

Re: CZ released!!!
 
so for those who are a$$ broke, like me, i found out that microsoft offers the same command line compiler that comes with msvc; FOR FREE!!! W00T!
check it out:
http://www.thefreecountry.com/compilers/cpp.shtml
here's hoping i can get it to work.

HELP:
ok, so im assuming that you use this command line compiler with dos (on windows). every command i try comes back with "not recognized as an internal or external command, operable program, or batch file." do i need to create a batch file to compile? what are the commands?


All times are GMT +2. The time now is 23:37.

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