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
Compiling with Clang on Windows fails at libcurl.rc #7765
Comments
Is this perhaps what's needed? It seems it assumes a certain dir tree layout that may not be true --- a/lib/libcurl.rc
+++ b/lib/libcurl.rc
@@ -18,11 +18,11 @@
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
***************************************************************************/
#include <winver.h>
-#include "../include/curl/curlver.h"
+#include <curl/curlver.h>
LANGUAGE 0, 0
#define RC_VERSION LIBCURL_VERSION_MAJOR, LIBCURL_VERSION_MINOR, LIBCURL_VERSION_PATCH, 0
|
Reported-by: Vitaly Varyvdin Fixes #7765
Nope, doesn't fix the issue. The issue is here To be exact it doesn't like |
Ok, that's beyond me. @vszakats, any idea? |
Not sure if that's correct way to fix that but adding
Copyright symbol is properly displayed in .dll info Upd: works under MSVC 16.9 as well |
Codepage requirements/expectations of various compilers and of Windows resource files in general are generally mysterious, so what about replacing that copyright symbol with: Prefixing with UPDATE: |
According to https://docs.microsoft.com/en-us/windows/win32/menurc/stringtable-resource
I might assume this being pretty portable and common practice. |
@VitalyVaryvdin Thanks for the link! It looks good to me. This method may even make any |
I personally wouldn't mind using the ascii |
You're welcome! Using |
Reported-by: Vitaly Varyvdin Assisted-by: Viktor Szakats Fixes #7765
IANAL, but my understanding is that (C) does not have the same legal meaning as
the copyright symbol © in some jurisdictions. If the word "Copyright" exists
as well, it's probably fine.
|
So the options are:
This adds the flag for the diff --git a/docs/examples/Makefile.m32 b/docs/examples/Makefile.m32
index 45ec8679c..261dc03be 100644
--- a/docs/examples/Makefile.m32
+++ b/docs/examples/Makefile.m32
@@ -118,7 +118,7 @@ CFLAGS += -fno-strict-aliasing
# comment LDFLAGS below to keep debug info
LDFLAGS = $(CURL_LDFLAG_EXTRAS) $(CURL_LDFLAG_EXTRAS_EXE) -s
RC = $(CROSSPREFIX)windres
-RCFLAGS = --include-dir=$(PROOT)/include -O coff
+RCFLAGS = --include-dir=$(PROOT)/include -O coff -c65001
# Set environment var ARCH to your architecture to override autodetection.
ifndef ARCH
diff --git a/lib/Makefile.m32 b/lib/Makefile.m32
index 9f1f5963d..0cd903e61 100644
--- a/lib/Makefile.m32
+++ b/lib/Makefile.m32
@@ -115,7 +115,7 @@ LDFLAGS = $(CURL_LDFLAG_EXTRAS) $(CURL_LDFLAG_EXTRAS_DLL) -s
AR = $(CURL_AR)
RANLIB = $(CURL_RANLIB)
RC = $(CROSSPREFIX)windres
-RCFLAGS = --include-dir=$(PROOT)/include -DDEBUGBUILD=0 -O coff
+RCFLAGS = --include-dir=$(PROOT)/include -DDEBUGBUILD=0 -O coff -c65001
STRIP = $(CROSSPREFIX)strip -g
# Set environment var ARCH to your architecture to override autodetection.
diff --git a/src/Makefile.m32 b/src/Makefile.m32
index 380d264e7..23afbe308 100644
--- a/src/Makefile.m32
+++ b/src/Makefile.m32
@@ -119,7 +119,7 @@ CFLAGS += -fno-strict-aliasing
LDFLAGS = $(CURL_LDFLAG_EXTRAS) $(CURL_LDFLAG_EXTRAS_EXE) -s
AR = $(CURL_AR)
RC = $(CROSSPREFIX)windres
-RCFLAGS = --include-dir=$(PROOT)/include -O coff -DCURL_EMBED_MANIFEST
+RCFLAGS = --include-dir=$(PROOT)/include -O coff -c65001 -DCURL_EMBED_MANIFEST
STRIP = $(CROSSPREFIX)strip -g
# We may need these someday |
The symbol itself was just an alternative to "Copyright" word in the documents. So probably going with |
"Copyright (C)" is what we use in hundreds of sources files already so it should be fine I think. |
I assume |
@gvanem what selection is that? Is that even something we control? |
@bagder In |
It seems that in order to use that variable someone would have to patch |
|
I did this
Compiling on Windows 10 with Clang 12.0.1. Ninja build files generated by CMake.
Getting error at
curl/lib/libcurl.rc
.llvm-rc: error in versioninfo statement (id 1): [build] non-ascii 8-bit codepoint (169) can't occur in a non-unicode string
Removing everything coming after
#define RC_VERSION
results in successful compilation.I expected the following
Successful compilation
curl/libcurl version
7.79.1-DEV
operating system
Windows 10.
UPD:
The issue is here
VALUE "LegalCopyright", "\xa9 " LIBCURL_COPYRIGHT "\0" /* a9: Copyright symbol */
. Removing this results in successful compilation.To be exact it doesn't like
"\xa9 "
part.UPD:
Adding L before the string fixes the issue.
VALUE "LegalCopyright", "\xa9 " LIBCURL_COPYRIGHT "\0" /* a9: Copyright symbol */
Becomes
VALUE "LegalCopyright", L"\xa9 " LIBCURL_COPYRIGHT "\0" /* a9: Copyright symbol */
Copyright symbol is properly displayed in .dll info
Tested under Clang 12.0.1 and MSVC 16.9
The text was updated successfully, but these errors were encountered: