I’m currently using the tutorial on linking dynamic libraries to try and add Libnoise to a test project. In the chunk of code below, the example given is declaring a function that only requires a float:
#pragma once
#include "GameFramework/Actor.h"
#include "Libraries.generated.h"
/**
* Meaningful and useful comment goes here.
*/
UCLASS()
class ULibraries : public UBlueprintFunctionLibrary
{
GENERATED_UCLASS_BODY()
// Blueprint accessible method.
UFUNCTION(BlueprintCallable, Category = "Karma Libraries")
static float getCircleAreaDLL(float radius);
};
However, when I modify this code so that it declares a function with an array of an array of floats (as pointers to pointers) instead-
class NOISETEST_API ANoiseDisplay : public AHUD
{
GENERATED_UCLASS_BODY()
// Blueprint accessible method.
UFUNCTION(BlueprintCallable, Category = "Karma Libraries")
static void generateNoiseMapDLL(float **radius);
};
-and make the corresponding change in the .cpp file, I get this error when building:
1>------ Build started: Project: NoiseTest, Configuration: Development_Editor x64 ------
2>------ Skipped Build: Project: UE4, Configuration: BuiltWithUnrealBuildTool Win32 ------
2>Project not selected to build for this solution configuration
1> Compiling game modules for hot reload
1> Parsing headers for NoiseTestEditor
1> B:/Unreal Projects/NoiseTest/Source/NoiseTest/NoiseDisplay.h(19) : Missing variable name
1>Error : Failed to generate code for NoiseTestEditor - error code: OtherCompilationError (5)
1> UnrealHeaderTool failed for target 'NoiseTestEditor' (platform: Win64, module info: B:\Unreal Projects\NoiseTest\Intermediate\Build\Win64\NoiseTestEditor\Development\UnrealHeaderTool.manifest).
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command ""B:\Epic Games\4.8\Engine\Build\BatchFiles\Build.bat" NoiseTestEditor Win64 Development "B:\Unreal Projects\NoiseTest\NoiseTest.uproject" -rocket" exited with code -1.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 1 skipped ==========
If I change it so it’s a regular 2D array (no pointers), then I get this error:
1>------ Build started: Project: NoiseTest, Configuration: Development_Editor x64 ------
2>------ Skipped Build: Project: UE4, Configuration: BuiltWithUnrealBuildTool Win32 ------
2>Project not selected to build for this solution configuration
1> Compiling game modules for hot reload
1> Parsing headers for NoiseTestEditor
1> B:/Unreal Projects/NoiseTest/Source/NoiseTest/NoiseDisplay.h(19) : Function parameter radius: Missing ']'
1>Error : Failed to generate code for NoiseTestEditor - error code: OtherCompilationError (5)
1> UnrealHeaderTool failed for target 'NoiseTestEditor' (platform: Win64, module info: B:\Unreal Projects\NoiseTest\Intermediate\Build\Win64\NoiseTestEditor\Development\UnrealHeaderTool.manifest).
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command ""B:\Epic Games\4.8\Engine\Build\BatchFiles\Build.bat" NoiseTestEditor Win64 Development "B:\Unreal Projects\NoiseTest\NoiseTest.uproject" -rocket" exited with code -1.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 1 skipped ==========
What am I doing wrong?
Code for class (header posted earlier):
// Fill out your copyright notice in the Description page of Project Settings.
#include "NoiseTest.h"
#include "NoiseDisplay.h"
void ANoiseDisplay::generateNoiseMapDLL(float **radius)
{
}