ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Objectarx2012 & vc90 with "/MDd" runtime options ...

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
leonimas
839 Views, 10 Replies

Objectarx2012 & vc90 with "/MDd" runtime options ...

Hi to all,

I'm developing with vc90 & ObjectARx2012; I've noticed that ObjectArx Wizard

set the runtime lib to /MD, though the vc project is in Debug config.

 

Is it possible generate an objectarx with the runtime lib setted to "/MDd" ?

 

How must change my code/vs settings ?

 

Best Regards

Leonard

 

 

10 REPLIES 10
Message 2 of 11
maisoui
in reply to: leonimas

Hi,

 

It's not possible, because Autodesk does not provide a debug build of AutoCAD. So you need to specify /Md in Debug (and Release) to have the use the same version of C++ redistributables. (remember to undefine _DEBUG).

 

Regards,

--
Jonathan
Message 3 of 11
leonimas
in reply to: maisoui

Hi,

 

thanks in advace to your reply; my problem is the following: i'm developing

an objectarx plugin that links an external static vc90 lib (graph-dbg.lib).

 

This lib is compiled in debug mode as /MDd; if I set the arx project to /MD the

lib crash at runtime, but if I set te arx project to /MDd the lib works. The

graph-dbg.lib linked to a NO arx project works perfectly ...

 

But it's impossible to develop an arx plugin with /MDd, for example If I use

an MFC Dialog resource, acad crash ...

 

I'm very confused ... why the static lib goes in crash ? Must I use a release

graph.lib version ?

 

Many Thanks

Leonard

 

 

Message 4 of 11
maisoui
in reply to: leonimas

Yes, you need to use release version of your external libs or rebuild them with /Md flag for DEBUG. I encounter the same problem, but this is the only solution. It is very painful especially when you have a lot of external libs. I use Qt and I must make custom builds to use it properly.

 

Regards,

--
Jonathan
Message 5 of 11
leonimas
in reply to: maisoui

Thanks,

but If I rebuild the graph.lib with "/MDd" option (debug mode), the lib goes in crash.

With objectarx "/MDd" & graph.lib "/MDd" the static lib works ... 😞

 

Regards,

 

Leonard

Message 6 of 11
maisoui
in reply to: leonimas

I don't know your graph.lib but maybe you need to ignore some default libs like msvcrtd.lib and don't forget to undefine _DEBUG (or DEBUG) preprocessor variable.

Regards,

--
Jonathan
Message 7 of 11
leonimas
in reply to: maisoui

Hi jonathan,

in my project graph.lib I have:

 

1) preprocessor -> _HAS_CPP0X=0;WIN32; and stop.

2) runtime lib -> DLL debug multithread (/MDd)

3) general -> static library (lib) - Use MFC as shared DLL

 

when run objectarx it crash in wincore.cpp:

 

....

        // call original wndproc for default handling
        if (bCallDefault)
 -->          lResult = CallWindowProc(oldWndProc, hWnd, nMsg, wParam, lParam);

....


During the objectarx linking I see 3 warning msg:

 

LINK : warning LNK4098: defaultlib 'mfc90ud.lib' conflicts with use of other libs

LINK : warning LNK4098: defaultlib 'mfcs90ud.lib' conflicts with use of other libs;

LINK : warning LNK4098: defaultlib 'msvcrtd.lib.lib' conflicts with use of other libs;

 

Regards

Leonard

Message 8 of 11
maisoui
in reply to: leonimas

You need to build with /Md and not /MDd!

--
Jonathan
Message 9 of 11
leonimas
in reply to: maisoui

Strange, in my vs2010 (with vc90) the options only are:

 

/MD or /MDd ... (and /MT, /MTd)

 

with /Md vs throw an error message

 

... Microsoft.Cpp.Win32.Targets(62,5): error : The element <RuntimeLibrary> has an invalid value "Debug multithread (/Md)".

 

 

Message 10 of 11
maisoui
in reply to: leonimas

yes sorry, it's /MD

--
Jonathan
Message 11 of 11
leonimas
in reply to: maisoui

Hi Jonathan,

works 🙂 !!! Many thanks for your support !

 

Best Regards

Leonard

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost