Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/293.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在VisualStudio12的窗口运行时组件中使用zlib_C#_C++_Visual Studio_Zlib - Fatal编程技术网

C# 在VisualStudio12的窗口运行时组件中使用zlib

C# 在VisualStudio12的窗口运行时组件中使用zlib,c#,c++,visual-studio,zlib,C#,C++,Visual Studio,Zlib,我在VisualStudio12中创建了一个Windows应用商店应用程序c。在这里,我需要使用使用C++语言的MIZIIP和ZLIB。 < >使用本地C++代码,我创建了一个Windows运行时组件()。它起作用了。我在visualstudio()中编译了zlib,但我不知道如何使用它 #include <zlib> #包括 在我的Windows运行时组件项目的cpp文件中 我看到我可以用Manager在VS中安装zlib.netNuget,但相同 // Class1.cpp

我在VisualStudio12中创建了一个Windows应用商店应用程序c。在这里,我需要使用使用C++语言的MIZIIP和ZLIB。 < >使用本地C++代码,我创建了一个Windows运行时组件()。它起作用了。我在visualstudio()中编译了zlib,但我不知道如何使用它

#include <zlib>
#包括
在我的Windows运行时组件项目的cpp文件中

我看到我可以用Manager在VS中安装zlib.netNuget,但相同

// Class1.cpp
#include "pch.h"
#include "Class1.h"

using namespace MyWindowsRuntimeComponent;
using namespace Platform;

#include <zlib.h> //cannot open source file zlib

Class1::Class1()
{
}

bool Class1::unzip(char* file) {
    unzFile zip = unzOpen(file); //need to call this function
    //...
}
//Class1.cpp
#包括“pch.h”
#包括“Class1.h”
使用名称空间MyWindowsRuntimeComponent;
使用命名空间平台;
#include//无法打开源代码文件zlib
Class1::Class1()
{
}
bool Class1::解压(char*文件){
unzFile zip=unzOpen(文件);//需要调用此函数
//...
}

谢谢

你的Windows应用商店应用程序是C#one吗?您是否添加了对该项目的引用?AFAIK zlib是一个C项目。您确定不希望包含
#include
?“使用一个包含”是什么意思?我的Windows商店应用程序是用C语言完成的,但是我需要调用使用ZLIB的本地C++代码(这就是为什么我创建了另一个PROYSECT: Windows运行时组件),在这个代码中,在CPP文件(或C文件)中,我需要使用一个“包含”。要在项目设置中使用zlib functions.set zlib的路径include目录,请使用的duse zlib.hp可能是