- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
make
在 steamworksexample
文件夹失败并出现错误:steam/sdk/steamworksexample$ make steam/sdk/steamworksexample/../tools/linux/bin/g++ -g -DPOSIX -DSDL -I/home/steam/sdk/steamworksexample/../tools/linux/runtime/i386/usr/include/SDL2 -D_REENTRANT -DGNUC -O0 -I/home/steam/sdk/steamworksexample/../public -DDEBUG -c Inventory.cpp -o debug/Inventory.o -MD -MF debug/Inventory.dep
Inventory.cpp: In member function 'void CSpaceWarLocalInventory::OnSteamInventoryFullUpdate(SteamInventoryFullUpdate_t*)': Inventory.cpp:61:61: error: 'nullptr' was not declared in this scope Inventory.cpp: In member function 'void CSpaceWarLocalInventory::OnSteamInventoryResult(SteamInventoryResultReady_t*)': Inventory.cpp:131:62: error: 'nullptr' was not declared in this scope Inventory.cpp: In member function 'void CSpaceWarLocalInventory::DoExchange()': Inventory.cpp:218:18: error: 'nullptr' was not declared in this scope Inventory.cpp: In member function 'void CSpaceWarLocalInventory::GrantTestItems()': Inventory.cpp:243:35: error: 'nullptr' was not declared in this scope Inventory.cpp: In member function 'const CSpaceWarItem* CSpaceWarLocalInventory::GetItem(SteamItemInstanceID_t) const': Inventory.cpp:254:9: error: 'nullptr' was not declared in this scope Inventory.cpp: In member function 'const CSpaceWarItem* CSpaceWarLocalInventory::GetInstanceOf(SteamItemDef_t) const': Inventory.cpp:276:9: error: 'nullptr' was not declared in this scope Inventory.cpp: In member function 'void CSpaceWarLocalInventory::RefreshFromServer()': Inventory.cpp:283:33: error: 'nullptr' was not declared in this scope make: *** [debug/Inventory.o] Error 1
最佳答案
我刚刚得到了 steamworks 示例,可以在我的 Ubuntu 14.04 计算机上构建和运行。我没有很好的解决方案,但有一些 hacky 解决方案。
简短的解决方案是运行(您需要在此处修改包含路径到您拥有此代码的任何目录):
make CFLAGS="-std=c++0x -include /home/bbales2/sdk/public/steam/steamtypes.h -I/home/bbales2/sdk/tools/linux/runtime-release/amd64/usr/include/SDL2/ -DSDL=1"
make CFLAGS="-std=c++0x -I/home/bbales2/sdk/tools/linux/runtime-release/amd64/usr/include/SDL2/ -DSDL=1"
error: 'nullptr' was not declared in this scope
GameEngine.h:129:52: error: 'uint32' has not been declared
GameEngine.h:129:67: error: 'uint32' has not been declared
GameEngine.h:132:52: error: 'byte' has not been declared
GameEngine.h:132:65: error: 'uint32' has not been declared
GameEngine.h:132:80: error: 'uint32' has not been declared
GameEngine.h:135:52: error: 'DWORD' has not been declared
gameenginesdl.h:18:17: fatal error: SDL.h: No such file or directory
In file included from <command-line>:0:0:
/home/bbales2/sdk/public/steam/steamtypes.h:107:15: error: variably modified 'Salt_t' at file scope
/home/bbales2/sdk/public/steam/steamtypes.h:123:1: error: initializer element is not constant
make: *** [debug/glew.o] Error 1
Main.cpp:248:2: error: #error Need CreateGameEngine()
... (bunch of Warnings)
Main.cpp: In function 'int RealMain(const char*, HINSTANCE, int)':
Main.cpp:251:2: error: expected primary-expression before 'if'
Main.cpp:251:2: error: expected ',' or ';' before 'if'
make: *** [debug/Main.o] Error 1
关于ubuntu - 如何在 ubuntu 上运行 steamworks 示例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32452155/
我是一名优秀的程序员,十分优秀!