cross-platform

Portably handle exceptional errors in C++

此生再无相见时 提交于 2019-12-21 17:18:20
问题 I'm working on porting a Visual C++ application to GCC (should build on MingW and Linux). The existing code uses __try { ... } __except(1) { ... } blocks in a few places so that almost nothing (short of maybe out of memory type errors?) would make the program exit without doing some minimal logging. What are the options for doing something similar with GCC? Edit: Thanks for the pointer to /EH options in Visual Studio, what I need now is some examples on how to handle signals on Linux. I've

Text Editor with Scripting…for Linux

一世执手 提交于 2019-12-21 17:11:40
问题 For a while now, I have been using UltraEdit on my Windows box. The ability to write scripts with a familiar language (JavaScript) has proved to be extremely useful. The only problem is that I cannot use it on my Linux box at work. Is there a comparable text editor that runs on Linux and has an integrated scripting engine? Not breaking the bank and being cross-platform would be great. EDIT:While recordable macros are great, I use the scripting engine much more. 回答1: All of the major open

How can I get mysqldump to preserve the case of table names?

和自甴很熟 提交于 2019-12-21 16:02:07
问题 I'm attempting to migrate a database from a windows to a linux host. Thanks! Ashley 回答1: You are not finding the the table names under linux mysql, coz its default is case-sensitive. And for windows its case-insensitive. I can't guess if ignoring case sensitivity works for you. But you can do by adding a line in my.conf. i.e. making mysql in linux to be case insensitive. mysqlserver:~# vi /etc/mysql/my.cnf ... [mysqld] lower_case_table_names = 1 回答2: Check out the following links and see if

How to approach Java 2D performance variations between different computers?

核能气质少年 提交于 2019-12-21 12:42:36
问题 I've been designing a card game in Java on Windows. It runs really well on my laptop and a few others, but on a lot of other systems (even a few newer ones both Mac and Windows) the animation is incredibly slow. I've found User Interface Toolkits for Java to be the best resource so far, but haven't been able to make a significant improvement. I'm using the AWT/Swing libraries. Question: Looking at my game, (<1.5Mb), how could it be that on some computers (of similar spec) the performance

Flutter iOS build failure error with Multiple commands after the Xcode upgrade

天大地大妈咪最大 提交于 2019-12-21 12:18:41
问题 Flutter iOS build fails after upgrading to Xcode 10.0 version in mac. Nagendras-MacBook-Pro:uaenumber nagendra$ flutter run Launching lib/main.dart on iPhone X in debug mode... Starting Xcode build... Xcode build done. 1.4s Failed to build iOS app Error output from Xcode build: ↳ ** BUILD FAILED ** Xcode's output: ↳ error: Multiple commands produce '/Users/dev/Documents/projects/Personal/uaenumber/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework': 1) Target 'Runner' has

How should I properly initialize a C struct from C++?

ぃ、小莉子 提交于 2019-12-21 12:17:09
问题 I have the following code in a C++ file: #include <sys/socket.h> // ... void someFunc() { struct msghdr msg = {0}; // <<< Uninitialized member here } When I compile with g++ using -Wall -Wextra , I get warnings: error: missing initializer for member 'msghdr::msg_namelen' ...same for several other fields My problem is this: I can't explicitly initialize all the fields, because I don't know what fields will exist (cross-platform) in a struct msghdr . The struct doesn't have a default

Building project involving cmake, how do I make it aware of libraries

情到浓时终转凉″ 提交于 2019-12-21 08:17:06
问题 When I try to build this project with cmake and gcc on a 64-bit linux (debian) machine, I get an error from the linker: Linking C executable ../../../../cpsadamsx /home/dala/lib64/libSimTKcommon.so: undefined reference to `dlopen' /home/dala/lib64/libSimTKcommon.so: undefined reference to `dlclose' /home/dala/lib64/libSimTKcommon.so: undefined reference to `dlerror' /home/dala/lib64/libSimTKcommon.so: undefined reference to `dlsym' collect2: ld returned 1 exit status make[2]: *** [cpsadamsx]

Difference between AXML and XAML?

混江龙づ霸主 提交于 2019-12-21 06:58:25
问题 I'm new to Visual Studio Xamarin Cross-platform mobile development and I keep on searching about AXML I just can't find any tutorial for designing and applying an MVC approach. I have a lot of questions regarding this actually. But i'll just leave this 3 here first. What is their difference? Can xaml designs be applied in axml? How do I apply my css to axml files? 回答1: 1 - What is their difference? AXML: Describe the UI for only Android apps. These are the same files used by Android native

How does screen savers work on Mac OS X and Linux?

拟墨画扇 提交于 2019-12-21 06:21:37
问题 In Windows a screen saver is just an executable with a .scr extension dumped in the system32, and it is controlled with three switches (/p, /c and /s, I think). How does screen savers work on Mac OS X and Linux? Do they work similarly in Mac OS X and Linux (Gnome, KDE, Ubuntu, or wherever the difference is) or is it completely different? Also, can they be developed in C#/Mono? 回答1: The screensaver system in OSX is that a screensaver (typically, but not necessarily) is an Objective-C library,

Creating multi-platform CDs for software distribution

爱⌒轻易说出口 提交于 2019-12-21 06:08:24
问题 This is not strictly programming related, but I hope still relevant. I'm working on a project which is written in Java and intended for use on PCs and Macs. It will be distributed on CD (and perhaps DVD, eventually). Our intended audience is decidedly non-technical and, as such, it's important the CD "just work" when it's loaded. This is not itself difficult. For Windows, we can setup Autorun to automatically launch the app and, for Mac, we can use special folder formatting to make it clear