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"

Uninitialized memory in plugin

I am developing a plugin for UE4 that integrates a third-party static library. The plugin initializes the library in the StartupModule function and then exposes the library's headers to game code in order to be able to work directly with it.

I am having two issues. Despite the StartupModule function properly initializing the library any game code that references the library sees it as uninitialized memory. For example, there are classes with static functions and variables that get initialized on startup and populate correctly. If I attempt to access that static class and retrieve the variable data it's null from inside the game code.

To get around this I have attempted to wrap the library code from within the plugin itself. So now I have accessors inside the primary Module class that should provide access to the same instance that was initialized by the plugin. The problem with this approach is that the game module fails to link against the plugin, claiming that the module's functions/variables symbols cannot be found. So it appears to not actually be linking to module properly despite me having added it to PublicDependencyModuleNames, PrivateDependencyModuleNames, PrivateIncludePathModuleNames, and PublicIncludePathModuleNames.

Why is this happening and how can I get this plugin/library successfully integrated?

Thanks in advance!

Product Version: UE 4.19
more ▼

asked Nov 09 '18 at 12:02 AM in C++ Programming

avatar image

1 1

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

1 answer: sort voted first

I figured it out the second issue. I was missing the XXXXX_API identifier in my module's class declaration. Everything compiles and works now by providing access through the module object.

more ▼

answered Nov 13 '18 at 09:39 PM

avatar image

1 1

(comments are locked)
10|2000 characters needed characters left
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