Hi all.
I am C# developer
I want to use a barcode library I am used to work with in Windows through a wrapper library in linux too.
This Wrapper library should be cross platform but unfortunately still references the System.Drawing.Common based on libgdi+ that is considered deprecated.
So I am writing my own wrapper in order to paint the metadata using alternative libraries like
ImageSharp or SkiaSharp (or even skiasharp wrapped by Microsoft.Maui.Graphics)
My wrapper works great if compiled for windows running in windows but fails silently if i compile for linux_x64 and runs on my Ubuntu focal 20.04 Distribution under WSL2.
I’ve tried also on another WSL2 with Ubuntu 24.02, and also on a real installation of 24.04 on a server.
Always the same behoviour:
I set the data for the barcode (super simple based on an SDK example), i cal the function BCCreate, and then i ask the number of modules, and reports 0 modules.
With no modules generated, I get no callback calls for drawing bars or to get metadata.
But, using the commandline tool to generate a bitmap file with a barcode, the barcode is generated correctly (except for artefacts added by pourpose if we don’t apply the license information in the license.it file in “/usr/local/share/tbarcode11”).
I carefully checked the Marhalling of the functions are correct also for linux version of the native dynamic library (.so), and verified that the commands accepts data with no errors only if the marshalling is correct, and the callback to write the human readable text, works and provides the correct text
at the end I got a distribution of Open Suse Leap 15.6, and on that distrubution, fist I had to install the package of libicu as requested by the first try error reported, and then worked! The number of modules generated where non zero!
My test was compiled as an executable binary, single file and selfcontained (Net7.0)
The library in linux is installed by its official installer downloaded by the official page:
Download Linux Barcode Generator Software - TBarCode/X
and the library is found adding the path to LD_LIBRARY_PATH environment variable
( \usr\local\lib )
I’d like to know what’s wrong with that library or what I can do un my Ubuntu distribution to get the modules generated like on Suse.
here the function to get the modules count:
TBarCode Library 11: BCGetCountModules
and here the Developer guide where on chapter 7 there is a sample code to get up to BCCreate() with a simple barcode and be able to count the modules:
TBarCode Library
Ubuntu Version:
20.04 LTS, and 24.04 LTS
Desktop Environment (if applicable):
None, run under WSL or throug SSH on a server
Problem Description:
Barcode library is unable to generate modules
Relevant System Information:
RID linux_x64
Screenshots or Error Messages:
none
What I’ve Tried:
openSUSE Leap 15.6 distribution on WSL