SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 26/04/2008, 05:57 AM   #1
hansen111
Big Clucker
 
Join Date: Aug 2007
Posts: 177
Reputation: 9
Default Plugin does not conform to architecture

As stated in the topic i get this from server when trying to load the helloworld.dll plugin:

"Plugin does not conform to architecture."

Strange cuz helloworld was compiled and linked on the same windows machine as the sa-mp server is running..Any ideas to solve this??

I would have liked to compile with nmake to get all options right, but nmake just dont understand the contents of makefile.w32 which comes with sdk:

"NMAKE : fatal error U1077: 'options' : return code '0x1'
Stop."

Here is buildlog:


Code:
Build Log   ------- Build started: Project: firstplugin, Configuration: Release|Win32 -------

 Command Lines   This edition of Visual C++ does not support the optimizing compiler.
Creating temporary file "c:\Documents and Settings\Administrator\Dokumenter\Visual Studio Projects\firstplugin\Release\RSP00009C.rsp" with contents
[
/D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_MBCS" /FD /EHsc /MDd /GS /Fo"Release/" /Fd"Release/vc70.pdb" /W3 /c /Wp64 /Zi /TP /Od /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "_WINDLL" /Gm /EHsc /RTC1 /MDd /W3 /nologo /c /Wp64 /ZI /TP
"\Documents and Settings\Administrator\Dokumenter\Modtagne filer\Sdk\amxplugin.cpp"
"\Documents and Settings\Administrator\Dokumenter\Modtagne filer\HelloWorld\helloworld.cpp"
]
Creating command line "cl.exe @"c:\Documents and Settings\Administrator\Dokumenter\Visual Studio Projects\firstplugin\Release\RSP00009C.rsp" /nologo"
Creating temporary file "c:\Documents and Settings\Administrator\Dokumenter\Visual Studio Projects\firstplugin\Release\RSP00009D.rsp" with contents
[
/D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_MBCS" /FD /EHsc /MDd /GS /Fo"Release/" /Fd"Release/vc70.pdb" /W3 /c /Wp64 /Zi /TC /Od /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "_WINDLL" /Gm /EHsc /RTC1 /MDd /W3 /nologo /c /Wp64 /ZI /TP
"\Documents and Settings\Administrator\Dokumenter\Modtagne filer\Sdk\amx\getch.c"
]
Creating command line "cl.exe @"c:\Documents and Settings\Administrator\Dokumenter\Visual Studio Projects\firstplugin\Release\RSP00009D.rsp" /nologo"
Creating temporary file "c:\Documents and Settings\Administrator\Dokumenter\Visual Studio Projects\firstplugin\Release\RSP00009E.rsp" with contents
[
/OUT:"Release/firstplugin.dll" /INCREMENTAL:NO /NOLOGO /DLL /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF /MACHINE:X86 /MANIFEST:NO /MAP:"helloworld.map" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
".\release\helloworld.obj"
".\release\getch.obj"
".\release\amxplugin.obj"
]
Creating command line "link.exe @"c:\Documents and Settings\Administrator\Dokumenter\Visual Studio Projects\firstplugin\Release\RSP00009E.rsp""
 Output Window   Compiling...
amxplugin.cpp
helloworld.cpp
Generating Code...
Compiling...
cl : Command line warning D4025 : overriding '/TC' with '/TP'
getch.c
Linking...
LINK : warning LNK4044: unrecognized option '/MANIFEST:NO'; ignored
LINK : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:ICF' specification
 Results   Build log was saved at "file://c:\Documents and Settings\Administrator\Dokumenter\Visual Studio Projects\firstplugin\Release\BuildLog.htm"
firstplugin - 0 error(s), 3 warning(s)
Im stuck here..
__________________
Quote:
<frank> can you help me install GTA3?
<knightmare> first, shut down all programs you aren't using
frank has quit IRC. (Quit)
<knightmare>...
hansen111 is offline   Reply With Quote
Old 26/04/2008, 01:37 PM   #2
PsYcHoGoD
Little Clucker
 
Join Date: Jan 2006
Posts: 9
Reputation: 0
Default Re: Plugin does not conform to architecture

Make sure the following functions are exported:
Supports
Load
Unload
AmxLoad
AmxUnload

I know that error occurs when they are not exported, but could also be something else causes the error.
PsYcHoGoD is offline   Reply With Quote
Old 27/04/2008, 10:10 AM   #3
hansen111
Big Clucker
 
Join Date: Aug 2007
Posts: 177
Reputation: 9
Default Re: Plugin does not conform to architecture

Well im just building the helloworld example from the SDK so it really shouldnt be an export problem. I think i will try compiling command line next.
__________________
Quote:
<frank> can you help me install GTA3?
<knightmare> first, shut down all programs you aren't using
frank has quit IRC. (Quit)
<knightmare>...
hansen111 is offline   Reply With Quote
Old 27/04/2008, 01:39 PM   #4
hansen111
Big Clucker
 
Join Date: Aug 2007
Posts: 177
Reputation: 9
Default Re: Plugin does not conform to architecture

Quote:
Originally Posted by PsYcHoGoD
Make sure the following functions are exported:
Supports
Load
Unload
AmxLoad
AmxUnload

I know that error occurs when they are not exported, but could also be something else causes the error.
Yes! you where right on the spot here..Thx man

Although i was just building the helloworld example from the SDK i was unable to load the project as im using an older version off visual c++ so the .def file with the exports didnt get into the project, so:

Under linker options -> input -> module definition file i specified the helloworld.def (came with SDK)file and now the plugin gets loaded fine.

So the conclusion to the question, "what does Plugin does not conform to architecture mean?", in this case the architecture meant the plugin structure where not followed as the functons was not exported and could not be called in the dll from the amx file.

__________________
Quote:
<frank> can you help me install GTA3?
<knightmare> first, shut down all programs you aren't using
frank has quit IRC. (Quit)
<knightmare>...
hansen111 is offline   Reply With Quote
Old 15/08/2009, 11:15 AM   #5
[DrM]spatrik
Little Clucker
 
[DrM]spatrik's Avatar
 
Join Date: Apr 2008
Location: Forráskút
Posts: 37
Reputation: 0
Default Re: Plugin does not conform to architecture

Hi all!

I would be a trouble of mine like this. A gang plugin I wrote. The translator signals an any kind of mistake at me.

Quote:
Originally Posted by PsYcHoGoD
Make sure the following functions are exported:
Supports
Load
Unload
AmxLoad
AmxUnload

I know that error occurs when they are not exported, but could also be something else causes the error.
exported

PLS Help!

Here is buildlog:
Code:
# Project: gang
# Makefile created by Dev-C++ 4.9.9.2

CPP = g++.exe
CC  = gcc.exe
WINDRES = windres.exe
RES = gang_private.res
OBJ = C:/Dev-Cpp/Templates/gang.o C:/Dev-Cpp/include/SDK/amxplugin.o $(RES)
LINKOBJ = C:/Dev-Cpp/Templates/gang.o C:/Dev-Cpp/include/SDK/amxplugin.o $(RES)
LIBS = -L"C:/Dev-Cpp/lib" --no-export-all-symbols --add-stdcall-alias 
INCS = -I"C:/Dev-Cpp/include" 
CXXINCS = -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" 
BIN = gang.dll
CXXFLAGS = $(CXXINCS) -DBUILDING_DLL=1 
CFLAGS = $(INCS) -DBUILDING_DLL=1 
RM = rm -f

.PHONY: all all-before all-after clean clean-custom

all: all-before gang.dll all-after


clean: clean-custom
	${RM} $(OBJ) $(BIN)

DLLWRAP=dllwrap.exe
DEFFILE=libgang.def
STATICLIB=libgang.a

$(BIN): $(LINKOBJ)
	$(DLLWRAP) --output-def $(DEFFILE) --driver-name c++ --implib $(STATICLIB) $(LINKOBJ) $(LIBS) -o $(BIN)

C:/Dev-Cpp/Templates/gang.o: C:/Dev-Cpp/Templates/gang.cpp
	$(CPP) -c C:/Dev-Cpp/Templates/gang.cpp -o C:/Dev-Cpp/Templates/gang.o $(CXXFLAGS)

C:/Dev-Cpp/include/SDK/amxplugin.o: C:/Dev-Cpp/include/SDK/amxplugin.cpp
	$(CPP) -c C:/Dev-Cpp/include/SDK/amxplugin.cpp -o C:/Dev-Cpp/include/SDK/amxplugin.o $(CXXFLAGS)

gang_private.res: gang_private.rc 
	$(WINDRES) -i gang_private.rc --input-format=rc -o gang_private.res -O coff
[DrM]spatrik is offline   Reply With Quote
Old 20/08/2009, 03:25 PM   #6
[HUN]Gamestar
Big Clucker
 
Join Date: Aug 2009
Posts: 138
Reputation: 3
Default Re: Plugin does not conform to architecture

Yes... I exported, but plugin is wrong. (Plugin does not conform to architecture -.-")

Gamestar
[HUN]Gamestar is offline   Reply With Quote
Old 21/10/2009, 06:32 PM   #7
xMine
Little Clucker
 
Join Date: Apr 2009
Posts: 6
Reputation: 0
Default Re: Plugin does not conform to architecture

I have the same problem too
I just wanted to include a library but ever when i call a function from the lib i get the "does not conform"
error... but when i do not call functions from the library i get no error
Is there a special trick or something to include a library?
Oh, and export the functions (Load, Unload, etc.) ...

Help would be very appreciated...

Edit:
I use MinGW with Code::Blocks

( sry for bad english -.-" )
xMine is offline   Reply With Quote
Old 21/10/2009, 08:00 PM   #8
Streetplaya
Gangsta
 
Join Date: Nov 2007
Posts: 603
Reputation: 1
Default Re: Plugin does not conform to architecture

You can do exports like this with mingw and that stuff:

Code:
#define MYEXPORT extern "C" __declspec(dllexport)
MYEXPORT int MyFunctionIWantToExport(int bla)
{
   return 1337;
}
Streetplaya is offline   Reply With Quote
Old 21/10/2009, 08:21 PM   #9
Jamesy
Little Clucker
 
Join Date: Oct 2009
Posts: 19
Reputation: 0
Default Re: Plugin does not conform to architecture

Quote:
Originally Posted by !MaVe
You can do exports like this with mingw and that stuff:

Code:
#define MYEXPORT extern "C" __declspec(dllexport)
MYEXPORT int MyFunctionIWantToExport(int bla)
{
  return 1337;
}
If your using a definition file you don't need to use declspec.
Jamesy is offline   Reply With Quote
Old 27/10/2009, 09:02 PM   #10
Streetplaya
Gangsta
 
Join Date: Nov 2007
Posts: 603
Reputation: 1
Default Re: Plugin does not conform to architecture

A tip if others still experience this problem and are using linux: do not link your plugin against libpthread, it will work fine without it even if you are using it in your code. Hope this helps.
Streetplaya is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] DNS Plugin Incognito Plugin Development 81 28/01/2017 04:54 PM
How to add a plugin?[HELP] `Robo Help Archive 4 25/04/2010 11:08 AM
I need one plugin [Hun]Ricsi Help Archive 0 03/03/2010 03:13 PM
i need irc plugin Johny_Depp Server Support 4 28/12/2009 12:12 PM


All times are GMT. The time now is 07:46 AM.


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