PixInsight Forum (historical)
Software Development => PCL and PJSR Development => Topic started by: Carlos Milovic on 2011 June 10 23:44:23
-
I'm getting the following exit error by the compiler:
./x86_64/Release/InterChannelCurvesParameters.o: In function `pcl::ICCCurvePointValue::ICCCurvePointValue(pcl::MetaTable*)':
InterChannelCurvesParameters.cpp:(.text+0xfd5): undefined reference to `pcl::CurvePointValue::CurvePointValue(pcl::MetaTable*)'
./x86_64/Release/InterChannelCurvesParameters.o: In function `pcl::CurvePointValue::~CurvePointValue()':
InterChannelCurvesParameters.cpp:(.text._ZN3pcl15CurvePointValueD2Ev[_ZN3pcl15CurvePointValueD5Ev]+0x5): undefined reference to `vtable for pcl::CurvePointValue'
/usr/bin/ld: ./x86_64/Release/InterChannelCurvesParameters.o: relocation R_X86_64_PC32 against undefined hidden symbol `vtable for pcl::CurvePointValue' can not be used when making a shared object
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make: *** ["/home/cmilovic/Development/Working/InterChannelCurves/linux/g++/x86_64/Release"/InterChannelCurves-pxm.so] Error 1
And here is part of the Parameters.h and Parameters.cpp files:
class ICCCurvePointValue : public CurvePointValue
{
public:
ICCCurvePointValue( MetaTable* );
virtual IsoString Id() const = 0;
virtual double MinimumValue() const;
virtual double MaximumValue() const;
virtual bool IsX() const = 0;
};
#define DECLARE_ICCCURVE_POINT_VALUE_PARAMETER( classId, parId, isX ) \
class classId; \
extern classId* The##classId##Parameter; \
class classId : public ICCCurvePointValue \
{ \
public: \
classId( MetaTable* t ) : ICCCurvePointValue( t ) \
{ if ( The##classId##Parameter == 0 ) The##classId##Parameter = this; } \
virtual IsoString Id() const { return parId; } \
virtual bool IsX() const { return isX; } \
}
DECLARE_ICCCURVE_POINT_VALUE_PARAMETER( XICC, "x", true );
DECLARE_ICCCURVE_POINT_VALUE_PARAMETER( YICC, "y", false );
ICCCurvePointValue::ICCCurvePointValue( MetaTable* t ) : CurvePointValue( t )
{
}
double ICCCurvePointValue::MinimumValue() const
{
return -1.0;
}
double ICCCurvePointValue::MaximumValue() const
{
return 1.0;
}
Any idea of where is the problem?
I'm working over the code of ColorSaturation, and just changed the names of several parameters...
Also, I have one doubt. CurveBase.h has included the parameters from the CurvesTransform process... Is it safe to remove that, or do I need to include them too? I'm going down the safe road, and doing the latter...
-
Just a wild guess: Is CurvesTransformationParameters.cpp (or the corresponding .o-file) part of your project?
Georg
-
yes
-
undefined reference to `pcl::CurvePointValue::CurvePointValue(pcl::MetaTable*)'
undefined reference to `vtable for pcl::CurvePointValue'
Your project is missing the implementation of CurvePointValue. You have declared this class, but the definition is either lacking or incomplete.
CurvePointValue is declared in CurvesTransformationParameters.h. Most of its member functions are defined in CurvesTransformationParameters.cpp. As Georg has pointed out, this file is probably missing in your project, or for some reason it is not being compiled (for example, due to misplaced/incorrect #defines).
Also, I have one doubt. CurveBase.h has included the parameters from the CurvesTransform process... Is it safe to remove that, or do I need to include them too?
Since your process (InterChannelCurves —by the way, I don't like that name :) ) is sharing some metaparameters with CurvesTransformation, you definitely need to include CurvesTransformationParameters.h and CurvesTransformationParameters.cpp in your project. There should be no problem in doing that; after all, this is now happening with ColorSaturation. Follow the latter as an example to implement your code —you already are doing that.
How about:
FlexibleCurvesTM
? :)
-
...
FlexibleCurvesTM
Finally going into marketing ? ;)
-
...
FlexibleCurvesTM
Finally going into marketing ? ;)
8)
-
My bad :P Indeed I was not including CurvesTransformParameters.cpp... now it compiles. But, now I'm getting this error when installing the module:
undefined symbol:
_ZNK3pcl9CurveBase16InitInterpolatorEv): Module load error
:S
-
Probably another file you need to add. To demangle symbols, try this:
> c++filt _ZNK3pcl9CurveBase16InitInterpolatorEv
pcl::CurveBase::InitInterpolator() const
Georg
-
This is making me mad... To test if the problem was something I did to the code, I decided to just copy the IntensityTransform module, delete the innecesary files (just left the *Module.*, ColorSaturation*.* and CurvesTransformParameters.* codes, commenting the module.cpp).
This compiles fine, but throws the same error at installation as in my previous message. Which other file do I need to include? Compiling the whole module works...
-
CurveBase::InitInterpolator() is defined in CurvesTransformtionInstance.cpp (I would have expected it in CurveBase.cpp, but that does not exist).
Georg
-
Pfff..... thanks Georg ;)
-
Eureka! Adding the definition to my Instance.cpp file solved the issue :) New module soon ;)