Raised This Month: $ Target: $400
 0% 

[Solved] Linux - undefined: UTIL_VarArgs()?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Rirre
Veteran Member
Join Date: Nov 2006
Old 03-07-2015 , 18:37   [Solved] Linux - undefined: UTIL_VarArgs()?
Reply With Quote #1

No compile errors or warnings, but when I start up the server, the module won't load because of this:
Code:
L 03/08/2015 - 00:23:51: [META] ERROR: dll: Failed query plugin '<test_mm_i386.so>'; Couldn't open file '/home/ubuntu/steamcmd/cstrike/addons/test_plugin/dlls/test_mm_i386.so': /home/ubuntu/steamcmd/cstrike/addons/test_plugin/dlls/test_mm_i386.so: undefined symbol: _Z12UTIL_VarArgsPKcz L 03/08/2015 - 00:23:51: [META] ERROR: dll: Skipping plugin '<test_mm_i386.so>'; couldn't query
Why do this just happen in Linux but it works just fine in Windows?

util.cpp
Code:
char* UTIL_VarArgs( char *format, ... ) {     va_list  argptr;     static char string[1024];         va_start (argptr, format);     vsprintf (string, format,argptr);     va_end (argptr);     return string; }
util.h
Code:
extern char   *UTIL_VarArgs( char *format, ... );

Last edited by Rirre; 03-08-2015 at 06:41.
Rirre is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 03-07-2015 , 21:31   Re: [Metamod] Linux - undefined: UTIL_VarArgs()?
Reply With Quote #2

Try removing the extern keyword to make it a forward function definition?
__________________
WildCard65 is offline
Rirre
Veteran Member
Join Date: Nov 2006
Old 03-08-2015 , 06:03   Re: [Metamod] Linux - undefined: UTIL_VarArgs()?
Reply With Quote #3

Quote:
Originally Posted by WildCard65 View Post
Try removing the extern keyword to make it a forward function definition?
Code:
\metamod-am\osdep.h(467): error C3861: 'UTIL_VarArgs': identifier not found
\metamod-am\osdep.h(472): error C3861: 'UTIL_VarArgs': identifier not found
Code:
#if defined(linux) || defined(__APPLE__)
#define normalize_pathname(a)
#elif defined(_WIN32)
inline void normalize_pathname(char *path) {
	char *cp;

	META_DEBUG(8, ("normalize: %s", path)); // - Line 467
	for(cp=path; *cp; cp++) {
		if(isupper(*cp)) *cp=tolower(*cp);
		if(*cp=='\\') *cp='/';
	}
	META_DEBUG(8, ("normalized: %s", path)); // Line 472
}
#endif /* _WIN32 */
EDIT: Solved.
Not sure why but changed Makefile's CPPFLAGS = from ../metamod to /metamod-am back and forth.

Last edited by Rirre; 03-10-2015 at 07:43.
Rirre is offline
Reply



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 21:43.


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