Closed Juff-Ma closed 1 year ago
If you want to use clang
, please make sure to not build inside a MinGW environment so that the toolchain doesn’t pick up any MinGW headers. I would recommend launching an MSYS2 shell from a Visual Studio environment (like "Visual Studio Developer Command Prompt"), e.g. by running:
C:/tools/msys64/msys2_shell.cmd -defterm -here -full-path -no-start -msys
Alternatively you can forgo MSYS2 and use clang-cl
in a plain VS prompt as you did. Good point about needing /LIBPATH
for the linker to find the libraries. Alternatively you should also be able to specify the full paths to the .lib files instead.
I’ve updated the readme to fix the linker options. Let me know if you have any other issues or questions.
When i try to compile the file test.m
when linkung using MinGW clang throws the following error:
when using the clang-cl example it throws
LINK : fatal error LNK1181: Eingabedatei "gnustep-base.lib" kann nicht geöffnet werden.
(Source file "gnustep-base.lib" could not be opened)but it is in path, i tried adding the library path via -L but it says this argument doesn't exist.
am i doing something wrong?
Edit: the first error seems to be caused by clang, the second however i could eliminate by using
clang-cl test.obj gnustep-base.lib objc.lib dispatch.lib /MDd -o test.exe /link /LIBPATH:"C:\GNUstep\x64\Debug\lib"