Can we generate CPP files out of WINRT/header files? - visual-c++

I see that we've a bunch of header files and references(winmd) ,in windows 10 SDK. Is there any way I can generate cpp files as well out of these so that I can compile all of them together and create a library out of this ?
Basically, what I want is : I do not want to include the publicly available WINRT header files inside my app directly. Instead, I want to create a WINRT library with all the WINRT definitions which can be referred/linked to in my app. I'll expose the required definitions via some subset of header files.
Let me know if this is possible.
Thanks in advance.

You can use the cppwinrt.exe tool that ship in the Windows SDK to generate your own headers that you can then include in your project.

Related

Building the client oflibmysqlclient on Windows with MSVC

ALL,
Does anyone succeeds building a client to libmysqlclient on Windows?
Following this instructions I can build the library itself
But then trying to follow mySQL documentaton which reads
To specify header and library file locations, use the facilities provided by your development environment.
With the old mySQL-Connector-C I was able to download just the code for the connector build it and then it had only 1 mysql.h
With the new library (8.0) I have t get the whole package, and there fore it will have multiple copies of mysql.h (yes, I did check by dong search of the file from Windows Explorer and Terminal/Bash).
In terms of library - it is easy as it will be hopefully just one and I can sue -L option for the linker.
But how do I get the proper include folder?
TIA!!
BTW, the tag here needs t be changed - it is not called connector-c anymore

cmake and isolated applications on windows

Considering a plugin system with the following installation pattern:
/install_prefix/main.exe
/install_prefix/plugins/plugin.dll
If my plugin depends on a library compiled as shared, its dll should be installed in the exe path:
/install_prefix/main.exe
/install_prefix/plugin_dependency.dll
/install_prefix/plugins/plugin.dll
I found isolated applications can be used to keep the dependency side by side with the plugin as follows:
/install_prefix/main.exe
/install_prefix/plugins/plugin_dependency.dll
/install_prefix/plugins/plugin.dll
This relies on a manifest file generated with visual. I am using cmake to generate my projects and I can't find any reference on a "good" way to handle isolated applications in a cmake file.
Did anybody have this use case?
EDIT:
This question propose answers on how to embed an already existing manifest file. What I would like is a way to generate the manifest file in the build process, in a perfect world with something as simple as installing exports. Something like:
install(
TARGETS target_name
MANIFEST target_name.manifest
)
This would generate the manifest file and embed it with the target.

Drupal 7 .inc files in custom module

Firstly let me tell all of you that I am a novice to Drupal and trying to Explore it by my own.
I installed MD_FOTO theme from https://www.drupal.org/project/md_foto and its custom module 'md_foto_features' in my test drupal site and its working fine.
I am trying to explore this custom module, I doubt if it will work as this module contains many .inc files like "md_foto_features.context.inc" as one of them but this file is not loaded using include/include_once/require/require_once.
My question is, How is this file being included(loaded) in order to use functions defined in this file ?
Thanks in advance !!!
md_foto_features is a module generated via feature. These inc files are automatically include via feature modules.
http://cgit.drupalcode.org/features/tree/features.module#n396

monotouch bindings project to framework

What are the correct steps to creating a bindings project for a Framework versus a library? (Yes, they are close to the same thing, but NOT the same, the framework is a directory structure with header files, library and resources). These are what I've come up with, note that none of the Framework specific steps are documented as far as I can tell at the Xamarin web site (please prove me wrong).
Create the bindings project via MonoDevelop wizard.
Generate the ApiDefinition.cs and StructsAndEnums.cs files with btouch or by hand.
Copy the file from the root of the framework directory to lib.a (e.g., ArcGIS to libArcGIS.a) and add it to the project. It is important to note that the file without any file extension in the framework directory is in fact a library file.
?? Include framework resources ??
You'll notice that I get foggy at the third step. How to you add these resources to the bindings project? The large part of the bindings project links and runs fine, but I think it crashes at times because it is missing an expected resource.
You must (a) create a C# contract that describes the Objective-C contracts and how you want your projection into C# to look like, and (b) statically distribute the library with your project.
To kick the automatic population of the linkwith.cs you must rename the framework library (for example MyFramework) to use the library pattern (in this case, "libMyFramework.a")
Resources you have to select and flag as resources, they will be bundled directly into your app, and extracted when the library is consumed.

Should third-party static libraries be included as an item in VC++ 2010 project?

I use third party static library (provided as a .LIB file without source code) in my project. For linking purposes it is enough to add it via "Properties/Linker/Input->Additional Dependencies"
This library is not used in any other project in the solution.
I wonder if I should add it as an item to project file itself. The advantages that I see: it will be immediately obvious that this project uses it and one wouldn't have to add it to version control system manually (anything that is a part of the project/solution is added automatically if you use something like AnkSVN).
The project in VCS must be buildable. It is impossible without the lib. So you should add it.

Resources