How to add additional libraries to Visual Studio project?

前端 未结 4 1994
一向
一向 2020-11-22 06:53

Allergro is an open souce C++ addon library for graphics manipulation. How do I add this library to my compiler?

The instructions don\'t work for me as I have Window

4条回答
  •  爱一瞬间的悲伤
    2020-11-22 07:33

    Without knowing your compiler, no one can give you specific, step by step instructions, but the basic procedure is as follows:

    1. Specify the path which should be searched in order to find the actual library (usually under Library Search Paths, Library Directories, etc. in the properties page)

    2. Under linker options, specify the actual name of the library. In VS, you would write Allegro.lib (or whatever it is), on Linux you usually just write Allegro (prefixes/suffixes are added automatically in most cases). This is usually under "Libraries->Input", just "Libraries", or something similar.

    3. Ensure that you have included the headers for the library and make sure that they can be found (similar process to that listed in step #1 and #2). If it is a static library, you should be good; if it's a DLL, you need to copy it in your project.

    4. Mash the build button.

提交回复
热议问题