# Syntax error in RawMesh.h?

**URL:** <https://forums.unrealengine.com/t/syntax-error-in-rawmesh-h/438720>\
**Category:** Community & Industry Discussion\
**Tags:** library, syntax, unreal-engine, UE4, question\
**Created:** [December 3, 2018, 2:24pm UTC](https://forums.unrealengine.com/t/syntax-error-in-rawmesh-h/438720 "2018-12-03T14:24:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_0d31d05f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0d31d05f](https://forums.unrealengine.com/u/anonymous_user_0d31d05f)\
**Post date:** [December 3, 2018, 2:24pm UTC](https://forums.unrealengine.com/t/syntax-error-in-rawmesh-h/438720/1 "2018-12-03T14:24:27Z")

</div>

C2144 syntax error: ‘void’ should be preceded by ‘;’ \RawMesh\Public\RawMesh.h → Line 58   
C4430 missing type specifier - int assumed. Note: C++ does not support default-int \RawMesh\Public\RawMesh.h → Line58

Surprisingly, the first time reporting error in the internal UE4 library files. Every RAWMESH\_API functions have red underlines

RAWMESH\_API functions with red underline:

```
	/** Empties all data streams. */
	RAWMESH_API void Empty();

	/** 
	 * Returns true if the mesh contains valid information.
	 * - Validates that stream sizes match.
	 * - Validates that there is at least one texture coordinate.
	 * - Validates that indices are valid positions in the vertex stream.
	 */
	RAWMESH_API bool IsValid() const;

	/** 
	 * Returns true if the mesh contains valid information or slightly invalid information that we can fix.
	 * - Validates that stream sizes match.
	 * - Validates that there is at least one texture coordinate.
	 * - Validates that indices are valid positions in the vertex stream.
	 */
	RAWMESH_API bool IsValidOrFixable() const;

	/** Helper for getting the position of a wedge. */
	FORCEINLINE FVector GetWedgePosition(int32 WedgeIndex) const
	{
		return VertexPositions[WedgeIndices[WedgeIndex]];
	}

	/**
	 * Compacts materials by removing any that have no associated triangles.
	 * Also updates the material index map.
	 */
	RAWMESH_API void CompactMaterialIndices();

};

/**
* Add the raw mesh data to an archive
*
*/
RAWMESH_API FArchive& operator<<(FArchive& Ar, FRawMesh& RawMesh);

/**
 * Bulk data storage for raw meshes.
 */
class FRawMeshBulkData
{
	/** Internally store bulk data as bytes. */
	FByteBulkData BulkData;
	/** GUID associated with the data stored herein. */
	FGuid Guid;
	/** If true, the GUID is actually a hash of the contents. */
	bool bGuidIsHash;

public:
	/** Default constructor. */
	RAWMESH_API FRawMeshBulkData();

#if WITH_EDITORONLY_DATA
	/** Serialization. */
	RAWMESH_API void Serialize(class FArchive& Ar, class UObject* Owner);

	/** Store a new raw mesh in the bulk data. */
	RAWMESH_API void SaveRawMesh(struct FRawMesh& InMesh);

	/** Load the raw mesh from bulk data. */
	RAWMESH_API void LoadRawMesh(struct FRawMesh& OutMesh);

	/** Retrieve a string uniquely identifying the contents of this bulk data. */
	RAWMESH_API FString GetIdString() const;

	/** Uses a hash as the GUID, useful to prevent creating new GUIDs on load for legacy assets. */
	RAWMESH_API void UseHashAsGuid(class UObject* Owner);

	RAWMESH_API const FByteBulkData& GetBulkData() const;

	/** Returns true if no bulk data is available for this mesh. */
	FORCEINLINE bool IsEmpty() const { return BulkData.GetBulkDataSize() == 0; }

	/** Returns true if no bulk data is available for this mesh. */
	RAWMESH_API void Empty();
#endif // #if WITH_EDITORONLY_DATA
};

```

---

<div class="post-metadata">

**Author:** ![TheLappin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheLappin](https://forums.unrealengine.com/u/TheLappin)\
**Post date:** [July 5, 2019, 9:33am UTC](https://forums.unrealengine.com/t/syntax-error-in-rawmesh-h/438720/2 "2019-07-05T09:33:17Z")

</div>

You need to place `"RawMesh"` in `PrivateDependencyModuleNames` (and /or `PublicDependencyModuleNames`) in `<ProjectName>.Build.cs`
