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"

038 error when using static library containing ?! Has anyone linked a static library that use vectors?

I have created a static library which uses vector<> which keeps throwing up errors when I try to build. Initially I had an issue with the Debug_iterator_level being 2 instead of 0 which I fixed by changing in manually. However now I am getting the following error:

 Error    LNK2038    mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in SharedPCH.Engine.h.obj    TheTable    C:\Users\rr91\Documents\Unreal Projects\03_BuildingEscape\TheTable\Intermediate\ProjectFiles\MathFuncsLib.lib(MathFuncsLib.obj)    1    

Interestingly, when I remove all instances of stl vector<> from my static library and then link it, the project manages to build fine. Does anyone know what could be causing this issue?

Product Version: UE 4.16
more ▼

asked Sep 07 '17 at 10:11 PM in C++ Programming

avatar image

6 2 5 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

You are linking a library built in Debug (so against Debug standard libs) with an engine built in Development (which links against Release standard libs). Those libraries are not binary compatible.

more ▼

answered Sep 07 '17 at 10:16 PM

avatar image

2.7k 59 6 88

avatar image raza91 Sep 07 '17 at 11:51 PM

Thanks for your reply! Although when I change from debug to release I get a new error:

 Error    C1900    Il mismatch between 'P1' version '20161212' and 'P2' version '20150812'    TheTable    C:\Users\rr91\Documents\Unreal Projects\03_BuildingEscape\TheTable\Intermediate\ProjectFiles\EXEC    1    

Any chance you know where this is coming from? I am using the same version of VS 2017 for unreal and to create my static library. It may be better if I ask this as a standalone question for anyone else having similar issues.

avatar image RCL STAFF Sep 08 '17 at 01:56 PM

For Microsoft compiler, the library needs to be compiled with exactly the same compiler version as the engine. Make sure that you are using Visual Studio 2015 Update 3 for compiling the library.

avatar image raza91 Sep 08 '17 at 05:11 PM

Thank you, using VS 2015 update 3 fixed my problem

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
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