Bug: COSMOCC failed to compile "Hello, world!!!" problem with BCryptPrimitives.dll
high severity
### Contact Details
_No response_
### What happened?
Hi all!
Despite my interest in COSMOCC, I am unable to compile even "Hello, world!!!" program.
I run
[user@localhost src]$ cosmocc -o hello hello.c
and it emits:
0404:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {a74efe00-14be-4ef9-9da9-1484d5473302}
0404:err:module:LdrInitializeThunk "BCryptPrimitives.dll" failed to initialize, aborting
0404:err:module:LdrInitializeThunk Initializing dlls for L"Z:\\src\\cosmocc\\bin\\mktemper" failed, status c0000142
My wine is
[user@localhost src]$ wine --version
wine-8.0
Looks like wine issue. Googling didn't help.
Copying bcryptprimitives.dll from win10 windows/system32,windows/sysWOW64 into corresponding Wine folders didn't help either.
Adding bcryptprimitives.dll in wine settings && overriding didn't help either.
/*hello.c*/
// hello.c
#include <stdio.h>
int main()
{
printf("hello world\n");
}
I can't update wine yet.
Any ideas to make it run?
Thank you in advance.
### Version
[user@localhost src]$ cosmocc --version
cosmocc (GCC) 14.1.0
Copyright (c) 2024 Justine Alexandra Roberts Tunney
Cosmopolitan Libc and LLVM libcxx/compiler-rt are subject to non-GPL
notice licenses, e.g. ISC, MIT, etc. Your compiled programs must embed
our copyright notices. This toolchain is configured to do so by default.
Cosmopolitan comes with absolutely NO WARRANTY of any kind.
For more information, see the Cosmopolitan LICENSE files.
Copyright (C) 2022 Free Software Foundation, Inc.
This launches GNU GCC/Binutils subprocesses, which is free software; see
cosmocc's LICENSE files for source code and copying conditions. There is
NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
### What operating system are you seeing the problem on?
_No response_
### Relevant log output
```shell
```
关闭于 2025-07-24 3 条评论