Francesco149 / oppai-ng

difficulty and pp calculator for osu!. better, smaller, faster rewrite of https://github.com/Francesco149/oppai
The Unlicense
155 stars 36 forks source link

Compiler Errors with C++17/MSVC #48

Closed MaxKruse closed 5 years ago

MaxKruse commented 5 years ago

Hi, maybe im just retarded but i cant seem to compile oppai when adding it to my project.

https://i.imgur.com/8UNA5qL.png

not sure if im at fault or msvc

Francesco149 commented 5 years ago

oppai-ng is c, and it's not compatible with c++, so for c++ project you must include oppai.c without OPPAI_IMPLEMENTATION and then compile oppai.c separately as C

extern "C" {
#include "oppai.c"
}

and then add oppai.c to the project so it gets compiled

MaxKruse commented 5 years ago

Yea i was just stupid. Built oppai as static lib, linked and #define'd static header on includd, working now :)