# FFbxImporter in an editor plugin (LNK2019)

**URL:** <https://forums.unrealengine.com/t/ffbximporter-in-an-editor-plugin-lnk2019/364439>\
**Category:** Plugins\
**Tags:** linker, library, unreal-engine, FBX, Plugins, question, CPP\
**Created:** [July 19, 2016, 12:36am UTC](https://forums.unrealengine.com/t/ffbximporter-in-an-editor-plugin-lnk2019/364439 "2016-07-19T00:36:21Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![MichaelWion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MichaelWion](https://forums.unrealengine.com/u/MichaelWion)\
**Post date:** [July 19, 2016, 12:36am UTC](https://forums.unrealengine.com/t/ffbximporter-in-an-editor-plugin-lnk2019/364439/1 "2016-07-19T00:36:21Z")

</div>

I’m trying to gain access to the methods found in `"Editor/UnrealEd/Private/FbxImporter.h"`.

I’m incredibly close to getting things to compile, with the exception of unresolved linker errors pertaining to any of the `FFbxImporter:*` functions that my plugin attempts to use.

Am I missing something in my plugin’s `build.cs` file?

```
namespace UnrealBuildTool.Rules
{
    public class MyFbxEditor : ModuleRules
    {
        private string ModulePath
        {
            get { return ModuleDirectory; }
        }

        public MyFbxEditor(TargetInfo Target)
        {
            PublicIncludePaths.AddRange(new string[] {
                "MyFbxEditor/Public",
                "AssetTools/Public",
                "Editor/UnrealEd/Public",
                "Editor/UnrealEd/Classes"
            });
            
            PrivateIncludePaths.AddRange(new string[] {
                "MyFbxEditor/Private",
                "UnrealEd/Private/Settings",
                "Editor/UnrealEd/Private",
                "Editor/UnrealEd/Private/Fbx"
            });

            AddEngineThirdPartyPrivateStaticDependencies(Target, "FBX");

            PublicDependencyModuleNames.AddRange(new string[] {
                "MyFbxPlugin",
                "Core",
                "CoreUObject",
                "Engine",
                "InputCore",
                "UnrealEd",
                "AssetTools",
                "EditorStyle",
                "FBX"
            });

            PrivateDependencyModuleNames.AddRange(new string[] {
                "MyFbxPlugin",
                "SlateCore",
                "Slate",
                "AssetTools",
                "UnrealEd",
                "FBX"
            });
        }
    }
}

```

I am using the GitHub source version of 4.12

---

<div class="post-metadata">

**Author:** ![rantrod](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rantrod](https://forums.unrealengine.com/u/rantrod)\
**Post date:** [July 19, 2016, 1:35am UTC](https://forums.unrealengine.com/t/ffbximporter-in-an-editor-plugin-lnk2019/364439/2 "2016-07-19T01:35:26Z")

</div>

What is the error?

Here’s a link that might help: [Cannot open include file: 'FbxImporter.h': No such file or directory - Pipeline & Plugins - Epic Developer Community Forums](https://answers.unrealengine.com/questions/446656/cannot-open-include-file-fbximporterh-no-such-file.html)

---

<div class="post-metadata">

**Author:** ![MichaelWion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MichaelWion](https://forums.unrealengine.com/u/MichaelWion)\
**Post date:** [July 19, 2016, 2:40am UTC](https://forums.unrealengine.com/t/ffbximporter-in-an-editor-plugin-lnk2019/364439/3 "2016-07-19T02:40:01Z")

</div>

I’ve already seen that post you’ve linked. It didn’t help, as it didn’t pertain to my issue at all.

As described in the title and in the post, they are unresolved linker errors (LNK2019) pertaining to any of the `FFbxImporter:*` functions that my plugin attempts to use.  
The includes aren’t an issue. The compiler finds them perfectly fine, but the linker can’t find the libs for the functions defined in `"Editor/UnrealEd/Private/FbxImporter.h"`

---

<div class="post-metadata">

**Author:** ![MichaelWion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MichaelWion](https://forums.unrealengine.com/u/MichaelWion)\
**Post date:** [July 19, 2016, 2:45am UTC](https://forums.unrealengine.com/t/ffbximporter-in-an-editor-plugin-lnk2019/364439/4 "2016-07-19T02:45:22Z")

</div>

Here’s an example… If I try to use `FFbxImporter::OpenFile`, the error is:

`Module.MyFbxEditor.cpp.obj : error LNK2019: unresolved external symbol "public: bool __cdecl UnFbx::FFbxImporter::OpenFile(class FString,bool,bool)" (?OpenFile@FFbxImporter@UnFbx@@QEAA_NVFString@@_N1@Z) referenced in function "public: virtual void__cdecl MyFbxEditor::StartupModule(void)" (?StartupModule@MyFbxEditor@@UEAAXXZ) 49>D:\Projects\PluginTest\Plugins\MyFbx\Binaries\Win64\UE4Editor-MyFbxEditor-Win64-DebugGame.dll : fatal error LNK1120: 1 unresolved externals`

This leads me to believe I am missing a public/private dependency within my `build.cs` file. But the problem is figuring out what it is that I’m missing, as it appears to me that I have everything I need in order for this to work.

---

<div class="post-metadata">

**Author:** ![MichaelWion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MichaelWion](https://forums.unrealengine.com/u/MichaelWion)\
**Post date:** [July 20, 2016, 2:52am UTC](https://forums.unrealengine.com/t/ffbximporter-in-an-editor-plugin-lnk2019/364439/5 "2016-07-20T02:52:54Z")

</div>

I’ve now made it to where I’m able to use the FBX SDK directly, but it’d still be nice if anybody knows what’s stopping me from using UE4’s frontend for it (i.e., `FFbxImporter::*` ).

---

<div class="post-metadata">

**Author:** ![rantrod](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rantrod](https://forums.unrealengine.com/u/rantrod)\
**Post date:** [July 20, 2016, 5:39am UTC](https://forums.unrealengine.com/t/ffbximporter-in-an-editor-plugin-lnk2019/364439/6 "2016-07-20T05:39:47Z")

</div>

Just to be sure, I think this is how you’re supposed to use it (using import as an example):  
UnFbx::FFbxImporter\* FFbxImporter = UnFbx::FFbxImporter::GetInstance();  
if (FFbxImporter-\>ImportFromFile(ImportFilename, FileExtension ))…

---

<div class="post-metadata">

**Author:** ![MichaelWion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MichaelWion](https://forums.unrealengine.com/u/MichaelWion)\
**Post date:** [July 20, 2016, 7:09am UTC](https://forums.unrealengine.com/t/ffbximporter-in-an-editor-plugin-lnk2019/364439/7 "2016-07-20T07:09:49Z")

</div>

Dude… I appreciate the help and all, but like I said, it’s a standard linker error. I can’t actually use any of those functions, because the linker complains that it can’t find the definitions ( `*.obj`, `*.lib`, `*.dll` ) for them. That means the declarations ( `*.h` ) exist for them, but their actual implementations ( `*.cpp` ) couldn’t be found after the compiler finished it’s job.  
You should probably google `LNK2019` if you don’t understand what I’m talking about. It’s one of the most common linker errors out there.

---

<div class="post-metadata">

**Author:** ![MichaelWion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MichaelWion](https://forums.unrealengine.com/u/MichaelWion)\
**Post date:** [July 23, 2016, 8:36am UTC](https://forums.unrealengine.com/t/ffbximporter-in-an-editor-plugin-lnk2019/364439/8 "2016-07-23T08:36:12Z")

</div>

So nobody else knows how to gain access to that class without linker errors?  
I guess I’ll just have to use the FBX SDK directly until 4.13 releases, as I’ve heard there will be better support for working with FBX files via C++

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a89a4458](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a89a4458](https://forums.unrealengine.com/u/anonymous_user_a89a4458)\
**Post date:** [February 21, 2017, 7:41pm UTC](https://forums.unrealengine.com/t/ffbximporter-in-an-editor-plugin-lnk2019/364439/9 "2017-02-21T19:41:56Z")

</div>

I know this is old, but did you manage to resolve this issue? I’m currently having the exact same issue with UE4.15.

---

<div class="post-metadata">

**Author:** ![kamrann](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kamrann](https://forums.unrealengine.com/u/kamrann)\
**Post date:** [June 17, 2017, 9:04am UTC](https://forums.unrealengine.com/t/ffbximporter-in-an-editor-plugin-lnk2019/364439/10 "2017-06-17T09:04:05Z")

</div>

This can’t be done without modifying the engine. Classes need to be marked as exported (prefixed with THEMODULENAME\_API) for you to be able to use them across modules. If the class is not (as in this case), the only option is to modify the engine code with the prefix.

If you do this, you should ideally then submit a pull request to Epic, they are generally pretty willing to accept these kind of PRs into the engine.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0dafa81b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0dafa81b](https://forums.unrealengine.com/u/anonymous_user_0dafa81b)\
**Post date:** [June 23, 2017, 10:09am UTC](https://forums.unrealengine.com/t/ffbximporter-in-an-editor-plugin-lnk2019/364439/11 "2017-06-23T10:09:05Z")

</div>

Is there any other way to load 3D Model file in Game while it is running.I am loading 3d model using Runtime Mesh Component but it is slow down my fps.

---

<div class="post-metadata">

**Author:** ![MichaelWion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MichaelWion](https://forums.unrealengine.com/u/MichaelWion)\
**Post date:** [July 14, 2017, 6:43pm UTC](https://forums.unrealengine.com/t/ffbximporter-in-an-editor-plugin-lnk2019/364439/12 "2017-07-14T18:43:12Z")

</div>

It was a long time ago for a now-abandoned project, but IIRC, I got around this by simply integrating the FBX SDK directly into my project, and properly setting up my [Module Rules to include Third Party software](https://docs.unrealengine.com/latest/INT/Programming/UnrealBuildSystem/ModuleFiles/index.html).

Also note that the answer below is correct… you could always modify a GitHub source build of the engine to change the export prefixes for the included `FFbxImporter`. But if you aren’t comfortable with going down that highly error-prone road, simply include the FBX SDK yourself, as described above.

---

<div class="post-metadata">

**Author:** ![MichaelWion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MichaelWion](https://forums.unrealengine.com/u/MichaelWion)\
**Post date:** [July 14, 2017, 6:49pm UTC](https://forums.unrealengine.com/t/ffbximporter-in-an-editor-plugin-lnk2019/364439/13 "2017-07-14T18:49:04Z")

</div>

Yes. You can manually import the FBX SDK directly into your project as a third party software (see my comment above). Be aware, however, that you will be working with the SDK and not with the wrapper classes (such as `FFbxImporter`) that the engine provides, which means you will also be responsible for data management and rendering/RHI… So if this is an issue, then I’m afraid the only solution is to modify a source build of the engine, as described in this answer.

---

<div class="post-metadata">

**Author:** ![Rect\_vv](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rect_vv/32/564821_2.png) [@Rect\_vv](https://forums.unrealengine.com/u/Rect_vv)\
**Post date:** [August 19, 2022, 3:24am UTC](https://forums.unrealengine.com/t/ffbximporter-in-an-editor-plugin-lnk2019/364439/14 "2022-08-19T03:24:54Z")

</div>

if u want to call FFbxImporter::GetSceneInfo , please try to add UNREALED\_API before bool GetSceneInfo , like:

old: bool GetSceneInfo  
new: UNREALED\_API bool GetSceneInfo
