Build failed with new script

I’m starting to run out of options here, no matter what type of script I attempt to add, I always get the following error when building the solution: “error LNK2019: unresolved external symbol “void __cdecl AddSC_alliance_boss(void)” (?AddSC_alliance_boss@@YAXXZ) referenced in function “void __cdecl AddCustomScripts(void)” (?AddCustomScripts@@YAXXZ)”.

I have added it to the scriptloader file

/* This is where custom scripts’ loading functions should be declared. */
void AddSC_alliance_boss();

void AddCustomScripts()
#ifdef SCRIPTS
/* This is where custom scripts should be added. */

[/SPOILER]and also the cmakelists


message(" → Prepared: Custom")


show the AddSC_alliance_boss function definition from Custom/alliance_boss.cpp

Did you run cmake before compiling? (configure & generate)

Uh… I thought visual studio did that. Does it only generate?

Uh… I thought visual studio did that. Does it only generate?

​Try the config&generate. Not sure what and when the automation does it, but usually ppl who dont run it themselves get these problems, so run it anyways.

​Yea… using cmake manually did the trick. sadly, now I have to rebuild the whole core each time I add a new script

Usually it shouldnt do that.

However ppl keep saying that and I decied to test. If you add a script to cmakelists, then it will need the complete rebuild it would seem. If you simply change an existing script, then it wont make a full recompile, but possibly does if you use cmake in between.

What I found to be weird when testing was that using cmake seemed to make the whole core rebuild even if logically adding one cpp file shouldnt do that.
I made a diff of the changes cmake does when adding a trivial script to the TC source. I think there is something wrong here:

In the diff the actual changes for the script are like 2 lines and all others are adding warning disables and other that are already there. I feel like this could be a bug in cmake or the TC cmake code.

@Rochet2 your issue was fixed in

I assume that is only on 6.x?
I tested on 3.3.5

Would be great to have a port /emoticons/default_smile.png

Just the cherry pick is missing

on newest TC its now cherry picked. :slight_smile: