2012-02-24 42 views
0

我有一個簡單的問題。當我打開VC++,創建一個「空項目」,插入Lua 5.2.0源代碼,然後編譯,我沒有錯誤。但是,當我這樣做,除了開始時選擇「Windows窗體應用程序」,我得到了一大堆錯誤。什麼可能造成這種情況?Lua和Visual C++

編輯:

的錯誤是關於特定功能的安全版本:

1>..\lua-5.2.0\src\lua.c(102): error C3861: 'signal': identifier not found 1>..\lua-5.2.0\src\lua.c(178): error C3861: 'signal': identifier not found 1>..\lua-5.2.0\src\lua.c(180): error C3861: 'signal': identifier not found 1> luac.c 1>..\lua-5.2.0\src\luac.c(43): warning C4996: 'strerror': This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(157) : see declaration of 'strerror' 1>..\lua-5.2.0\src\luac.c(178): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(234) : see declaration of 'fopen' 1> lundump.c 1> lvm.c 1>..\lua-5.2.0\src\lvm.c(53): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf' 1> lzio.c 1> Generating Code...

+1

「什麼可能導致此?」我不知道;你沒有打擾告訴我們錯誤*是什麼。 – 2012-02-24 23:52:07

回答

1

這可能是因爲當你創建一個Windows窗體應用程序,它實際上是用託管C++(用途。淨),我不認爲lua是兼容的。看看http://luaplus.org/這可能是你正在尋找的。它似乎是任何.net語言(管理c + +)的lua。