x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to link external static libraries in debug mode

Hi all,

I have been not able to correctly link my static debug library to link correctly. Everything works fine in the release mode however.

In debug mode I get the following error :

 Error    LNK2038    mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in Engine.h.obj    
 Error    LNK2038    mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in Engine.h.obj    
 

I have created a Type.External Module to wrap my third party library and placed it in the source folder along with the game and the editor modules of my plugin.

I need this because I want to be able to step through the code of the external library after hitting a breakpoint in order to detect and fix issues.

However, I can't, for the life of me, find a way so that I can step through the code in the external library in debug mode. Any and all help on this will be highly appreciated !

Best, darkZ

Product Version: UE 4.10
Tags:
more ▼

asked Feb 22 '16 at 02:44 AM in C++ Programming

avatar image

darkZ
263 18 21 37

avatar image darkZ Feb 22 '16 at 04:35 AM

So after playing around with this for the whole day I have had some success by building a release library with debug information and optimizations disabled. But if there's a correct way of linking actual Debug libraries I am still interested in hearing about possible solutions. Thanks !

avatar image CatsNipYummy Oct 05 '18 at 12:01 AM

Can you explain how you got it to work? I'm facing the same issue.

avatar image Begounet Oct 05 '18 at 08:07 AM

Got same issue long time ago. If I remember correctly, you have to rebuild your external library and change a setting in the Visual Studio's project settings. So open your library solution, access the project properties, go to C/C++ > Code Generation and find the line "Runtime Library". Here you have the choice between : - Multi-threaded (/MT) - Multi-threaded Debug (/MTd) - Multi-threaded DLL (/MD) - Multi-threaded Debug DLL (/MDd)

"MDd_DynamicDebug" means "Multi-threaded Debug DLL (/MDd)" is used. "MD_DynamicRelease" means "Multi-threaded DLL (/MD)" is used.

This setting should match the value in your error message. So you should use "Multi-threaded DLL (/MD)" when compiling your library (if I understood correctly).

More informations are provided here : https://stackoverflow.com/questions/28887001/lnk2038-mismatch-detected-for-runtimelibrary-value-mt-staticrelease-doesn#28887127 and here : https://msdn.microsoft.com/fr-fr/library/2kzt1wy3.aspx

(comments are locked)
10|2000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question