如何打开我自己在代码中创建的库

时间:2019-12-03 19:43:44

标签: c++ header static-libraries

proof that "streamlib/framework.h" doesnt work the directory in which the vs code is我创建了一个名为streamlib.lib的库 该库是通过混搭创建的,但是您可以将其称为名为framework.h的h文件 我以以下方式使用了名称空间: 命名空间MSL { } 在.h文件和.cpp文件中。 我试图添加库并在framework.h文件中使用函数,但首先我必须包括库本身。 我怎样才能做到这一点? 香港专业教育学院尝试过的事情:

#pragma comment(lib, "streamlib.lib")

#include <streamlib/framework.h>

#pragma comment(lib, "streamlib.lib")

#include <streamlib/framework.h>

#include "framework.h"

#include "streamlib.lib"

但是我还没有找到办法。 有人知道吗? 编译器不会编译说他不能包含该文件。 规范:framework.h在streamlib.lib中,它与cpp文件位于同一文件夹中,试图将库包含到该文件中。

0 个答案:

没有答案