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

Linking error with MSYS2 when compiling with cmake #352

Open
Nicolas97220 opened this issue May 1, 2024 · 0 comments
Open

Linking error with MSYS2 when compiling with cmake #352

Nicolas97220 opened this issue May 1, 2024 · 0 comments

Comments

@Nicolas97220
Copy link

Hi there,
I am trying to compile the check library on my windows 11 computer. I suppose I use version 0.15.2 of check
I am using msys2 with the MINGW64 environment. My cmake version is 3.29.2
My compiler is cc.exe version 13.2.0

I basically did the following.
git clone https://github.com/libcheck/check.git
cd check
mkdir build
cd build
cmake ..
ninja

Unfortunately, I have couple linking errors as detailled in the following. Would you have any idea how to solve it ?

[64/86] Linking C shared library src\libcheck.dll FAILED: src/libcheck.dll src/libcheck.dll.a C:\WINDOWS\system32\cmd.exe /C "cd . && C:\msys64\mingw64\bin\cc.exe -g -pthread -shared -o src\libcheck.dll -Wl,--out-implib,src\libcheck.dll.a -Wl,--major-image-version,0,--minor-image-version,15 src/CMakeFiles/checkShared.dir/check.c.obj src/CMakeFiles/checkShared.dir/check_error.c.obj src/CMakeFiles/checkShared.dir/check_list.c.obj src/CMakeFiles/checkShared.dir/check_log.c.obj src/CMakeFiles/checkShared.dir/check_msg.c.obj src/CMakeFiles/checkShared.dir/check_pack.c.obj src/CMakeFiles/checkShared.dir/check_print.c.obj src/CMakeFiles/checkShared.dir/check_run.c.obj src/CMakeFiles/checkShared.dir/check_str.c.obj src/CMakeFiles/checkShared.dir/__/lib/fpclassify.c.obj src/CMakeFiles/checkShared.dir/__/lib/clock_gettime.c.obj src/CMakeFiles/checkShared.dir/__/lib/timer_create.c.obj src/CMakeFiles/checkShared.dir/__/lib/timer_delete.c.obj src/CMakeFiles/checkShared.dir/__/lib/timer_settime.c.obj src/CMakeFiles/checkShared.dir/__/lib/getline.c.obj src/CMakeFiles/checkShared.dir/__/lib/localtime_r.c.obj src/CMakeFiles/checkShared.dir/__/lib/strsignal.c.obj -lm -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ." C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: src/CMakeFiles/checkShared.dir/check_pack.c.obj: in function 'ppack': C:/msys64/home/nicolas/check/src/check_pack.c:379:(.text+0x971): undefined reference to'MemoryBarrier' C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/home/nicolas/check/src/check_pack.c:379:(.text+0x982): undefined reference to MemoryBarrier' collect2.exe: error: ld returned 1 exit status

Thanks in advance
Nicolas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant