Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Error trying to build example-c plugin solution for x64

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Source -> Plugin development
View previous topic :: View next topic  
Author Message
HSergi
Newbie cheater
Reputation: 0

Joined: 17 Dec 2017
Posts: 22

PostPosted: Sun Jul 11, 2021 11:53 am    Post subject: Error trying to build example-c plugin solution for x64 Reply with quote

I cloned Cheat Engine github repo and found that there are example for plugins. I opened `example-c` solution in Visual Studio 2019 on Windows 10.
Solution originally targets toolset v140 for Windows XP and Windows 8.1 SDK. I changed it to the ones installed on my machine: Windows 10 SDK 10.0.18362.0 and Platform toolset Visual Studio 2019 (v142).

With these settings it built the solution for Win32 platform and produced the example-c.dll, which I opened in Win32 Cheat Engine and it showed all the checkboxes as expected.

I then changed platform to x64 and tried to build, I get these errors:
Quote:

Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol lua_setglobal referenced in function CEPlugin_InitializePlugin example-c D:\Projects\Desktop\cheat-engine\Cheat Engine\plugin\example-c\example-c.obj 1
Error LNK2019 unresolved external symbol lua_pushinteger referenced in function lua_pluginExample example-c D:\Projects\Desktop\cheat-engine\Cheat Engine\plugin\example-c\example-c.obj 1
Error LNK2019 unresolved external symbol lua_pushcclosure referenced in function CEPlugin_InitializePlugin example-c D:\Projects\Desktop\cheat-engine\Cheat Engine\plugin\example-c\example-c.obj 1
Error LNK1120 3 unresolved externals example-c D:\Projects\Desktop\cheat-engine\Cheat Engine\plugin\example-c\x64\Debug\example-c.dll 1


Visual Studio does find the lua53-64.lib and use the x64 one and not Win32 one, when I rename the lua53-64.lib to lua53-642.lib, I get a different error about the fact that it can't fine the lua53-64.lib:
Quote:
Severity Code Description Project File Line Suppression State
Error LNK1104 cannot open file 'lua53-64.lib' example-c D:\Projects\Desktop\cheat-engine\Cheat Engine\plugin\example-c\LINK 1


Also the lib is appropriately linked in the Input settings of the Linker and VC++ Directories settings.

Am I supposed to use different lua functions when building for x64 platform? Google doesn't show any meaningful results for this problem with linking lua functions for x64 platforms, only default ones that you need to set a directory and name of the lib file, which are set in my case.



devenv_n6X1IFMl4v.png
 Description:
 Filesize:  31.18 KB
 Viewed:  3879 Time(s)

devenv_n6X1IFMl4v.png



devenv_GQIA9rNv3j.png
 Description:
 Filesize:  40.67 KB
 Viewed:  3879 Time(s)

devenv_GQIA9rNv3j.png



devenv_800Wj2RxO9.png
 Description:
 Filesize:  125.35 KB
 Viewed:  3879 Time(s)

devenv_800Wj2RxO9.png


Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Source -> Plugin development All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites