I'm writing some C++ code for an iOS app, so I believe I have to use XCode to run/test the app. Is there a way to generate getters/setters and local or instance variables out of statements? Are there any alternatives?
Related
I'm rewriting an old product (written in C++) as a new VSCode extension. The UI part is going to be redesigned and implemented using Typescript.
Is it possible to somehow salvage the functionality logic and invoke it somehow (e.g. wrap it in some library and use it)?
If it's possible, would the solution work for both Windows and Linux VSCode use?
The host program supports C++ plugin. The C++ dll is written as its plugin. The plugin will be initialized by the host program on startup.
Is there any way to use Python to attach to the C++ dll after it's initialized by the host?
The intention is to offload all the heavy work to Python since it's a familiar language.
Based on my search, there is ctypes, can ctypes achieve that? Or do I have to embed a python interpreter inside the C++ dll?
You could create a C++ plugin, then delegate the functionality to your Python code (embeeded in the plugin or on the filesystem) with boost::python.
But you will have to write a good deal of C++ code anyway. And it won't be the easy kind to debug. You will have to bridge the C++ to Python memory management with the one used by your plug-in architecture.
Might as well bite the bullet and write the plugin in C++. Community support is also something to consider. You probably don't want to be the only one with this architecture.
I know that all assemblies can be decompiled somehow, but C# & VB applications are the easiest to be decompiled into source code using tools like ( .Net Reflector ).
So my question is, if I programmed an application using .Net assemblies and functions with C++, would it be easy to decompile it as if it was a C# or VB application with .Net reflector and such tools?
Ok, if I programmed it without using any function from .Net framework and made UI only what calls .Net assemblies, would be easy to decmpile also ?
My question is similar to this one : Could this C++ project be decompiled with such tools like a .NET Reflector?
but no one has answered him correctly, so can anyone help me ?
I want to use .Net and C++ to make my application compiled into both Native & Managed code!
There is no "C++.Net". There is C++/CLI, which is a C++-like language that can be used to glue native C++ code with the .NET world. The managed code you write in it (ref classes) will be compiled to MSIL. The "native" code will compile to either MSIL or native. If you want to compile some parts to native code you need
#pragma managed(push, off)
void foo() {}
#pragma managed(pop)
in your source. The managed pragma can be used to choose the compilation target per-function. Or you can compile without the /clr flag per-module and set your project to produce a mixed-mode assembly.
Be aware that marshaling the native types to .NET and back can take a serious performance hit on your application - and that happens every time you cross the native-managed boundary. But interoperation between such embedded native code and managed code is much faster than normal p/invoke.
See also this question: C++CLI. Are native parts written in pure C++ but compiled in CLI as fast as pure native C++?
I am planning to build an app in C++ for ipad. I have never build any app for ios. I want to know whether is it possible to write a C++ app using Lucene library in ipad. Can i write the code in visual c++ and compile it in xcode. Can i use the same code to work in mac os as well? I really wanted to build the app in Java so it works every where but unfortunately I pad doesnt support java.
Please provide me some good suggestions to build this app.
Thank you.
No. You can't build for iPad in Visual Studio.
You can include C++ in "Objective-C++" files, named .mm, but you will have to learn a minimum of Objective-C in which to include your C++ code.
As for using the same code for mac, it depends on how well you separate your logic from your display code - you can reuse some code, but you can't simply hit "build for Mac" and have iPad apps magically run on the Mac. You'll have to, at the very least, build a totally separate interface.
Building apps for iOS, etc requires some simple steps :
Buy a Mac
Learn some Objective-C
There is no other way around that makes sense.
I've written some ObjC unit tests for use with the OCUnit support in Xcode. Now I would like to do the same for some of the C++ code I'm about to write (a separate static library).
Is there any support for e.g. CppUnit (or some other C++ test framework) in Xcode? When I write support, I mean I want to run the tests and display the results in the Xcode GUI.
Have you looked at Google C++ Testing Framework? That one should be pretty portable.