cross-platform

dlsym returns NULL where GetProcAddress returns valid IntPtr

这一生的挚爱 提交于 2019-12-25 10:46:32
问题 While making a cross-platform game I found the need for a cross-platform DLL linker, my DLL linker class seems to be "up to standards" but it only works on Windows machines, while it is designed to work on both Window and Linux machines. This is due to dlsym( IntPtr handle, string symbol ) returning IntPtr.Zero whereas GetProcAddress( IntPtr hModule, string lpProcName ) returns a valid IntPtr pointing to the desired symbol. Code public static class DLL { #region DllImport [DllImport(

How can I optionally use Win32::Console and its constants in a cross platform way?

早过忘川 提交于 2019-12-25 08:59:37
问题 To start with, I'm working Perl v5.8.4 and I DO NOT have the ability to upgrade Perl or install Term::ReadKey or IO::Prompt (or really anything outside of what is in Core), so please take that into consideration when answering/commenting. I'm trying to write a completely self contained Perl script that (among other things) prompts for a password. It needs to be cross platform compatible between Windows, AIX, and Solaris. I don't want it to echo the password as it is typed. Here's what I have:

Drawing QR code with Qt in native C/C++

﹥>﹥吖頭↗ 提交于 2019-12-25 07:47:10
问题 I am successfully drawing and displaying the QrCode on a QLabel , but it's not recognised when I scan it. Here is the code I used - I made a small class with a static function: void QrCodeDrawer::paintQR(QPainter &painter, const QSize sz, const QString &data, QColor fg) { char *str=data.toUtf8().data(); // NOTE: At this point you will use the API to get the encoding and format you want, instead of my hardcoded stuff: QrCode qr = QrCode::encodeText(str, QrCode::Ecc::HIGH); const int s=qr.size

Compiling C++ for OSX from Windows

对着背影说爱祢 提交于 2019-12-25 07:43:07
问题 I have a small console based, standards compliant, C++ program that I developed in Visual Studio on Windows. Since it is in standard C++, is all I need to do is compile it for OSX? or am I being overly optimistic? I am looking for the easiest and most straightforward way to do this. Is it possible to do from Visual Studio 2012 Professional? If necessary I have access to a Mac. However, since my dev platform is Windows, it would be nice if I could do it from here. I'm not experienced with mac

Xamarin cross platform UWP images are missing

喜你入骨 提交于 2019-12-25 07:31:42
问题 I am working on Xamarin cross platform project where if I placed the images inside the sub folder it is not loading on the screen. Please refer my code and folder structure along with properties 回答1: Put your Images folder under Assets Folder like this: Assets/Images/*.png and if you are using Localizing make like this: Assets/Images/en/*.png Assets/Images/another language/*.png for more information you can check this Working with Images i hope that answer you question. 来源: https:/

Visual Studio xamarin forms iOS entrypointnotfound with simulator but not iphone

社会主义新天地 提交于 2019-12-25 07:21:10
问题 In my Visual Studio Xamarin Forms iOS project, I am linking against a native (c++) library I built and deployed using Visual Studio Cross C++ Platform. I can link and run against an actual device (through the Mac Server), but I cannot get it to work through the simulator. If I build with the same link settings, the build fails, not being able to find the entrypoint. If I choose not to link, then the build succeeds but I get am Entrypointnotfoundexception when running at the point where I try

How to build wxmathPlot for win32?

半世苍凉 提交于 2019-12-25 07:05:15
问题 I downloaded the latest wxmathplot but the readme is a bit sparse with instructions on how to build on win32 platform. Has anyone used this library for win32? Can someone point me to the docs or give some hints/advice on how to build for win32 targets. We'll eventually use this for cross platform stuff, for now it is just win32 until we port our other code. I presume I have to use CMake, but have not used it before and it is not obvious to me how to build this all - I have already installed

Alternative options for displaying video in Java?

大兔子大兔子 提交于 2019-12-25 04:56:12
问题 At the moment I use QuickTime for Java to display video in a swing application. However, Apple has deprecated support for QTJava and I was wondering what options other are available right now + for moving forward? Requirements: Must be cross platform (WIN & OSX). Must be able to support many different video formats. Must be capable of supporting large videos (i.e. Hi-Def). API must provide access to raw frames and audio tracks. +JMC could be included in Java7, whenever that turns up and at

In Corona SDK, how do I limit the number of lines drawn to one?

ε祈祈猫儿з 提交于 2019-12-25 03:53:18
问题 If I move the mouse off the line path when drawing a line, new lines continue appearing from the same center point. I have been trying to limit it to one line only, but I've not had much success. This is my code so far: local lines = {} local lineGroup = display.newGroup() local prevX,prevY local isDrawing = false local i = 0 local function distanceBetween(x1, y1, x2, y2) local dist_x = x2 - x1 local dist_y = y2 - y1 local distanceBetween = math.sqrt((dist_x*dist_x) + (dist_y*dist_y)) return

UDP socket buffer overflow detection

↘锁芯ラ 提交于 2019-12-25 02:11:39
问题 I'm developing cross-platform tool that captures multiple udp streams with various bit-rate. boost::asio is used for networking. Is there any way to detect the situation when the udp buffer was full and data loss on socket could take place? The only way I can see now is reading /proc/%pid%/net/udp, but it's not aplicable for windows as you know :). Also I'd like to use boost features for it if possible. 回答1: If you need this capability, you have to code it into the protocol you are using. UDP