P
Pixel.to.life
Hi, Gurus,
I recently attempted to build a .Net forms application, that links
with old style unmanaged C++ static libs.
Of course I had to recompile the static lib projects to link properly
with the managed application.
My questions are two fold:
[1] The managed project uses /clr and /MDd (in debug) options. The
unmanaged project, when set to build with /clr, and /MDd, gives link
errors with the managed project:
1>Linking...
1>dcmdataD.lib(dcfilefo.obj) : error LNK2022: metadata operation
failed (8013118D) : Inconsistent layout information in duplicated
types (OFConsole): (0x0200007c).
1>dcmdataD.lib(dcfilefo.obj) : error LNK2022: metadata operation
failed (8013118D) : Inconsistent layout information in duplicated
types (OFGlobal<bool>): (0x020000bd).
1>dcmdataD.lib(dcsequen.obj) : error LNK2022: metadata operation
failed (8013118D) : Inconsistent layout information in duplicated
types (OFConsole): (0x0200007e).
......
Why?
[2] If I change the unmanaged project to build with no clr option, it
then links fine with the managed application module. However, this
time I get a run time access violation as soon as the first global
variable is declared inside the unmanaged code:
/* ---------- global condition constants ---------- */
Why?
I am very much exhausted with things to try.
Any input will be much appreciated.
Thanks.
Pixel.To.Life
[http://groups.google.com/group/medicalimagingscience]
I recently attempted to build a .Net forms application, that links
with old style unmanaged C++ static libs.
Of course I had to recompile the static lib projects to link properly
with the managed application.
My questions are two fold:
[1] The managed project uses /clr and /MDd (in debug) options. The
unmanaged project, when set to build with /clr, and /MDd, gives link
errors with the managed project:
1>Linking...
1>dcmdataD.lib(dcfilefo.obj) : error LNK2022: metadata operation
failed (8013118D) : Inconsistent layout information in duplicated
types (OFConsole): (0x0200007c).
1>dcmdataD.lib(dcfilefo.obj) : error LNK2022: metadata operation
failed (8013118D) : Inconsistent layout information in duplicated
types (OFGlobal<bool>): (0x020000bd).
1>dcmdataD.lib(dcsequen.obj) : error LNK2022: metadata operation
failed (8013118D) : Inconsistent layout information in duplicated
types (OFConsole): (0x0200007e).
......
Why?
[2] If I change the unmanaged project to build with no clr option, it
then links fine with the managed application module. However, this
time I get a run time access violation as soon as the first global
variable is declared inside the unmanaged code:
/* ---------- global condition constants ---------- */
Why?
I am very much exhausted with things to try.
Any input will be much appreciated.
Thanks.
Pixel.To.Life
[http://groups.google.com/group/medicalimagingscience]