VisualScriptEngine icon indicating copy to clipboard operation
VisualScriptEngine copied to clipboard

Is it possible to build this library under msys2's gcc?

Open asmwarrior opened this issue 3 years ago • 8 comments

I looked at the cmakelist file, this file mainly are support the Microsoft visual studio c++, but not mingw gcc?

asmwarrior avatar Dec 16 '21 15:12 asmwarrior

The engine is tested with several compilers, see the https://github.com/kovacsv/VisualScriptEngine/wiki/Building-the-Engine page for details.

I think it should work with mingw gcc, too. Just generate makefiles with cmake, and use the gcc compiler to build.

kovacsv avatar Dec 17 '21 10:12 kovacsv

First, thanks for the reply.

But if you look at the CMakeLists.txt, I see some code snippet:

function (SetCompilerOptions module)
	target_compile_options (${module} PUBLIC "$<$<CONFIG:Debug>:-DDEBUG>")
	if (WIN32)
		set (AdditionalWarnings /w44061 /w44062 /w44265 /w44266 /w44355 /w44596 /w44800)
		target_compile_options (${module} PUBLIC /W4 /WX ${AdditionalWarnings} ${VSE_CUSTOM_BUILD_OPTIONS})
	else ()
		target_compile_options (${module} PUBLIC -std=c++11 -Wall -Wextra -Werror ${VSE_CUSTOM_BUILD_OPTIONS})
	endif ()
endfunction ()

This looks like under Windows, it has only support the visual studio C++ compiler options. /w like option is only for this compiler.

Thanks.

asmwarrior avatar Dec 17 '21 14:12 asmwarrior

Yes, you are right, instead of WIN32, it should check visual studio. Have you tried to delete the WIN32 branch, and use the other one for mingw?

kovacsv avatar Dec 17 '21 14:12 kovacsv

Yes, you are right, instead of WIN32, it should check visual studio. Have you tried to delete the WIN32 branch, and use the other one for mingw?

I'm not familiar with cmake, so I don't know how to tweak the cmakelist file.

BTW: What does the "visual script" used for, from the demo https://kovacsv.github.io/VisualScriptEngineWebDemo/ I see that it can do some simple calculation (show the parsing tree of the calculator)?

Thanks.

asmwarrior avatar Dec 17 '21 15:12 asmwarrior

Please try to modify the function in the CMakeLists.txt file like this, and see if it works with mingw.

function (SetCompilerOptions module)
	target_compile_options (${module} PUBLIC "$<$<CONFIG:Debug>:-DDEBUG>")
	target_compile_options (${module} PUBLIC -std=c++11 -Wall -Wextra -Werror ${VSE_CUSTOM_BUILD_OPTIONS})
endfunction ()

kovacsv avatar Dec 17 '21 15:12 kovacsv

Hi, I tried to fix codes. Eventually, it can generate executable files. However, when I opened it, it show me "Unable to locate program input point ZNKSt19_codecvt_utf8_baselwE10do_unshiftER9_MbstatetPcS3_RS3" image

zzc-1024 avatar Feb 24 '23 03:02 zzc-1024

Hi, I tried to fix codes. Eventually, it can generate executable files. However, when I opened it, it show me "Unable to locate program input point ZNKSt19_codecvt_utf8_baselwE10do_unshiftER9_MbstatetPcS3_RS3" image

I think you need to use some dependency check tool to check which dll files are used by the exe. Maybe, wrong DLL file is used.

asmwarrior avatar Feb 24 '23 06:02 asmwarrior

Hi, I tried to fix codes. Eventually, it can generate executable files. However, when I opened it, it show me "Unable to locate program input point ZNKSt19_codecvt_utf8_baselwE10do_unshiftER9_MbstatetPcS3_RS3" image

I think you need to use some dependency check tool to check which dll files are used by the exe. Maybe, wrong DLL file is used.

Thank you. After dependency check, I found that program missing libstdc++-6.lib. The program can run now. image

zzc-1024 avatar Feb 24 '23 06:02 zzc-1024