在Windows(CLION)上安装和编译irrlicht [英] Install and compile irrlicht on windows (CLION)

查看:82
本文介绍了在Windows(CLION)上安装和编译irrlicht的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一名学生开发人员,并且我一直在Linux上进行开发.这是我要做交叉平台的第一个项目.因此,我在Windows上安装了Git Bash,Visual Studio Pro和CLion.通常,我使用GCC和Makefiles进行编译.因此,在Linux上,我安装了lib运行lib的示例,并且可以正常工作.但是当我想在Windows上编译它时,它变得很复杂.

I'm a student developer and I've always dev on Linux. This is the first project I have to do crossplateform. So I installed Git Bash, Visual Studio Pro and CLion on Windows. Usually I compile with GCC and Makefiles. So on Linux I installed the lib run the examples of the lib and it work. But when I want to compile it on Windows, it gets complicated.

我使用Irrlicht提供的示例文件来确保它不来自源头.

I use the example files given by Irrlicht to make sure it doesn't come from the sources.

这是我的CMakeLists.txt

Here is my CMakeLists.txt

cmake_minimum_required(VERSION 3.9)
project(bomberman)

set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
set(CMAKE_CXX_STANDARD 11)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)

find_package(Irrlicht)


link_libraries(Irrlicht)

INCLUDE_DIRECTORIES(
        "/usr/include/irrlicht"
${PROJECT_SOURCE_DIR}/include
)
include_directories(inc)

add_executable(bomberman
 src/main.cpp)

我没有在Windows上安装Irrlicht,因为我不知道该怎么做.因此,我尝试了很多事情并环顾了Internet,实际上我添加了:

I didn't install Irrlicht on Windows because I don't know how to do it. So, I tried many things and look around the Internet, actually I add:

  • Irrlicht.exp
  • Irrlicht.lib

我把它放在项目的根目录,但我不知道将所有带有H点的库放在哪里.而且我不知道如何优化CROSSPLATEFORM.如果有人有建议,tuto和建议,我真的很喜欢.

And I put it at the root of the project but I don't know where to put all the lib with the H points. And I don't know how to optimize CROSSPLATEFORM. If anyone has tips, tuto, advice I'm really into.

先感谢您的社区.

Thank you in advance the community.

推荐答案

您的CMakeList不必在Windows上运行,只需提供一个.exe安装程序即可在服务器上安装项目.

Your CMakeList doesn't have to work on windows you just have to provide an .exe installer that install the project on the server.

这是我对indie_studio主题的解释:

This is my interpretation of the indie_studio subject:

您必须将CMake 用作跨平台构建系统(它只是cmake描述而不是必需条件):

•Linux:由cmake生成的Makefile必须具有安装目标,该目标将在系统上安装所需的库和游戏.

•Linux: the Makefile generated by cmake must have an install target which will install the required libraries and the game on the system.

•Windows:您必须提供可执行的安装程序文件.各种程序可让您轻松创建安装程序.

•Windows: you must provide an executable installer file. Various programs let you easily create an installer.

祝你好运:)

这篇关于在Windows(CLION)上安装和编译irrlicht的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆