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

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

Open
asmwarrior opened this issue Dec 16, 2021 · 8 comments · May be fixed by #19
Open

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

asmwarrior opened this issue Dec 16, 2021 · 8 comments · May be fixed by #19
Labels

Comments

@asmwarrior
Copy link

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

@kovacsv
Copy link
Owner

kovacsv commented Dec 17, 2021

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.

@asmwarrior
Copy link
Author

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.

@kovacsv
Copy link
Owner

kovacsv commented Dec 17, 2021

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 kovacsv added the build label Dec 17, 2021
@asmwarrior
Copy link
Author

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.

@kovacsv
Copy link
Owner

kovacsv commented Dec 17, 2021

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 ()

@zzc-1024
Copy link

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

@asmwarrior
Copy link
Author

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.

@zzc-1024
Copy link

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 added a commit to zzc-1024/VisualScriptEngine that referenced this issue Feb 24, 2023
@zzc-1024 zzc-1024 linked a pull request Feb 24, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants