avr-strip: Unable to recognise the format of the input file `libfoo.a(bar.cpp.o)' - g++

I'm trying to decrease the size of my static library libfoo.a (compiling with avr-g++). When I call avr-strip on the library, I get an error
avr-strip libfoo.a
avr-strip: Unable to recognise the format of the input file `libfoo.a(bar0.cpp.o)'
I also tried this with strip, and get a different result:
strip libfoo.a
strip: Unable to recognise the format of the input file `libfoo.a(bar0.cpp.o)'
strip: Unable to recognise the format of the input file `libfoo.a(bar1.cpp.o)'
strip: Unable to recognise the format of the input file `libfoo.a(bar2.cpp.o)'
strip: Unable to recognise the format of the input file `libgfoo.a(bar3.cpp.o)'
The bar.cpp files are the sources of my library.
I found a similar question for arm suggesting to use an arm version of strip. This isn't really helpful for me because I'm already using avr-strip for my avr library.
What could I do to solve this problem? Why doesn't avr-strip recognise one object in particular when strip recognises none on them?

Related

How convert native code to ASCII in Intellij IDEA (not in *.properties)?

Intellij IDEA has setting Transarent native-to-ascii conversion, that display native codes as readable symbols in *.properties files. How make similar behavior in file with other extensions (ex. *.ru).
Just need bundle .ru with Properties types:
Settings->File Types->Properties - add ".ru" (or ext that needed you)

How to build with a custom eglfs cursor atlas?

I'm trying to change the eglfs mouse cursor graphics for my embedded linux QT application (QT5.5). I have the new cursor atlas PNG and the new JSON descriptor file, but the documentation is rather vague:
".. a custom cursor atlas can be provided by setting the QT_QPA_EGLFS_CURSOR environment variable to the name of a JSON file. The file can also be embedded into the application via Qt's resource system."
I'd prefer to keep everything within the resource system if possible but I can't work out how to do it.. do I need a specific qrc file containing the path to the JSON file? I assume that the PNG file would also need to be added as a resource so that it gets built into the application?
If adding it via the resource system is a bad idea where's the correct place to set the QT_QPA_EGLFS_CURSOR environment variable? I'm currently specifying the platform on the command line via "-platform eglfs"; will this be ok or will I need to set the platform to eglfs in the build?
After much trial, error and digging around I have found the solution that I was looking for within the resource system.
Create a new resource file called "cursor.qrc", the contents of which needs to be two lines:
path/to/your/custom-cursor-atlas.png
cursor.json
The first line (path to your cursor atlas) must be relative to your resource directory.
You then need to put the JSON file (contents as described in the documentation) in the root of your resource directory. It must be called "cursor.json", and its image location line must must match the location in your new resource file and be of the format:
"image": ":/path/to/your/custom-cursor-atlas.png",
This will then include your cursor atlas in resources, and Qt will find it when your application starts.
Run time solution example:
export XDG_RUNTIME_DIR=~
export QT_QPA_EGLFS_CURSOR=~/cursor.json
In the cursor.json:
"image": "cursor.png",
Put your custom cursor.png atlas into your home dir (~) then run the Qt app from there.

Can't get PDFBox CreatePDFA example to work - Color profile not found

I'm trying to get the example for creating a PDF/A document with Apache PDFBox up an running (CreatePDFA.java).
For this I copied the example class as is into a project module that includes a maven-dependency on PDFBox in version 2.0.0-RC3. I only changed the method signature and used a fixed font, filename and message instead of args[].
When trying to run the code I get an NPE in Line 107 because it cant't load the color profile (InputStream is null) When I check the included library in the project details I can see the resources folder, but it does not contain the expected file, namely "pdfa/sRGB Color Space Profile.icm".
Unfortunately, google-ing the problem only turned up more references to always the same example implementation, but after a while I acutally found what seems to be the needed file on apache.googlesource.com
I copied the file to our own resource directory and then used this line of code instead:
InputStream colorProfile = CreatePdfA.class.getResourceAsStream("/pdfa/sRGB Color Space Profile.icm");
This finally stopped the NPE - the file is apparently found - but now I get another exception which says:
java.lang.IllegalArgumentException: Invalid ICC Profile Data
Here, I'm stuck. I had hoped that this would work just out of the box, but it seems like I am missing something. Any ideas?
You already answered one part of the problem yourself: put the file into your resource directory.
The second problem may be a bad repository mirror or a transfer problem (binary to ascii). Here's the official repository URL with the ICC profile from the example:
https://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/resources/org/apache/pdfbox/resources/pdfa/

Photoshop CS4 variable relative path not working

In Adobe Photoshop CS4, I'm trying to use variables and data sets to dynamically replace images listed on a .csv file.
When I tried to use the relative path of the images, the program throws an error "Could not apply data set because the replacement file was not found"
But according to an article in the adobe website, it should work.
Can anyone help?
Most of the time this kind of errors comes from the fact that ExtendScript is struggling with backslashes. Makes sure you escape your paths before using them. Or convert them to forward slashes:
var cleanFilePath = myFilePath.replace(/\\/g, "/");

PNG Byte Swap at runtime

I've got an app that is generating thumbnails of images at runtime. But they're not in the optimized format that Xcode creates when images are added to a project. Is there a library or a function call I can use to convert these images?
Instructions:
Download DHowett (thanks, DHowett!) code from: https://github.com/DHowett/pincrush
Unzip and rename to DHowett and place next to the XCode sample project I placed (https://www.box.com/s/7dfb3e6f430d98d933c2), and run...
If/When you build your own project from scratch, then do the following immediately after unzipping and BEFORE adding the folder to your project:
Remove all makefile files from the folder
Drag the folder to your project
To overcome compiler warning "implicit declartion of function 'pincrush' is invalid in C99", changed project setting "C Language Dialect" to "GNU89"
When building, you'll get an error "'png.h" file not found" - to fix it, add DHowett/libpng to the project's Header Search Paths
open pincrush.c and comment out the "usage" and "main" functions (you don't need them, and the first causes compilation error, the second causes link errors)
Add an external reference to crush... See below: extern void crush(const char *infilename, const char *outfilename);
You can ignore the 8 compilation warnings of "Unused Entity Issue" caused by the "NEXT" macro
You may need to remove the .git* files from the project (some annyoing warnings...)
Enjoy, good luck!