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"

GeneratedMeshComponent: LNK2019 MemoryBarrier

Hello :)

After integrating the example for generating mesh components at runtime (https://wiki.unrealengine.com/Procedural_Mesh_Generation - I took the code from the github example (ProceduralMeshComponent)) in my Unreal Engine 4.7.6 project I faced the following error:

 error LNK2019: unresolved external symbol ""__declspec(dllimport) public: static void __cdecl FWindowsPlatformMisc::MemoryBarrier(void)" (__imp_?MemoryBarrier@FWindowsPlatformMisc@@SAXXZ)" in Function ""public: struct FLockFreeVoidPointerListBase::FLink * __cdecl FLockFreeVoidPointerListBase::FLinkAllocator::AllocateLink(void *)" (?AllocateLink@FLinkAllocator@FLockFreeVoidPointerListBase@@QEAAPEAUFLink@2@PEAX@Z)".    [...]\Intermediate\ProjectFiles\GeneratedMeshComponent.cpp.obj

I had this error already before (in my 1 week since I'm working with Unreal) and solved it by implementing

 static void MemoryBarrier() { }

(as shown here: https://answers.unrealengine.com/questions/190406/project-fails-to-compile.html). This method is still there but that doesn't seem to influence the error since this searches for an dll (__declspec(dllimport)). My first thought was to rebuild the engine so that the above fix is contained in the dll. But by doing so, I recognized that VS2013 only printed 2 lines at build:

 1>------ Build started: Project: UE4, Configuration: BuiltWithUnrealBuildTool v64 ------
 ========== Build: 1 successful, 0 error, 0 actual, 0 skipped==========

(freely translated from german). I guess this is due to the given command lines in the project properties under "NMake" with are:

 @rem Nothing to do.

Is this due to, that I have invoked "Generate project files" on my project? I don't have any clue how to solve this error or even how to rebuild the engine (if this would even help). I appreciate any help! :)

I hope, I mentioned all important things, you need to know.

Thank you very much!

Product Version: Not Selected
Tags:
more ▼

asked Apr 28 '15 at 08:09 AM in C++ Programming

avatar image

mgreg
36 1 7 6

avatar image mgreg May 01 '15 at 09:09 AM

Does no one have any idea? Please help, I'm totally stuckon this :(

avatar image mgreg May 06 '15 at 05:27 PM

I've tested today to implement the procedural mesh component in a new project. Unfortunately with no success (same error as above).

Something I didn't mentioned above: I had to change the code in order to compile with Unreal Engine 4.7.6 (I think that this is due to version differences). Things I changed:

  • SafeNormals() to GetSafeNormals()

  • GetTypedData() in GetData()

  • OVERRIDE in override

  • FPostConstructInitializeProperties in FObjectInitializer

  • the line "MaterialProxy = &WireframeMaterialInstance;" in "MaterialProxy = WireframeMaterialInstance;" (error: FColorMaterialRenderProxy* couldn't be converted in FMaterialRenderProxy)

Nothing really special, but maybe it helps finding a solution!

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

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