How to Generate Windows DLL versioning information with CMake

You could use your CMake variable values in conjunction with a version.rc.in file and the configure_file command. // version.rc.in #define VER_FILEVERSION @MY_PRODUCT_NUMBER@,@MY_PRODUCT_VERSION@,@MY_BUILD_NUMBER@,0 #define VER_FILEVERSION_STR “@MY_PRODUCT_NUMBER@.@MY_PRODUCT_VERSION@.@MY_BUILD_NUMBER@.0\0” #define VER_PRODUCTVERSION @MY_PRODUCT_NUMBER@,@MY_PRODUCT_VERSION@,@MY_BUILD_NUMBER@,0 #define VER_PRODUCTVERSION_STR “@MY_PRODUCT_NUMBER@.@MY_PRODUCT_VERSION@.@MY_BUILD_NUMBER@\0” // // …along with the rest of the file from your “manual methods” reference And then, in your CMakeLists.txt file: # CMakeLists.txt set(MY_PRODUCT_NUMBER 3) … Read more

WinDbg symbol resolution

Sorry for the late reply. In your post you mention that you are seeing the following error message. *** WARNING: Unable to verify checksum for C:\TheProgram\SomeSubfolder\AnotherSubfolder\MyDll.dll You also ask the question, “where do I put my symbols for my DLL in the symbol path?” Here is a response for the first problem: Steps to identify … Read more

Generating DLL assembly dynamically at run time

using System.CodeDom.Compiler; using System.Diagnostics; using Microsoft.CSharp; CSharpCodeProvider codeProvider = new CSharpCodeProvider(); ICodeCompiler icc = codeProvider.CreateCompiler(); System.CodeDom.Compiler.CompilerParameters parameters = new CompilerParameters(); parameters.GenerateExecutable = false; parameters.OutputAssembly = “AutoGen.dll”; CompilerResults results = icc.CompileAssemblyFromSource(parameters, yourCodeAsString); Adapted from http://support.microsoft.com/kb/304655

‘Could not load file or assembly ‘netstandard, Version=2.0.0.0, …’. Reference assemblies should not be loaded for execution

The netstandard.dll you are trying to load is a reference assembly that which cannot be loaded for runtime on .NET Framework as pointed out by others. However if you need to resolve that dependency you will need to runtime version that maps to the framework you are trying to run on. For .NET Standard support … Read more

sox FAIL util: Unable to load MAD decoder library (libmad) function “mad_stream_buffer”

Steps to using SOX to create MP3s: Download latest version of SOX and install. Download libmad-0.dll and libmp3lame-0.dll. The currently only known trustworthy source is ossbuild but this requires you to download a 1.5 GB archive. The selected two files are available here and here. Add libmad-0.dll and libmp3lame-0.dll to the folder where SOX was … Read more

Command Line to see the contents Shared Object Module(lib*.so)

use nm -D –defined-only libname.so to get the symbol names from your dynamic library. The –defined-only switch shows you only the symbol that are defined in these files, and not references to external functions. An alternative is to use objdump, and catch only the symbols in the text section : objdump -T /usr/lib/libjpeg.so | grep … Read more

Nested structures in Ruby Fiddle

How about: data.c #include <stdio.h> struct A { int a_id; }; struct B { int b_id; struct A a_nested; }; void dump_b(struct B* b) { printf(“B.b_id: %d\n”, b->b_id); printf(“B.a_nested.a_id: %d\n”, b->a_nested.a_id); } fiddle.rb # frozen_string_literal: true require ‘fiddle’ require ‘fiddle/import’ module Test extend Fiddle::Importer dlload ‘./data.dylib’ B = struct [ “int id”, “int a_id” ] … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)