Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need complete install manual #1

Open
jabobian opened this issue Dec 15, 2020 · 6 comments
Open

Need complete install manual #1

jabobian opened this issue Dec 15, 2020 · 6 comments

Comments

@jabobian
Copy link

Hello, Hampo,

I have tried to use ProddyUtils for Lua 5.3 (in SciTE 4) to replace the old afx.dll for Lua 5.1 (in SciTE 2). However I cannot figure out how to make it working.

Basically, I open the ProddyUtils.sln file in Visual Studio 2017, copy lua .h/.hpp header file folder to the ProddyUtils, and copy lua53.lib from https://sourceforge.net/projects/luabinaries/files/5.3.4/Windows%20Libraries/Static/

The project compiles and generates a ProddyUtils.dll, but when I copy it to SciTE, and run "require ProddyUtils" in startup lua script, it reports

error loading module 'ProddyUtils' from file 'D:\Program Files\SciTE v445\bin\ProddyUtils.dll':
%1 is not a valid Win32 application program.

@Hampo
Copy link
Owner

Hampo commented Dec 15, 2020

Sounds like a 64bit/32bit issue.

@jabobian
Copy link
Author

You are right , I think using Visual Studio sln might cause conflicts. Could you please provide a mak file for ProddyUtils, similar to the Lexilla dll/lib? so I can copy the source to the SciTE/Scintilla source folder and run the mak file to get ProddyUtils.dll.
Many thanks!

@jabobian
Copy link
Author

I have tried to mimic the Lexilla.mak file, and the output is as follows:

D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include\xlocale (319): Warning C4530: The C++ exception handler is used, but the unrouted semantics are not enabled. Please specify /EHsc
.\ProddyUtils .cpp (261): error C2664: "Int MessageBoxA (HWND, LPCSTR, LPCSTR, UINT)": Parameter 2 could not be converted from "const _Elem" to "LPCSTR"
with。
[
_Elem=wchar_t。
]
.\ProddyUtils.cpp (261): note: independent of the type you are pointing to; casting requires reinterpret_cast, C-style cast, or function-style cast
.\ProddyUtils.cpp (323): error C2039: "filesystem": not a member of "std"
D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include\regex (54): note: see "std" statement
.\ProddyUtils.cpp (323): error C3083: "filesystem":":: "The symbol on the left must be a type
.\ProddyUtils .cpp (323): error C2039: "create_directories": not a member of "std"
D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\includeregex (54): note: see "std" statement
.\ProddyUtils.cpp (323): error C3861: "create_directories": The identifier could not be found
NMAKE: fatal error U1077: ""D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\hostX86\x86\cl.EXE":Return code "0x2"
Stop.

I use x86\cl.exe as it shows "32 bit" in the about dialog of SciTE.

@jabobian
Copy link
Author

I found the following info:
https://stackoverflow.com/questions/2710194/register-c-function-in-lua-table
FYI.. luaL_Register has been deprecated in 5.2 .. luaL_newlib and luaL_setfuncs seems to be the replacement.

and others:
TheLinx/lao#2
pkulchenko/wxlua#12

@Hampo
Copy link
Owner

Hampo commented Dec 16, 2020

I found the following info:
https://stackoverflow.com/questions/2710194/register-c-function-in-lua-table
FYI.. luaL_Register has been deprecated in 5.2 .. luaL_newlib and luaL_setfuncs seems to be the replacement.

and others:
TheLinx/lao#2
pkulchenko/wxlua#12

I didn't use luaL_Register... The init function uses luaL_newlib

Regarding the mak file - this is my first and only C++ project and I don't know off hand how to make one. I do know this was written for 64bit Lua, if that could be what's causing you issues using the 32bit cl.exe

@EnAppelsin
Copy link

I have tried to mimic the Lexilla.mak file, and the output is as follows:

D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include\xlocale (319): Warning C4530: The C++ exception handler is used, but the unrouted semantics are not enabled. Please specify /EHsc
.\ProddyUtils .cpp (261): error C2664: "Int MessageBoxA (HWND, LPCSTR, LPCSTR, UINT)": Parameter 2 could not be converted from "const _Elem" to "LPCSTR"
with。
[
_Elem=wchar_t。
]
.\ProddyUtils.cpp (261): note: independent of the type you are pointing to; casting requires reinterpret_cast, C-style cast, or function-style cast
.\ProddyUtils.cpp (323): error C2039: "filesystem": not a member of "std"
D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include\regex (54): note: see "std" statement
.\ProddyUtils.cpp (323): error C3083: "filesystem":":: "The symbol on the left must be a type
.\ProddyUtils .cpp (323): error C2039: "create_directories": not a member of "std"
D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\includeregex (54): note: see "std" statement
.\ProddyUtils.cpp (323): error C3861: "create_directories": The identifier could not be found
NMAKE: fatal error U1077: ""D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\hostX86\x86\cl.EXE":Return code "0x2"
Stop.

I use x86\cl.exe as it shows "32 bit" in the about dialog of SciTE.

You will need to compile in C++17 mode, add /std:c++17 to the CXXFLAGS in the .mak

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants