Compiling with Cimage use failed with link error.
Posted: Thu Mar 22, 2012 5:30 pm
I'm trying to make some use of CImage with jirr. Here is the generated code by swig for this:
Unfortunately I got a link error as follows:
I've double-checked my irrlicht lib & dll project, and make sure that Cimage.cpp is added to the project. I'm using VC++2008, on windows XP, any clue on this?
Code: Select all
SWIGEXPORT void JNICALL Java_net_sf_jirr_JirrJNI_CImage_1drawLine(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_, jlong jarg4, jobject jarg4_) {
irr::video::CImage *arg1 = (irr::video::CImage *) 0 ;
irr::core::vector2d< irr::s32 > *arg2 = 0 ;
irr::core::vector2d< irr::s32 > *arg3 = 0 ;
irr::video::SColor *arg4 = 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
(void)jarg2_;
(void)jarg3_;
(void)jarg4_;
arg1 = *(irr::video::CImage **)&jarg1;
arg2 = *(irr::core::vector2d< irr::s32 > **)&jarg2;
if (!arg2) {
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "irr::core::vector2d< irr::s32 > const & reference is null");
return ;
}
arg3 = *(irr::core::vector2d< irr::s32 > **)&jarg3;
if (!arg3) {
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "irr::core::vector2d< irr::s32 > const & reference is null");
return ;
}
arg4 = *(irr::video::SColor **)&jarg4;
if (!arg4) {
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "irr::video::SColor const & reference is null");
return ;
}
(arg1)->drawLine((irr::core::vector2d< irr::s32 > const &)*arg2,(irr::core::vector2d< irr::s32 > const &)*arg3,(irr::video::SColor const &)*arg4);
}
What confused me more is that the interfaces of the other classes seem to be all right after commenting1>jirr_wrap.obj : error LNK2019: unresolved external symbol "public: void __thiscall irr::video::CImage::drawLine(class irr::core::vector2d<int> const &,class irr::core::vector2d<int> const &,class irr::video::SColor const &)" (?drawLine@CImage@video@irr@@QAEXABV?$vector2d@H@core@3@0ABVSColor@23@@Z) referenced in function _Java_net_sf_jirr_JirrJNI_CImage_1drawLine@561
Code: Select all
(arg1)->drawLine((irr::core::vector2d< irr::s32 > const &)*arg2,(irr::core::vector2d< irr::s32 > const &)*arg3,(irr::video::SColor const &)*arg4);
I've double-checked my irrlicht lib & dll project, and make sure that Cimage.cpp is added to the project. I'm using VC++2008, on windows XP, any clue on this?