Cannot find -lSDLmain and -lSDL when compiling simple SDL program with g++

后端 未结 1 894
时光取名叫无心
时光取名叫无心 2021-01-26 16:52

I installed SDL2 for mingw using this guide. However, when i try to compile using the compilation syntax and test code they provide, only with my own file names, I get the error

1条回答
  •  北荒
    北荒 (楼主)
    2021-01-26 17:17

    One way to let MinGW know where your SDL libraries are would be to create environment variable named "LIBRARY_PATH" with the value as the path to the directory containing the libraries. Similarly, you can have "CPLUS_INCLUDE_PATH" for the headers as well.

    Did you follow step 2 of that tutorial ?

    0 讨论(0)
提交回复
热议问题