SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Plugin Development (https://forum.sa-mp.com/forumdisplay.php?f=18)
-   -   Plugin does not conform to architecture. (https://forum.sa-mp.com/showthread.php?t=556739)

Carper 11/01/2015 01:46 PM

Plugin does not conform to architecture.
 
Hello, I created a plugin with the newest gdk.

Source:

Code:

#include <stdio.h>
#include <string.h>

#include <sampgdk/a_players.h>
#include <sampgdk/a_samp.h>
#include <sampgdk/core.h>
#include <sampgdk/sdk.h>

#include "ac.h"

PLUGIN_EXPORT bool PLUGIN_CALL OnGameModeInit() {
        printf("Test %s loaded.", TEST_VERSION);
        return true;
}

PLUGIN_EXPORT bool PLUGIN_CALL OnPlayerConnect(int playerid) {
        SendClientMessage(playerid, 0xFFFFFFFF, "Welcome to the HelloWorld server!");
        return true;
}

PLUGIN_EXPORT bool PLUGIN_CALL OnPlayerRequestClass(int playerid,
        int classid) {
        SetPlayerPos(playerid, 1958.3783f, 1343.1572f, 15.3746f);
        SetPlayerCameraPos(playerid, 1958.3783f, 1343.1572f, 15.3746f);
        SetPlayerCameraLookAt(playerid, 1958.3783f, 1343.1572f, 15.3746f, CAMERA_CUT);
        return true;
}

PLUGIN_EXPORT bool PLUGIN_CALL OnPlayerCommandText(int playerid,
        const char *cmdtext) {
        if (strcmp(cmdtext, "/hello") == 0) {
                char name[MAX_PLAYER_NAME];
                GetPlayerName(playerid, name, sizeof(name));
                char message[MAX_CLIENT_MESSAGE];
                sprintf(message, "Hello, %s!", name);
                SendClientMessage(playerid, 0x00FF00FF, message);
                return true;
        }
        return false;
}

PLUGIN_EXPORT unsigned int PLUGIN_CALL Supports() {
        return sampgdk::Supports() | SUPPORTS_PROCESS_TICK;
}

PLUGIN_EXPORT bool PLUGIN_CALL Load(void **ppData) {
        return sampgdk::Load(ppData);
}

PLUGIN_EXPORT void PLUGIN_CALL Unload() {
        sampgdk::Unload();
}

PLUGIN_EXPORT void PLUGIN_CALL ProcessTick() {
        sampgdk::ProcessTick();
}

But I get this error:
Quote:

[15:24:05] Loading plugin: test
[15:24:05] Plugin does not conform to architecture.

Mellnik 11/01/2015 02:25 PM

AW: Plugin does not conform to architecture.
 
Maybe you are missing the module definition file if this is on Windows.

CoaPsyFactor 11/01/2015 02:54 PM

Re: Plugin does not conform to architecture.
 
or you are trying to compile for 64bit arch

Carper 11/01/2015 03:19 PM

AW: Plugin does not conform to architecture.
 
my def file:
Code:

EXPORTS
        Supports
        Load
        Unload
        AmxLoad
        AmxUnload
        ProcessTick
        OnGameModeInit
        OnPlayerConnect
        OnPlayerDisconnect

/e: Okay, I forgot this step.
Quote:

Once you see the property pages navigate to Configuration properties->Linker->Input on the left side. Once you're there you want to add a module definition file. You can name this file anything you like as long as it has a ".def" extension at the end of it; People normally name def files after their project. Once you've named your definition file press OK.


All times are GMT. The time now is 02:35 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.