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
Solved! Go to Solution.
Solved by maisoui. Go to Solution.
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,
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
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,
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
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,
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
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)".