DK22Pac / plugin-sdk

An SDK for developing ASI/CLEO plugins for GTA San Andreas, GTA Vice City and GTA III
zlib License
431 stars 114 forks source link

Is this error caused because a d3dx9 sdk installation is missing? #161

Closed dlprisco closed 1 year ago

dlprisco commented 1 year ago

I have setup the plugin_sdk installer variables as i think it is coprrectly except for one that is the directx9 folder, currently i am using C:\Windows\WinSXS\d3d12\ that contain some directx sdk files, and when I try to build a script on CodeBlocks i am getting this error:

-------------- Build: GTASA Release in playerWeapon (compiler: GNU GCC Compiler)---------------

g++.exe -m32 -fpermissive -std=gnu++17 -O2 -DNDEBUG -DGTASA -DGTAGAME_NAME="\"San Andreas"\" -DGTAGAME_ABBR="\"SA"\" -DGTAGAME_ABBRLOW="\"sa"\" -DGTAGAME_PROTAGONISTNAME="\"CJ"\" -DGTAGAME_CITYNAME="\"San Andreas"\" -D_DX9_SDK_INSTALLED -DPLUGIN_SGV_10US -IC:\Users\userx\plugin-sdk\plugin_sa\ -IC:\Users\userx\plugin-sdk\plugin_sa\game_sa\ -IC:\Users\userx\plugin-sdk\shared\ -IC:\Users\userx\plugin-sdk\shared\game\ -I\Include\ -c C:\Users\userx\GPT-neo\Pictures\cleo\MODS\playerWeapon\playerWeapon.cpp -o .obj\Release\playerWeapon.o
g++.exe -shared   -Wl,--dll -LC:\Users\userx\plugin-sdk\output\mingw\lib\ -L\Lib\x86\ .obj\Release\playerWeapon.o  -o C:\Program Files (x86)\Rockstar Games\GTA San Andreas\scripts\playerWeapon.SA.asi -static-libgcc -static-libstdc++ -s  -lplugin -ld3d9 -ld3dx9
In file included from C:\Users\userx\plugin-sdk\shared/plugin.h:17,
                 from C:\Users\userx\GPT-neo\Pictures\cleo\MODS\playerWeapon\playerWeapon.cpp:1:
C:\Users\userx\plugin-sdk\shared/Other.h: In function 'bool plugin::FileExists(const char*)':
C:\Users\userx\plugin-sdk\shared/Other.h:105:35: error: no matching function for call to 'stat::stat(const char*&, stat*)'
         return (stat(name, &buffer) == 0);
                                   ^
In file included from C:/Program Files/CodeBlocks/MinGW/x86_64-w64-mingw32/include/wchar.h:424,
                 from C:/Program Files/CodeBlocks/MinGW/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/cwchar:44,
                 from C:/Program Files/CodeBlocks/MinGW/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/postypes.h:40,
                 from C:/Program Files/CodeBlocks/MinGW/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/iosfwd:40,
                 from C:/Program Files/CodeBlocks/MinGW/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ios:38,
                 from C:/Program Files/CodeBlocks/MinGW/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ostream:38,
                 from C:/Program Files/CodeBlocks/MinGW/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/iostream:39,
                 from C:\Users\userx\plugin-sdk\shared/PluginBase.h:11,
                 from C:\Users\userx\plugin-sdk\shared/plugin.h:9,
                 from C:\Users\userx\GPT-neo\Pictures\cleo\MODS\playerWeapon\playerWeapon.cpp:1:
C:/Program Files/CodeBlocks/MinGW/x86_64-w64-mingw32/include/_mingw_stat64.h:43:10: note: candidate: 'stat::stat()'
   struct stat {
          ^~~~
C:/Program Files/CodeBlocks/MinGW/x86_64-w64-mingw32/include/_mingw_stat64.h:43:10: note:   candidate expects 0 arguments, 2 provided
C:/Program Files/CodeBlocks/MinGW/x86_64-w64-mingw32/include/_mingw_stat64.h:43:10: note: candidate: 'constexpr stat::stat(const stat&)'
C:/Program Files/CodeBlocks/MinGW/x86_64-w64-mingw32/include/_mingw_stat64.h:43:10: note:   candidate expects 1 argument, 2 provided
C:/Program Files/CodeBlocks/MinGW/x86_64-w64-mingw32/include/_mingw_stat64.h:43:10: note: candidate: 'constexpr stat::stat(stat&&)'
C:/Program Files/CodeBlocks/MinGW/x86_64-w64-mingw32/include/_mingw_stat64.h:43:10: note:   candidate expects 1 argument, 2 provided
Process terminated with status 1 (2 minute(s), 32 second(s))
1 error(s), 0 warning(s) (2 minute(s), 32 second(s))

the compiler is the default that i have downloaded from CodeBlocks and is located as the root folder CodeBlocks\MinGW, in the compiler settings is auto-detected all necesary files g++, c++, gcc, and others, what i am doing wrong?

Megasware128 commented 1 year ago

DX12 SDK won't work

FrannDzs commented 1 year ago

DX9 SDK: https://www.microsoft.com/en-us/download/details.aspx?id=6812