jmont-dev / ollama-hpp

Modern, Header-only C++ bindings for the Ollama API.
MIT License
35 stars 5 forks source link

Windows Support #10

Open jmont-dev opened 1 month ago

jmont-dev commented 1 month ago

The library should be tested using MinGW and Visual C++ on Windows to confirm that it has cross-platform support.

JG-Adams commented 1 month ago

All that I needed in order to compile for MinGW on Window is: set the window macro for window 10. _WIN32_WINNT=0x0A00 And link to winsock. -ws2_32.

In CMake, it look like this. if (WIN32) if (MINGW) add_definitions(-D_WIN32_WINNT=0x0A00) endif(MINGW)

link_libraries(wsock32 ws2_32)

link_libraries(ws2_32)

endif (WIN32)

Fairly straightforward.