Page 1 of 2
[RESOLVED] Plugin exportation
Posted: Thu Apr 07, 2022 5:56 pm
by polienn
Hello,
I have developed a plugin that works well with both the source-generated version of Cloud Compare and the standalone version installed from the site. (Windows 11, VS 2019)
However, as soon as I want to test this plugin on another computer or on a virtual machine, CC does not load it and displays an error message like:
MyPlugin.dll does not seem to be a valid plugin (Cannot load library MyPlugin.dll : la procédure spécifiée est introuvable )
Plugin's makefile :
Code: Select all
project(MyPlugin )
AddPlugin( NAME ${PROJECT_NAME} )
set(CloudCompare_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../qCC)
include_directories( ${CloudCompare_SOURCE_DIR} )
add_subdirectory( include )
add_subdirectory( src )
I use qCC and CCoreLib methods, so have try adding
Code: Select all
target_link_libraries( ${PROJECT_NAME} CCCoreLib::CCCoreLib )
and
Code: Select all
target_link_libraries( ${PROJECT_NAME} QCC_DB_LIB )
without results...
According to Depency Walker, "QCC_DB_LIB is not found", but adding QCC_DB_LIB.dll in the same folder of the plugin doesn't work either...
Any ideas ?
Thanks
Re: Plugin exportation
Posted: Sat Apr 09, 2022 10:55 am
by daniel
Normally, qCC_db.dll should already be present (next to CloudCompare.exe). So it should not be due to this indeed.
Do you have any other dependency?
And which version of Qt are you using by the way? (the official release uses 5.15.2).
Re: Plugin exportation
Posted: Sat Apr 09, 2022 3:22 pm
by polienn
daniel wrote: ↑Sat Apr 09, 2022 10:55 am
Normally, qCC_db.dll should already be present (next to CloudCompare.exe). So it should not be due to this indeed.
Do you have any other dependency?
And which version of Qt are you using by the way? (the official release uses 5.15.2).
It seems to me that there is no external dependency apart from Qt or CCCoreLib or qCC (but maybe these functions have their own dependency ? ) :
Code: Select all
// SYS
#include <sstream>
#include <string>
// QT
#include <QInputDialog>
// Cloud compare
#include "CCCoreLib.h"
#include "CCMath.h"
#include "ccMainAppInterface.h"
#include "ccPointCloud.h"
#include "ccMesh.h"
#include "ccOctree.h"
#include <ccRegistrationTools.h>
#include <CloudSamplingTools.h>
#include <DgmOctreeReferenceCloud.h>
#include <DistanceComputationTools.h>
#include <GenericProgressCallback.h>
#include <ReferenceCloud.h>
#include <ScalarField.h>
#include <ScalarFieldTools.h>
#include "ReferenceCloud.h"
#include <ccRegistrationTools.cpp>
#include <mainwindow.h>
#include <GeometricalAnalysisTools.h>
#include <ManualSegmentationTools.h>
I also use Qt 5.15.2
Re: Plugin exportation
Posted: Wed Apr 13, 2022 7:56 pm
by daniel
As long as it's Qt or CloudCompare's own libraries, I would say that you should be good...
But maybe it's the compiler then? We are using Visual 2017 (v141).
Re: Plugin exportation
Posted: Thu Apr 14, 2022 10:39 pm
by polienn
thank you for your availability
i've tried with VS 2017 (v.141 also) and VS 2019 but no more results...
Re: Plugin exportation
Posted: Mon Apr 18, 2022 6:43 pm
by daniel
Maybe I could try to compile it on my side if you want to test if that works better?
Re: Plugin exportation
Posted: Tue Apr 19, 2022 2:00 pm
by polienn
I would like to, thanks !
- myPlugin.rar
- plugin sources
- (23.24 KiB) Downloaded 1040 times
Re: Plugin exportation
Posted: Sun May 01, 2022 8:10 am
by daniel
Mind that the code was outdated (not compiling with the 2.12 version), so I had to update it here and there. Hopefully it works the same as intended.
Here is the binary:
And it will probably only work with the latest 2.12 version.
Re: Plugin exportation
Posted: Sun May 01, 2022 5:49 pm
by polienn
I'm quite surprised that it doesn't compile with 1.12 when I debugged it on 1.12 alpha...
But I just tested, the plugin loads well and the operation with the dataset is as expected
Thank you very much for getting this version to work !
Could I have the code with the modifications please?
Re: Plugin exportation
Posted: Tue May 03, 2022 6:48 pm
by daniel
Ah sorry I didn't keep it!
The modifications were quite easy (a missing 'nullptr' parameter twice, and the code to determine the best radius for the normals computation which has moved from the NormalVectors class to the octree - and with slightly more complex parameters, but you can copy paste what's done in the command line version of the normals computation).