我想發佈關於sdl_mixer的包,它是一個本地包。我的確如tutorial所說。我把.dll
.h
和.lib
文件到包內容 ,但最終方案沒有奏效。那麼什麼是創造C++的NuGet包正確的方式?如何爲本地C++創建nuget包
另一個問題是我的NuGet發現,大多數原生C++封裝刊登在兩份套餐爲例:
sdl2_ttf.v140
sdl2_ttf.v140.redist
所以就是這兩個文件之間的差異,我怎麼能發佈包這樣的?
--------------------------------------- update ------ ------------------------------
當我喜歡教程說如何發佈本地包。我寫了像下面autopkg file
nuget{
nuspec {
id = MySdl_mixer;
version :2.0.0.0;
title: sdl mixer;
authors: { Sam Lantinga, Stephane Peter, Ryan Gordon};
owners: {spartawhy117};
licenseUrl: "http://libsdl.org/license.php";
projectUrl: "http://libsdl.org/index.php";
iconUrl:"";
requireLicenseAcceptance:false;
summary:Nothing;
description: @"SDL_mixer is a sample multi-channel audio mixer library....
";
releaseNotes: "Release of C++ ";
copyright:Copyright 2015;
tags: {v140 ,sdl_mixer , native, CoApp };
};
files {
#defines {
Include = include\;
Bin = bin64\;
Lib = lib64\;
}
include:{"${Include}*"};
[x64,v140,debug,desktop]{
lib: ${Lib}SDL2_mixer.lib;
bin: ${Bin}SDL2_mixer.dll;
}
[x64,v140,release,desktop]{
lib: ${Lib}SDL2_mixer.lib;
bin: ${Bin}SDL2_mixer.dll;
}
};
targets {
Defines += HAS_SDLMIXER;
};
}
運行命令
Write-NuGetPackage .\sdl_mixer.autopkg
後返回錯誤:最終的意外輸入。所以有什麼問題 ?
「不工作」不知道多少......問題是什麼?什麼都沒有安裝,運行時錯誤發生,組件丟失? – dlatikay
@dlatikay當我想包含.h文件時,它提醒我找不到頭文件。 – spartawhy117
你可以確保你沒有錯過你的autopkg文件末尾的「}」嗎?該錯誤表明autopkg文件內容不正確。 –