libraries
Angular 6 library shared stylesheets
For global styles, I’ve answered it in this question. Update For ng-packgr versions 9.x and above Copying assest to output folder is now directly supported as explained in this page { “$schema”: “./node_modules/ng-packagr/package.schema.json”, “name”: “@my/library”, “version”: “1.0.0”, “ngPackage”: { “assets”: [ “CHANGELOG.md”, “./styles/**/*.theme.scss” ], “lib”: { … } } } So in your project you … Read more
How to add libraries in C++?
This would probably interest you, but here is a short version: When you assemble the .cpp, .c or whatever files, each translation unit (that is, each file) generates an object file. When creating the final executable, you combine all the object files into a single binary. For static libraries, you compile the static archive (.a … Read more
How to reference ASP.NET Core 6 types in .NET 6 library?
You need to add a FrameworkReference to your project file instead of a PackageReference as described here. <ItemGroup> <FrameworkReference Include=”Microsoft.AspNetCore.App” /> </ItemGroup> Right-click your project in the Solution Explorer and select “Edit Project File” to open the file and look for the <ItemGroup> section, creating a new one if it does not exist.
Installing Eigen on Mac OS X for XCode
1. Install Homebrew • Package manager for Mac, allows you to download pretty much anything with one Terminal command. Follow steps here. 2. Install Eigen • Simply run the following command in Terminal: brew install eigen • Eigen is now installed. • Make note of the file path that is printed out on the command … Read more
Library design: allow user to decide between “header-only” and dynamically linked?
Preliminary note: I am assuming a Windows environment, but this should be easily transferable to other environments. Your library has to be prepared for four situations: Used as header-only library Used as static library Used as dynamic library (functions are imported) Built as dynamic library (functions are exported) So let’s make up four preprocessor defines … Read more
fatal error LNK1104: cannot open file ‘kernel32.lib’
Check the VC++ directories, in VS 2010 these can be found in your project properties. Check whether $(WindowsSdkDir)\lib is included in the directories list, if not, manually add it. If you’re building for X64 platform, you should select X64 from the “Platform” ComboBox, and make sure that $(WindowsSdkDir)\lib\x64 is included in the directories list.
Using two different versions of the same NuGet package
As already stated, there is nothing wrong with referencing 2 different versions of a NuGet package, as long as it’s in different Visual Studio Projects that those references are made. But this is also where the easy part ends, but I think there are a few options left. Depending on your needs, I see the … Read more