Skip to content

Commit

Permalink
fix compile error2
Browse files Browse the repository at this point in the history
  • Loading branch information
lkpworkspace committed Feb 25, 2024
1 parent 0c8651c commit ce7dbce
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ jobs:
run: |
cmake -S jsoncpp-1.9.5 -B build-jsoncpp \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_STATIC_LIBS=OFF \
-DBUILD_OBJECT_LIBS=OFF \
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/jsoncpp \
-DBUILD_OBJECT_LIBS=OFF \
-DJSONCPP_WITH_TESTS=OFF \
-DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF \
-DJSONCPP_WITH_PKGCONFIG_SUPPORT=OFF \
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ jobs:
run: |
cmake -S jsoncpp-1.9.5 -B build-jsoncpp \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_STATIC_LIBS=OFF \
-DBUILD_OBJECT_LIBS=OFF \
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/jsoncpp \
-DBUILD_OBJECT_LIBS=OFF \
-DJSONCPP_WITH_TESTS=OFF \
-DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF \
-DJSONCPP_WITH_PKGCONFIG_SUPPORT=OFF \
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ jobs:
run: |
cmake -S jsoncpp-1.9.5 -B build-jsoncpp `
-A ${{matrix.arch}} `
-DBUILD_SHARED_LIBS=ON \
-DBUILD_SHARED_LIBS=ON `
-DBUILD_STATIC_LIBS=OFF `
-DBUILD_OBJECT_LIBS=OFF `
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} `
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/jsoncpp `
-DBUILD_OBJECT_LIBS=OFF `
-DJSONCPP_WITH_TESTS=OFF `
-DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF `
-DJSONCPP_WITH_PKGCONFIG_SUPPORT=OFF
Expand Down
6 changes: 4 additions & 2 deletions templates/template.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ class @template_name@Worker : public myframe::Worker {
};

/* create actor instance */
extern "C" MYFRAME_SUBMODULE_EXPORT std::shared_ptr<myframe::Actor> actor_create(
extern "C" MYFRAME_SUBMODULE_EXPORT std::shared_ptr<myframe::Actor>
actor_create(
const std::string& actor_name) {
if (actor_name == "@template_name@") {
return std::make_shared<@template_name@Actor>();
Expand All @@ -63,7 +64,8 @@ extern "C" MYFRAME_SUBMODULE_EXPORT std::shared_ptr<myframe::Actor> actor_create
}

/* create worker instance */
extern "C" MYFRAME_SUBMODULE_EXPORT std::shared_ptr<myframe::Worker> worker_create(
extern "C" MYFRAME_SUBMODULE_EXPORT std::shared_ptr<myframe::Worker>
worker_create(
const std::string& worker_name) {
if (worker_name == "@template_name@") {
return std::make_shared<@template_name@Worker>();
Expand Down

0 comments on commit ce7dbce

Please sign in to comment.