如何在 VS 2008 中包含 Lua 庫 (How can I include Lua library in VS 2008)


問題描述

如何在 VS 2008 中包含 Lua 庫 (How can I include Lua library in VS 2008)

I'm not sure about this location.

In Properties > Linker > General > Additional Dependencies

I have to include some library in Additional Library Directories, haven't I?

or I have to install some program in my computer?

The problem is I can't to use luaL_dofile, but I can use it before my computer was formatted.

That's why I'm not sure about library. I compile and run my code after my 

computer was formatted suddenly. I'm pretty sure that my code has no problems 

because it can run before my computer was formatted.

‑‑‑‑‑

參考解法

方法 1:

Well, then, obtain the library from where you get it. Place it in some place that you know it will not be moved (or install it if an installer is provided), and do this:

Select menu item Project ‑> Properties ‑> Configuration Properties ‑> Linker ‑>Input.

Now add the name of the library in the "Additional Dependencies" edit control.

方法 2:

You need to do two things:

  1. Add the library directory to Libraries directory
  2. Add the library name (without path, but with extension) to Linker‑>Input‑>Additional Dependencies

(by barssalaLyubomir VasilevBartek Banachewicz)

參考文件

  1. How can I include Lua library in VS 2008 (CC BY‑SA 3.0/4.0)

#lua #visual-studio-2008 #C++






相關問題

使用 MSXML2.ServerXMLHTTP 從網頁訪問數據會在 Lua 中返回截斷的數據 (Using MSXML2.ServerXMLHTTP to access data from a web page returns truncated data in Lua)

如何在 VS 2008 中包含 Lua 庫 (How can I include Lua library in VS 2008)

Corona 中的 iPad 式慣性滾動 (iPad-style inertial scrolling in Corona)

Lua cư xử kỳ lạ trên nền tảng PowerPC / LynxOS, tại sao? (Lua behaves weird on PowerPC/LynxOS platform, why?)

我們如何在函數輸入參數中輸入類型值作為對象? (How do we input type value as object in function input parameter?)

反編譯 Lua 字節碼的最佳工具? (Best tool(s) for decompiling Lua bytecode?)

本機 Lua 中的高效可變字節數組 (Efficient mutable byte array in native Lua)

在 Lua 中字符串化對象名稱 (Stringify object name in Lua)

純 Lua 中的全功能正則表達式庫 (Fully-featured regex library in pure Lua)

自我作為參數,並設置範圍? (self as param, and setting scope?)

已經放 } 但錯誤仍然說 } 是預期的? (Already put } but the error still says that } is expected?)

我想使用 HPC 的 gpu 並嘗試 module add CUDA ...但出現錯誤。錯誤是“Lmod 檢測到以下錯誤: (I want to use the gpu of the HPC and try module add CUDA... But errors occurs. The error is "Lmod has detected the following error:)







留言討論