# Inheriting From FRunnable

**URL:** <https://forums.unrealengine.com/t/inheriting-from-frunnable/361018>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [June 16, 2016, 8:01pm UTC](https://forums.unrealengine.com/t/inheriting-from-frunnable/361018 "2016-06-16T20:01:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jman2015](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jman2015](https://forums.unrealengine.com/u/jman2015)\
**Post date:** [June 16, 2016, 8:01pm UTC](https://forums.unrealengine.com/t/inheriting-from-frunnable/361018/1 "2016-06-16T20:01:02Z")

</div>

I am attempting to write a class that extends FRunnable that will communicate with bluetooth devices. However when I compile I get an error:

CompilerResultsLog: Info Error: Couldn’t find parent type for ‘BluetoothConnector’ named ‘FRunnable’ in current module or any other module parsed so far.  
CompilerResultsLog:Error: Error C:/dev/projects/ue4/MyProject/Source/MyProject/BluetoothConnector.h(17) : Class ‘FRunnable’ not found.

There is nothing yet added to the cpp file but here is the header file. Everything is commented out so I know its not creating the issue. This is in the Core directory so I shouldn’t need to add anything to the Build.cs file. I’m at a loss for what I am missing.

```
#pragma once

#include "Object.h"
#include "bluetoothapis.h"
#include "AllowWindowsPlatformTypes.h"
#include "HideWindowsPlatformTypes.h"
#include <WinSock2.h>
#include <ws2bth.h>
#include "BluetoothConnector.generated.h"

/**
 * 
 */
UCLASS()
class MYPROJECT_API UBluetoothConnector : public FRunnable
{
	GENERATED_BODY()
	
        //Contstructor    
    //public:
        //BluetoothConnector();
        //virtual ~BluetoothConnector();

        //Private attributes
    //private:
        //SOCKET bluetoothSocket;
        //SOCKET connected;
        //FThreadSafeCounter stopTaskCounter;
        //static BluetoothConnector* connector;
        //FRunnableThread* thread;

    //public:
        //virtual bool Init();
        //virtual uint32 Run();
        //virtual void Stop();

        //Public methods
    //public:
        //void EnsureCompletion();
        //static void joyInit();
        //static void shutdownThread();
};
```

---

<div class="post-metadata">

**Author:** ![UPO33](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@UPO33](https://forums.unrealengine.com/u/UPO33)\
**Post date:** [August 7, 2016, 7:44am UTC](https://forums.unrealengine.com/t/inheriting-from-frunnable/361018/2 "2016-08-07T07:44:35Z")

</div>

UCLASS needs UObject-based parent class
