Multi-Threaded DLL (/MD) [SOLVED]



  • On 15/06/2015 at 01:53, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   R14 
    Platform:   Windows  ;   
    Language(s) :     C++  ;

    ---------
    Hi,

    Is it possible to build as Multi-Threaded DLL (/MD) as opposed to the normal Multi-Threaded (/MT)?

    The reason i ask is that i'm including an external lib and my project refuses to build in MS 2010 with MSVCPRT.lib LNK2005 error.  When i build as /MD it builds successfully but crashes C4D as soon as it hit's the first bit of code in my GVO function..

    Ignoring MSVCPRT in the Linker throws a whole bunch of Unresolved External errors from the library i'm including..

    So kinda stuck at this point, have tried a number of things up until now to get this to run :/



  • On 15/06/2015 at 10:13, xxxxxxxx wrote:

    Hi,

    since R16 plugins are build with /MD by default.
    And it is possible to change this for older SDK/Cinema versions as well. I just tried it here with one of my private plugins in R14. No problems after switching to /MD.
    But you need to make sure, that all libraries you are using in your project are using the same settings. Maybe you need to change Compile/Link settings of other parts of your project.
    Or, just thinking, the crash isn't related to this setting at all?



  • On 15/06/2015 at 15:26, xxxxxxxx wrote:

    Thanks for the confirmation that in theory it IS possible Andreas.

    I'll investigate this a little further as i've been chopping and changing so many settings etc..  Will go back to basic plugin with no externals and attempt build with MD then go from there..


Log in to reply