[vtkusers] vtkMFC as .dll vs static library

David Cole david.cole at kitware.com
Fri Feb 6 13:00:25 EST 2009


On Thu, Feb 5, 2009 at 11:33 PM, Alon Mozes <amozes77 at yahoo.com> wrote:

> I have carefully cleaned, rebuilt and compiled vtk, itk, and my project
> using only "MT(d)" references.  I can now compile and link with no errors.
>

Excellent...



> But when I launch the app............. 0x027CB6B0, 296 bytes long.
> Data: < g& > CD CD CD CD 00 00 00 00 C0 67 26 03 CD CD CD CD
> Object dump complete.
> The program '[85320] .exe: Native' has exited with code 1 (0x1).
>
> Is this still related to a linker error?
>

No, probably not. (Since you do not have the linker error anymore, but this
is still happening...)


>   Does delay loading play a role even though I'm statically linking?
>

No, it shouldn't -- if you are statically linking everything, then there is
nothing to delay load...


>   Any tips on figuring it out from here?
>

Two things to try:
(1) Choose "Debug > Exceptions" from the Visual Studio menu bar and check
all the boxes to break when an exception is thrown. If one is thrown, copy
and paste the call stack and send it to the mailing list.
(2) Step into your program with the debugger ("Debug > Step Into" in the
menu) and single step to see who is returning the "1" exit code. (Or just
run, and set a breakpoint in the MFC leak reporting code and see how it's
being called...)


HTH,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090206/4f5c146c/attachment.htm>


More information about the vtkusers mailing list