extern

Trouble binding Objective-C library to C# with Objective Sharpie

匿名 (未验证) 提交于 2019-12-03 02:33:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm attempting to walk through this guide: https://developer.xamarin.com/guides/ios/advanced_topics/binding_objective-c/walkthrough/ trying to create bindings for this github project: https://github.com/lminhtm/LMGaugeView Using Sharpie 3.4. I am running into the following issues: I cannot generate a Fat binary with the architectures i386 armv7 x86_64 arm64 because I am building against iOS11. I can only generate a Fat binary with architectures x86_64 and arm64 , attempting the others gives me the error message invalid iOS deployment version

Installing Matplotlib on CentOS 6.5

匿名 (未验证) 提交于 2019-12-03 02:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to get matplotlib-1.4.0 installed on CentOS 6.5 with Python 2.7.8. I've tried installing with pip and from source. I initially got an error message stating I needed a newer version of Freetype2, which I then installed (version 2.5.3) to /usr/local/bin, /usr/local/include, and /usr/local/lib. The older version of Freetype2 (2.3.11) is in /usr/bin, /usr/include/freetype2/freetype, and /usr/lib. Now when I try installing matplotlib (python setup.py build) it looks like the include paths are all pointing to the wrong (old) version of

Using Opencv Cuda functions from python

匿名 (未验证) 提交于 2019-12-03 02:28:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: For one of my course projects, I need to use the OpenCVs GPU libraries. I am working on an existing code where OpenCV python is used and my work is to find a way to access the OpenCV Cuda libraries as right now there are no accessible Python bindings to OpenCV's various CUDA modules. Two of the functions that i extremely need right now are cuda::warpPerspective and cv::cuda::DescriptorMatcher::knnMatch() . i tried to implement the warpPerspective by following what @ostrumvulpes suggested in Accessing OpenCV CUDA Functions from Python (No

extern “C” linkage inside C++ namespace?

匿名 (未验证) 提交于 2019-12-03 02:20:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: namespace someNameSpace { extern "C" void doSomething() { someOperations(); } } I want to run doSomething() in both C++ and C environment. Is someNameSpace still encapsulating doSomething() if I expose it to extern "C" linkage? Is there a good way to share functions between C++ and C while avoiding polluting global namespace on C++ side? Edit : Because this code is primarily used in C++ mode, while the C linkage is for test use only, I guess this is a better way to do it. namespace someNameSpace { #ifdef COMPILE_FOR_C_LINKAGE extern "C"

The extern alias 'xxx' was not specified in a /reference option

匿名 (未验证) 提交于 2019-12-03 02:13:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have two assemblies that unfortunately define the same type in the same namespace. I'm trying to use a an extern alias to work around the problem. In the Visual Studio IDE I have set the "Aliases" property of the reference to my alias. This is supposed to change the C# compiler command line to be something like this: /reference:MyAlias=MyAssembly.dll But it doesn't actually do that. The Visual Studio IDE seems to just ignore the Aliases property setting on the reference. So when I go and add the line extern alias MyAlias; at the top of my

using extern template (C++11)

匿名 (未验证) 提交于 2019-12-03 02:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Figure 1: function templates TemplHeader.h template void f(); TemplCpp.cpp template void f(){ //... } //explicit instantation template void f (); Main.cpp #include "TemplHeader.h" extern template void f (); //is this correct? int main() { f (); return 0; } Is this the correct way to use extern template , or do I use this keyword only for class templates as in Figure 2? Figure 2: class templates TemplHeader.h template class foo { T f(); }; TemplCpp.cpp template void foo ::f() { //... } //explicit instantation template class foo ; Main.cpp

Drive a POS printer via USB in c# [closed]

匿名 (未验证) 提交于 2019-12-03 02:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Any ideas how i can best drive a USB POS printer from c#. POS printers are usually serial, TCP/IP or USB based. I know how to accomplish serial and TCP/IP but have no idea about communications through USB in C#. I know that there is a layer available from Microsoft called POS.NET, but I want to try and avoid using this. Any ideas or any C# libraries that people can recomend would be really appreciated. Thanks 回答1: You should really consider using POS for .NET and OPOS or .NET service objects (Epson, for example provides both). POS

Setting dllimport programatically in c#

匿名 (未验证) 提交于 2019-12-03 02:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am using DllImport in my solution. My problem is that I have two versions of the same DLL one built for 32 bit and another for 64 bit. They both expose the same functions with identical names and identical signatures. My problem is that I have to use two static methods which expose these and then at run time use IntPtr size to determine the correct one to invoke. private static class Ccf_32 { [ DllImport ( myDllName32 )] public static extern int func1 (); } private static class Ccf_64 { [ DllImport ( myDllName64 )] public static

Parameterising DllImport for use in a C# application

匿名 (未验证) 提交于 2019-12-03 02:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: We have a supplier who provides a library for access to their hardware. Unfortunately, if you have multiple devices, you need to import their library multiple times, with different dll names. As a consequence, we have a metric ton of duplicated code, and I'm worried that it will soon become be a maintenance nightmare. What we have at the moment is somthing like: namespace MyNamespace { public static class Device01 { public const string DLL_NAME = @"Device01.dll"; [DllImport(DLL_NAME, EntryPoint = "_function1")] public static extern int

Best practice to include log4Net external config file in ASP.NET

匿名 (未验证) 提交于 2019-12-03 02:04:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have seen at least two ways to include an external log4net config file in an ASP.NET web application: Having the following attribute in your AssemblyInfo.cs file: [assembly: log4net.Config.XmlConfigurator(ConfigFile = "Log.config", Watch = true)] Calling the XmlConfigurator in the Global.asax.cs: protected void Application_Start() { XmlConfigurator.Configure(new FileInfo("Log.config")); } What would be the best practice to do it? 回答1: At startup, call: XmlConfigurator.Configure(); In your Web.config, specify log4net.Config in appSettings: