首页 \ 问答 \ 将静态库链接到类库项目(Linking static library to a class library project)

将静态库链接到类库项目(Linking static library to a class library project)

我有一个扩展名为.lib的静态库。 现在,我想将此库链接到Microsoft Visual Studio 10中的类库项目,并使用我的类库项目中的函数。 我通过使用properties-> linker->其他库目录将.lib文件的路径添加到我的类库项目中,但我仍然不能在.lib文件中包含头文件。 它说“没有这样的文件或目录......”那么,我该如何解决这个问题呢? 提前致谢...


I have a static library with .lib extension. Now, I want to link this library to a class library project in Microsoft Visual Studio 10 and use the functions in my class library project. I add the path of .lib file to my class library project by using properties->linker-> additional library directories, but still I can't include the headers in .lib file. It says "No such a file or directory..." So, how can I solve this problem? Thanks in advance...


原文:https://stackoverflow.com/questions/38692438
更新时间:2022-01-05 21:01

最满意答案

对于这种简单的全面的XML构造可能是矫枉过正的。 您可以简单地将表格值插入字符串模板,如下所示:

$results = $DataSet.Tables[0] | ForEach-Object {
  '<result><channel>{0}</channel><value>{1}</value></result>' -f $_.col1, $_.col2
}

$prtg = "<prtg>{0}</prtg>" -f (-join $results)

col1col2替换为实际的字段名称。


For something this simple full-blown XML construction might be overkill. You could simply insert your table values into string templates, like this:

$results = $DataSet.Tables[0] | ForEach-Object {
  '<result><channel>{0}</channel><value>{1}</value></result>' -f $_.col1, $_.col2
}

$prtg = "<prtg>{0}</prtg>" -f (-join $results)

Replace col1 and col2 with the actual field names.

相关问答

更多
  • $query ,执行查询后不只有一个数字。 它将拥有一个资源 ,就像你要执行的任何其他查询一样。 为了实际获得结果,请像处理任何其他资源一样对待它: $result = mysql_fetch_array($query); echo $result[0]; $query, after executing the query doesn't have just a number. It'll have a Resource just like any other query you would execut ...
  • while(....) { $noti = ... } echo $noti; 你在每次迭代中都要覆盖$ noti,因此在循环之后只能访问最后一个值。 在while循环中打印$ noti的值。 或者通过字符串连接将新字符串附加到$ noti的当前值: http : //docs.php.net/manual/en/language.operators.string.php while(....) { $noti = ... } echo $noti; You're overwriting $no ...
  • 对于这种简单的全面的XML构造可能是矫枉过正的。 您可以简单地将表格值插入字符串模板,如下所示: $results = $DataSet.Tables[0] | ForEach-Object { '{0}{1}' -f $_.col1, $_.col2 } $prtg = "{0}" -f (-join $results) 将col1和col2替换为实际的字段名称。 For ...
  • 即使是单个空间也可能导致此错误。 删除不必要的空格,但您可以将此(更正的)标题放在脚本的顶部 header("Content-Type: text/xml"); 由于此标头信息不在任何条件语句中 - 它始终发送。 或者,使用输出缓冲; 将以下内容添加为第一行: ob_start(); 最后, ob_flush(); 请参阅有关输出缓冲的文档 。 Even a single space can cause this error. Remove unnecessary white-space, but y ...
  • 我会使用PreparedStatment ,我会增加默认的ResultSet fetchSize ,我会将查询限制为三列( 注意 id != Number ) - String query = "select Number, Name, Progress from system"; stmt = conn.prepareStatement(query); rs = stmt.executeQuery(); rs.setFetchSize(250); 最后,建立这样的连接可能是获得性能的错误方法。 您应该寻 ...
  • 你的问题类似于这个问题: SQL Server - 以XML数据类型存储换行符 排名最高的答案表示您需要使用VARCHAR (或TEXT )数据类型。 但是,此问题讨论了在数据库中存储XML的最佳实践,并建议将XML存储在数据库之外。 (如果您有SQL Server,则FILESTREAM可以全文搜索。) 在SQL Server中存储大量XML类型数据的最佳实践 You question is similar to this question: SQL Server - Storing linebreaks ...
  • 使用xmerl在Erlang中创建XML: 1> MysqlResult = {selected,["id","first_name","last_name"], 1> [{1,"Matt","Williamson"}, 1> {2,"Matt","Williamson2"}]}. {selected,["id","first_name","last_name"], [{1,"Matt","Williamson"},{2,"Matt","William ...
  • 这个问题在这里得到解答: 在MySQL中解析XML字符串 如果您将子项更改为“B”,则该文章的解决方案应该有效: DECLARE i INT DEFAULT 1; DECLARE count DEFAULT ExtractValue(xml, 'count(//child)'); WHILE i <= count DO SELECT ExtractValue(xml, '//child[$i]'); SET i = i+1; END WHILE This problem was answered her ...
  • 我是通过将列分成两列来完成的 SET @xml= ' 1 2 '; SELECT SUBSTRING_INDEX(ExtractValue(@xml, '//id'), ' ', 1) AS `id1`, SUBSTRING_INDEX(ExtractVal ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)