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

WIndows build fails with -DBUILD_SHARED_LIBS=ON #699

Closed
trrahul opened this issue Apr 2, 2023 · 1 comment
Closed

WIndows build fails with -DBUILD_SHARED_LIBS=ON #699

trrahul opened this issue Apr 2, 2023 · 1 comment
Labels
bug Something isn't working build Compilation issues stale

Comments

@trrahul
Copy link

trrahul commented Apr 2, 2023

If you build on windows using -DBUILD_SHARED_LIBS=ON, it fails with linker errors.

common.obj : error LNK2019: unresolved external symbol ggml_mlock_supported referenced in function "void __cdecl gpt_print_usage(int,char * *,struct gpt_params const &)" (?gpt_print_usage@@YAXHPEAPEADAEB
Ugpt_params@@@Z)
quantize.obj : error LNK2019: unresolved external symbol ggml_time_init referenced in function main
quantize.obj : error LNK2019: unresolved external symbol ggml_init referenced in function main

I don't have enough knowledge in makefiles to fix the issue correctly but a workaround solved it for me.

  1. Open the generated solution in visual studio
  2. Add ggml in references of the failing projects.
  3. Right click ggml under References-> Properties -> Set Link Library Dependencies to True

image
image

@gjmulder gjmulder added bug Something isn't working build Compilation issues labels Apr 6, 2023
@github-actions github-actions bot added the stale label Mar 25, 2024
Copy link
Contributor

This issue was closed because it has been inactive for 14 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build Compilation issues stale
Projects
None yet
Development

No branches or pull requests

2 participants