main.cpp
应该是可执行的 C++ 应用程序。它应依赖于
- 它是一个需要首先编译的项目(在 main.cpp 之前)。
- Lib1 , 例如 OpenCV 平台)
我需要它适用于 Windows 和 Linux,如果可能的话
,为 Windows 找到 Mac OS:查看 此处 - “常见任务” 第 26 页
exe hello : hello.cpp some_library.lib /some_project//library
: <threading>multi
;
我希望 Boost 创建者能有更好的 - 更易读的语法...顺便说一句,
这到底是做什么的
在 Windows 上,如果应用程序使用
共享库,以及
应用程序和库是
使用 Boost.Build 构建,它不是
可以立即运行
应用程序,因为 PATH
环境变量应包括
库的路径。这意味着
你必须添加路径
手动,或者让构建放置
应用程序和库到
同一目录。
意思是?我不能拥有一个包含 2 个嵌套项目的项目 - 一个用于 .lib,一个用于使用该 .lib 的应用程序?
有了这个,我知道如何连接 1 .lib 但如何将文件夹与它们连接?以及如何连接包括?当我转向 Linux 时,会发生什么变化?
我的 bjam make/config 文件应该是什么样子?
main.cpp
which should be executable C++ app. It shall depend on
- Lib1 be a required to be compiled first (before main.cpp) project-lib (with lib1.h and lib1.cpp inside some separate folders)
- 'Lib2.lib' with its dependency given precompiled libs (like cross-platform OpenCV for example)
I need it to work for Windows and Linux and if possible Mac OS
found for windows: look here - "Common tasks" page 26
exe hello : hello.cpp some_library.lib /some_project//library
: <threading>multi
;
I hoped for better - more readable syntax form Boost creators... And BTW
What the hell on earth does
On Windows, if an application uses
shared libraries, and both the
application and the libraries are
built using Boost.Build, it is not
possible to immediately run the
application, because the PATH
environment variable should include
the path to the libraries. It means
you have to either add the paths
manually, or have the build place the
application and the libraries into the
same directory.
mean? I can not have a project with 2 nested project - one for .lib and one for app using that .lib?
With this I see how to connect 1 .lib but how to connect a folder with them? And how to connect includes? And when I'll go to Linux what shall be changed?
How should my bjam make/config file look like?
发布评论
评论(1)
听起来您想要一个适用于跨平台(多操作系统)场景的框架。
最简单的选择是安装 cygwin 并为 linux 创建标准 makefile。在 cygwin 环境中编译以生成 Windows 等效项。
您将节省大量创建 makefile 的时间。
另一个选择是 mksnt。
It sounds like you want a framework which works on a cross-platform(Multiple operating system) scenario.
Simplest option would be to install cygwin and create a standard makefile for linux. Compile in a cygwin environment to generate the windows equivalent.
You will save substantial time in creating the makefile.
Another option is mksnt.