WasmEdge / docs

https://wasmedge.org/docs/
Apache License 2.0
17 stars 57 forks source link

Update example code in develop_plugin_cpp.md #158

Closed YoungY620 closed 1 year ago

YoungY620 commented 1 year ago

Explanation

The example code in testplugin.h and test/CMakeLists.txt of this section is wrong. The tutorial becomes confusing because of that. I corrected it and now this version can be compiled.

What type of PR is this

/kind documentation

Proposed Changes

In testplugin.h.

// #include "plug-in/plug-in.h"
#include "plugin/plugin.h"

in cmakelists.txt. There is no env.cpp, module.cpp, func.cpp mentioned above in this tutorial, so it is confusing.

wasmedge_add_library(wasmedgePluginTest
  SHARED
  testplugin.cpp
)
alabulei1 commented 1 year ago

Hello, I am a code review bot on flows.network. Here are my reviews of code commits in this PR.


Commit cde9c2221155fddaa20800cb3661ca3233efc267

Key changes in the patch:

Potential problems:

alabulei1 commented 1 year ago

Hi @q82419 Please help review this PR. Thanks.

q82419 commented 1 year ago

Nice catch.