(Own-Plugin) CMake build errors!
#1

Hello folks.

I've been working on creating my own SA-MP plugin these days and now I'm facing an error with CMAKE tool. When I try to config it I get this error "Unknown CMake command "add_samp_plugin".

I'm following this tutorial here: https://github.com/Zeex/sampgdk/wiki...GDK-with-CMake

MAJOR UPDATE: I fixed the bug and committed the fix yesterday. I removed old topic content to avoid confusion to people who have the same problem. Here is the content of old post if you want to look at it here.

Here are the things you must do:

1. In CMakeLists.txt you have to add file name too! (Add .cmake after including)
2. You have add location where .cpp files are. E.g: /ROOT_INCLUDES/PluginSAMP.cpp
3. Config once again (Delete /build folder from ROOT_DIRECTORY) and Generate.
4. Reload solution (Restart solution in Visual Studio)
5. Load PluginSAMP.cpp if the solution didn't do it already.
6. Compile the code.

7. Watch out where the plugin has been exported. Sometimes it is default VS Debug folder. It might be inside /build/debug/..

NOTICE: You don't have to provide 'AMX_NATIVE_INFO', or add native in your game mode.

NOTICE #2: I faced a lots of problems with Visual Studio 2017;Cmake. I switched to 2013 and it successfully found all native compilers.
Reply
#2

Why dont you just learn c++?
then you will know what to do
Reply
#3

which plugin you trying to create?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)