Question to set up CC for coding plugins

Feel free to ask any question here
Post Reply
subo3
Posts: 15
Joined: Tue Dec 13, 2022 12:43 pm

Question to set up CC for coding plugins

Post by subo3 »

Hey, i'm having trouble getting CC ready for coding a plugin. Disclaimer: I am new to C++ and never did anything with it apart from learning the basics. Still i will try and get better to know what all this stuff with CMake, Debug and Release mean in a practical way.

So, my basic question is, what can i do to bring CC into a state where i can code a (first of all empty placeholder) plugin and get CC running showing basically the name of the new plugin? I've read about the example plugin (https://www.danielgm.net/cc/forum/viewtopic.php?t=5033) which has to be pasted into the 'plugin/core/standard' folder, but i guess i'm not at that point yet.

What i did so far is that i tried to run these steps (after installing Qt):
https://github.com/CloudCompare/CloudCo ... r/BUILD.md

Until step 4 it works all fine. Step 5 doesnt work.
Error:

Code: Select all

[my folder]>cmake --install .
-- Install configuration: "Release"
CMake Error at libs/CCAppCommon/cmake_install.cmake:43 (file):
  file INSTALL cannot find
  "[my folder]/CCAppCommon.dll":
  No error.
Call Stack (most recent call first):
  libs/cmake_install.cmake:37 (include)
  cmake_install.cmake:37 (include)
Thats what i get.

Code: Select all

cmake --install . config Debug
works, but i'm not sure if this is the correct way to approach since it doesnt create an executable.

If there is any in-depth tutorial for setting up CC ready to alter or create plugins, i'd be very thankful for a link.

Any help is welcome,
cheers!
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Question to set up CC for coding plugins

Post by daniel »

Which OS and compiler are you working with?
Daniel, CloudCompare admin
subo3
Posts: 15
Joined: Tue Dec 13, 2022 12:43 pm

Re: Question to set up CC for coding plugins

Post by subo3 »

I'm using windows 10. And yeah when it comes to the compiler, I have no idea which one cmake uses natively when I do the steps 1-5. I supposed it was probably specified in the CMakeLists.txt?
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Question to set up CC for coding plugins

Post by daniel »

Nope you have to specify it. I guess if you don't, a default one is chosen. But I don't know which one.

If you are using the GUI version, you should see a menu to let you select the right compiler. Not all compilers would work, at least not a lot are used to compile CC on Windows (we mainly use Visual Studio 2017 and later, and maybe MinGW).
Daniel, CloudCompare admin
subo3
Posts: 15
Joined: Tue Dec 13, 2022 12:43 pm

Re: Question to set up CC for coding plugins

Post by subo3 »

Ok thank you, so i tried to "generate" with the CMake GUI (Configuration: VS 2017) and it worked. Now i have the .sln which i can open in Visual Studio. But is this the correct "state" now to create a plugin/the example plugin? There is no executable still, how can i test it and run CC to see the changes? I thought after "build", "install" is still necessary.

Sorry if the question is stupid. This is all new to me.
Post Reply