-
Notifications
You must be signed in to change notification settings - Fork 39
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
Compile error on windows in VS2017 CMD prompt #83
Comments
for what it's worth: --- Makefile-20190423_182836 2019-04-23 18:29:01.183646196 +0200
+++ Makefile 2019-04-23 18:28:36.916873544 +0200
@@ -12,7 +12,7 @@
build/libegit2.so:
git submodule update --init
mkdir -p build
- cd build && cmake .. -DCMAKE_BUILD_TYPE=Debug && make
+ cd build && cmake .. -DCMAKE_BUILD_TYPE=Debug -G "MSYS Makefiles" && make
test: EMACS_ARGS += -L build/ -l libegit2
test: build/libegit2.so test-ert
@@ -51,7 +51,7 @@
build/libegit2.so: libgit2
@printf "Building $<\n"
@mkdir -p build
- @cd build && cmake .. -DCMAKE_BUILD_TYPE=Debug && make
+ @cd build && cmake .. -DCMAKE_BUILD_TYPE=Debug -G "MSYS Makefiles" && make
lisp: $(ELCS) loaddefs module
``
And after that I must have copied `libhttp_parser-2.dll`
and `libssh.dll` to the emacs/bin installation dir. |
I build as below but encountered one error.
|
I haven't encountered this issue but two questions come to my mind :
|
@zijianyue Did that help? |
@tarsius: |
I don't use Windows so I have no idea what to do here. |
Avoid using Visual Studio generator when building on Windows system by using MSYS Makefiles generator on Microsoft Windows systems. (Fix issue #83). * Makefile: Conditionally use "MSYS Makefiles generator". Also refactor the definition of build type by defining an CMAKE_CMD_LINE_OPTIONS variable.
On MS Windows platform Emacs and this lib can not be build with Visual Studio, so use MSYS Makefiles generator against the one provided by Microsoft (Fix issue #83). * Makefile: Conditionally use "MSYS Makefiles generator". Also refactor the definition of build type by defining a BUILD_OPTIONS variable.
Build success using toolchain But if build with MSVC, the same error as #83 (comment) . MSVC doen not support VLA(variabic length array) added in c99. https://docs.microsoft.com/en-us/cpp/c-language/ansi-conformance?view=vs-2017
|
As far as I can tell we hardcode the ".so" suffix in our Makefile. That means we should not rely on the variable `module-file-suffix', which may have a value other than the expected ".so". And indeed it has been alleged that the value is different on Darwin when using Emacs 28 at least. But because there is nothing to be gained from using a potentially conflicting value, we simply always hardcode the suffix, regardless of platform or anything else. Closes #89. Closes #98. Closes #99. It would probably be better to instead use the appropriate suffix on all platforms, e.g. ".dylib" on Darwin, but it is unlikely anyone will put in the work.
The text was updated successfully, but these errors were encountered: