Eclipse build failing to include all language resource strings

Has anybody come across this before.  I have an app with five sets of resources for five languages.  I am having issues with the languages strings not getting built into the PRG file.

The individual files are all held in their respective resource language folders.  But when I build the app I only get one language.  Setting to the other languages has no effect and scanning the PRG file shows that the strings aren't even in the file?

I should add this was all working, became a bit flaky and now is fixed to one language only.

Any tips on how to debug the resource compiler to walk the process through to see what it is doing?

  • There isn't much you can do to debug the resource compiler, but you can generate debug output (add -g to the compile options). This will tell the compiler to output resource data tables and pseudo-assembly. You should see string resource entries for each of your language-specific resource collections.

  • I have only been using Eclipse, is it possible to add -g build options in Eclipse or do I need to set my project up for command line building.

  • Go to Window>Preferences>Connect IQ>Compiler and then enter -g in Compiler Time Options

  • Just to check the obvious; did you add languages in your manifest?

  • After rebuilding the environment I think my problem maybe due to using linked files and folders in eclipse.  Hard copying files seems to resolve the issue.  Linking files and folders produces flaky results.

    Is there a way to do this in a reliable way with the compiler.  I want to share common resources with multiple projects which are targeting the same devices.  I am doing this with a Base Project and inheriting code and linking files and folders where necessary.

    I am getting reliable results with file linking the source files but the resource files seem to be the issue.

    I don't think barrels will work for me and I want to be able to override methods. And not sure they are helpful for the resources as I will still end up having to copy an artifact to every project that needs the resource?

  • Are you trying to use eclipse links as well as jungles? That doesn't work (I ran into it with .mc files long ago).  You could try putting the resources in a barrel.  I've never done that with language files, but I think it works.

  • I am not using jungles other than the default one which points to the manifest

  • The failure mode seems to be when I Eclipse link to the foreign language resource files within the base project sub folders.  As the failure mode is not 100% I can't be certain.  So it looks like the resource compiler chokes on linked files in sub folders?

    I seem to have a working environment now by hard copying the foreign language folders and files from the base project to the sub projects.  Oddly having a linked file in the default resources\strings folder doesn't seem to cause a problem it only seems to be an issue with the language specific folders.

    Is the only way to tag the language of a foreign language resource file by its directory location?

    Probably not a quick fix but would it be a more robust solution to allow the foreign language tags to be in the XML file and then the location would be immaterial?  Is it a good idea to infer meaning by location?  Isn't that what XML is for?