[gs-bugs] [Bug 691461] Converting version 0.11 from C to C++ for use with MSVC++

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Fri Jul 16 14:31:38 UTC 2010


--- Comment #3 from Thomas Fobear <Tfobear at hotmail.com> 2010-07-16 14:31:37 UTC ---
Thank you Ken,

That issue is now resolved, however I am not going to mark this bug as
complete. I still have a ways to go untill this can be use as a win32 c++ lib.
I now have it compiling, but the linkage is incorrect and I am investigating
this now. Note that when I complete this solution I will post a detailed
description of this porting experience here, and a working standalone solution
for anyone who may have these issues in the future.

The latest error I get is in my DLL that references the library.

error LNK2019: unresolved external symbol "int __cdecl
jbig2_image_set_pixel(struct _Jbig2Image *,int,int,int)"
(?jbig2_image_set_pixel@@YAHPAU_Jbig2Image@@HHH at Z) referenced in function
_jbig2_image_compose_unopt    staticpdf.lib

notice I have already extern "C" the function _jbig2_image_compose_unopt int he
file jbig2_image.c

In fact when I follow the path to this code in my DLL which is referencing this
it starts at the function "jbig2_data_in" and propogates all the way down to
this error. when I extern "C" jbig2_image_set_pixel the same thing happens to
that function as jbig2_image_compose_unopt - The compiler dresses it with a
leading '_' while I am positive this is not really my problem I realize that,
well, I dont really realize what is going on :-X and so it might be worth

one other thing, jbig2_image_compose_unopt was not declared in any header file,
so I had added it to jbig2_priv.h where jbig2_image_compose was declared,
externing "C" the function definitions in that file (though I realize these are
private to the library, hense the _priv)

Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the gs-bugs mailing list