Hi! I want to use c++ with Flax. I have created c++ script and followed the rules for c++ scripting, and everything is ok. But when i create an actor c++ class (without any modification of the files), problems begin.
Apparently unresolved external symbol.
If i use c#, no errors for actor class.
Any idea to solve the problem?
This is the output log:
[ 00:14:21.578 ]: [Info] Starting scripts compilation…
[ 00:14:21.578 ]: [Info] Command: C:\Program Files (x86)/Flax/Flax_1.10/Binaries/Tools/Flax.Build.exe -log -logfile= -build -mutex -buildtargets=GameEditorTarget -skiptargets=FlaxEditor -platform=Windows -arch=x64 -configuration=Development -hotreload=".HotReload.15"
[ 00:14:21.710 ]: [Info] Flax.Build 1.0.0
[ 00:14:21.796 ]: [Info] Building targets…
[ 00:14:21.818 ]: [Info] Missing Android SDK. Cannot build for Android platform.
[ 00:14:21.854 ]: [Info] Building target GameEditorTarget in Development for Windows x64
[ 00:14:21.857 ]: [Info] Using Windows Toolset v144 (C:\Program Files (x86)\Windows Kits\10)
Using Windows SDK 10.0.26100.0 (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\bin\Hostx64\x64)
[ 00:14:21.858 ]: [Info] Building referenced target Flax
[ 00:14:22.734 ]: [Info] Building for Windows without Vulkan rendering backend (Vulkan SDK is missing)
[ 00:14:22.743 ]: [Info] Using .NET SDK 9.0.203, runtime 9.0.4 (C:\Program Files\dotnet)
[ 00:14:23.411 ]: [Info] Found 12 valid and 0 invalid actions in Task Graph cache
[ 00:14:23.413 ]: [Info] Executing 1 task using 1 thread
[ 00:14:23.414 ]: [Info] Linking C:\Users\utente\Documents\Flax Projects\MyProject\Binaries\GameEditorTarget\Windows\x64\Development\Game.HotReload.15.dll
[ 00:14:23.491 ]: [Info] Creazione della libreria C:\Users\utente\Documents\Flax Projects\MyProject\Binaries\GameEditorTarget\Windows\x64\Development\Game.HotReload.15.lib e dell’oggetto C:\Users\utente\Documents\Flax Projects\MyProject\Binaries\GameEditorTarget\Windows\x64\Development\Game.HotReload.15.exp
[ 00:14:23.497 ]: [Info] MyActor.obj : error LNK2001: simbolo esterno “public: virtual void __cdecl Actor::AddMovement(struct Vector3Base const &,struct Quaternion const &)” (?AddMovement@Actor@@UEAAXAEBU?$Vector3Base@N@@AEBUQuaternion@@@Z) non risolto
MyActor.obj : error LNK2001: simbolo esterno “public: virtual bool __cdecl Actor::IntersectsItself(struct Ray const &,double &,struct Vector3Base &)” (?IntersectsItself@Actor@@UEAA_NAEBURay@@AEANAEAU?$Vector3Base@N@@@Z) non risolto
C:\Users\utente\Documents\Flax Projects\MyProject\Binaries\GameEditorTarget\Windows\x64\Development\Game.HotReload.15.dll : fatal error LNK1120: 2 esterni non risolti
[ 00:14:23.511 ]: [Info] Task C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\bin\Hostx64\x64\link.exe @“C:\Users\utente\Documents\Flax Projects\MyProject\Cache/Intermediate\GameEditorTarget\Windows\x64\Development\Game\Game.HotReload.15.dll.response” failed with exit code 1120
1 task failed
[ 00:14:23.516 ]: [Info] Total time: 00:00:01.8268931
[ 00:14:23.527 ]: [Error] Failed to run build tool, result: 1
[ 00:15:15.186 ]: [Info] Auto save
[ 00:15:15.189 ]: [Info] Saving scene Scene to ‘C:\Users/utente/Documents/Flax Projects/MyProject/Content/Scene.scene’
[ 00:15:15.200 ]: [Info] Scene saved! Time 10ms