• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

TrinityCore 5.x.x Compile Error with new function

blackmetal

Exalted Member
Hi, as the title. I was trying to copy some function from another source to my source

Here is the commit: http://pastebin.com/FfNuj6u6
And everything is clean, no error appears before compile. But when compile complete, it show error like this:


Code:
Error	14	error LNK2001: unresolved external symbol "class DBCStorage<struct SpellProcsPerMinuteEntry> sSpellProcsPerMinuteStore" (?sSpellProcsPerMinuteStore@@3V?$DBCStorage@USpellProcsPerMinuteEntry@@@@A)

I haven't see this before :(.
 

Rochet2

Moderator / Eluna Dev
sSpellProcsPerMinuteMods isnt used for anything?
And I guess in DBCStores.cpp you should be having a row for sSpellProcsPerMinuteStore like you do have for sSpellProcsPerMinuteMods.
The issue seems to be that you have declared sSpellProcsPerMinuteStore but not actually defined anything.
 

blackmetal

Exalted Member
After your word, i spent morning to research, find all references. I feel like everything is the same but only error left...

Code:
Error	1	error C2440: 'initializing' : cannot convert from 'const SpellProcsPerMinuteModEntry *' to 'SpellProcsPerMinuteModEntry *'

Pastebin Diff : http://pastebin.com/ssau1b4e

:sweaty::sweaty::sweaty::sweaty:
 

Rochet2

Moderator / Eluna Dev
Im not 100% sure on this, but doesnt LookupEntry return a pointer to const object?
That would mean that this code is wrong:
SpellProcsPerMinuteModEntry* ppmMod = sSpellProcsPerMinuteModStore.LookupEntry(i)
Because it should be SpellProcsPerMinuteModEntry const *
 
Top