AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Coding MM:S Plugins & SM Extensions (https://forums.alliedmods.net/forumdisplay.php?f=75)
-   -   DLL_IMPORT does not name a type (https://forums.alliedmods.net/showthread.php?t=266127)

kadet.89 07-11-2015 10:29

DLL_IMPORT does not name a type
 
I've updated hl2sdk and mmsource, and now have some errors when try to compile extensions (linux):
These two uncludes:
#include <IEngineTrace.h>
#include <igameevents.h>

give this error:

Quote:

../SDK/hl2sdk/public/tier0/platform.h:1086:28: error: ‘DLL_IMPORT’ does not name a type
#define PLATFORM_INTERFACE DLL_IMPORT
^
../SDK/hl2sdk/public/tier0/fasttimer.h:28:1: note: in expansion of macro ‘PLATFORM_INTERFACE’
PLATFORM_INTERFACE double g_ClockSpeedSecondsMultiplier;
^
In file included from ../SDK/hl2sdk/public/tier0/platform.h:1338:0,
from ../SDK/hl2sdk/public/tier1/interface.h:52,
from ../SDK/hl2sdk/public/igameevents.h:19,
from extension.h:54,
from extension.cpp:32:
../SDK/hl2sdk/public/tier0/fasttimer.h:74:22: error: variable ‘DLL_CLASS_IMPORT CClockSpeedInit’ has initializer but incomplete type
class PLATFORM_CLASS CClockSpeedInit
^
../SDK/hl2sdk/public/tier0/fasttimer.h:76:1: error: expected primary-expression before ‘public’
public:
^
../SDK/hl2sdk/public/tier0/fasttimer.h:76:1: error: expected ‘}’ before ‘public’
../SDK/hl2sdk/public/tier0/fasttimer.h:76:1: error: expected ‘,’ or ‘;’ before ‘public’
../SDK/hl2sdk/public/tier0/fasttimer.h:83:1: error: expected declaration before ‘}’ token
};
#include <iplayerinfo.h>

Quote:

In file included from ../SDK/hl2sdk/public/tier0/platform.h:1338:0,
from ../SDK/hl2sdk/public/tier0/commonmacros.h:15,
from ../SDK/hl2sdk/public/tier0/basetypes.h:11,
from ../SDK/hl2sdk/public/mathlib/vector.h:20,
from ../SDK/hl2sdk/public/game/server/iplayerinfo.h:12,
from extension.cpp:38:
../SDK/hl2sdk/public/tier0/fasttimer.h:74:22: error: variable ‘DLL_CLASS_IMPORT CClockSpeedInit’ has initializer but incomplete type
class PLATFORM_CLASS CClockSpeedInit
#include <itoolentity.h>
Quote:

In file included from ../SDK/hl2sdk/public/tier0/platform.h:1338:0,
from ../SDK/hl2sdk/public/tier1/interface.h:52,
from ../SDK/hl2sdk/public/toolframework/itoolentity.h:13,
from extension.cpp:44:
../SDK/hl2sdk/public/tier0/fasttimer.h:74:22: error: variable ‘DLL_CLASS_IMPORT CClockSpeedInit’ has initializer but incomplete type
class PLATFORM_CLASS CClockSpeedInit
Does it mean that current SDK version is broken? And where can I get a valid verion?

psychonic 07-12-2015 12:11

Re: DLL_IMPORT does not name a type
 
You're probably missing some defines. I believe you need all of _LINUX, _POSIX, LINUX, and POSIX, and possibly others depending on which SDK it is.

kadet.89 07-12-2015 12:29

Re: DLL_IMPORT does not name a type
 
Unfortunately it doesn't help
I use sourcemod-sampleext-master exemple from the most recent SDK, is it only for windows?

psychonic 07-12-2015 12:47

Re: DLL_IMPORT does not name a type
 
Quote:

Originally Posted by kadet.89 (Post 2318874)
Unfortunately it doesn't help
I use sourcemod-sampleext-master exemple from the most recent SDK, is it only for windows?

The SDKs are for whatever platforms that the game runs on, so most of them are for Windows, Linux, and Mac. You still haven't said which SDK you're talking about, but all of the branches at https://github.com/alliedmodders/hl2sdk are what we use to compile MMS and SM on all three platforms.

kadet.89 07-12-2015 13:08

Re: DLL_IMPORT does not name a type
 
https://github.com/alliedmodders/sourcemod
https://github.com/alliedmodders/hl2sdk
https://github.com/alliedmodders/metamod-source

asherkin 07-12-2015 13:16

Re: DLL_IMPORT does not name a type
 
The hl2sdk repo contains the SDKs for every supported engine, we need to know WHICH ONE YOU ARE USING.

kadet.89 07-12-2015 13:36

Re: DLL_IMPORT does not name a type
 
1 Attachment(s)
CSS

psychonic 07-12-2015 13:57

Re: DLL_IMPORT does not name a type
 
Are you using the css branch of the https://github.com/alliedmodders/hl2sdk ? It defaults to sdk2013.

git checkout css would switch the branch after cloning.

kadet.89 07-12-2015 14:08

Re: DLL_IMPORT does not name a type
 
Thank you, it did the trick


All times are GMT -4. The time now is 06:59.

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