Finally had a chance to upload it here.


I was compiling a C++ project with Femto and also made a changes to sources under …\FemtoIDE\PokittoLib\

Now I get a lot of these:
c:/bin/femtoide/ide-windows/windows/arm/bin/…/lib/gcc/arm-none-eabi/8.2.1/…/…/…/…/arm-none-eabi/bin/ld.exe: 94.o:(.rodata.fontZXSpec+0x0): multiple definition of `fontZXSpec’; 121.o:(.rodata.fontZXSpec+0x0): first defined here

I have cleaned the project and build it again, closed and started FemtoIDE, and updated the latest FemtoID files to my environment but nothing seems to fix it.


Did you duplicate the contents of the PokittoLib folder, by any chance? :thinking:


Yes, I took a backup copy. I will remove it and see what happens


Yep, it worked. Thanks! I did not expect Femto compiles everything there is.


This is configured in your project.json:

	"libs": {
		"Pokitto": [
				"recurse": "${appPath}/PokittoLib/Pokitto",
				"ignore": "POKITTO_SIM|POKITTO_XTERNALS|Documentation|examples?|Physics|(?:.*_SIM.*)|main.cpp"

When compiling your project for the Pokitto, it compiles everything it finds in "recurse" while ignoring everything in the "ignore" blacklist.

This way it is possible to link with different libraries when compiling to different platforms (PC/emscripten). You can also include multiple libraries by adding them to the array.


I know it isn’t tested and you may not be overly interested in debugging it but when I built and ran the demo c++ program, it cam up with this:

dyld: Library not loaded: /usr/local/opt/sdl2/lib/libSDL2-2.0.0.dylib
Referenced from: /private/var/folders/k7/r7tkw3n15ql14qt3pwvjrvmm0000gn/T/AppTranslocation/89FBB5AA-9FDB-465D-A214-0FC3CB4360F5/d/FemtoIDE.app/Contents/Resources/app.nw/darwin/PokittoEmu
Reason: Incompatible library version: PokittoEmu requires version 10.0.0 or later, but libSDL2-2.0.0.dylib provides version 9.0.0


Looks like the version of SDL I used was newer than the one you have installed. I wonder if the lib can be included with the emulator like on Windows.
In the meantime, do you think you can update your version of SDL?


Errr … what is SDL? And what am I likely to break if I do upgrade?


That’s Simple DirectMedia Layer, i.e. a gaming API.


I have upgraded to SDL2 2.0.10 and a new error:

dyld: Library not loaded: /usr/local/opt/sdl2_net/lib/libSDL2_net-2.0.0.dylib
Referenced from: /private/var/folders/k7/r7tkw3n15ql14qt3pwvjrvmm0000gn/T/AppTranslocation/FA6A5D9B-2613-43DC-8972-F00E6C8B20BD/d/FemtoIDE.app/Contents/Resources/app.nw/darwin/PokittoEmu
Reason: image not found


How did you do the upgrade? It would be good to document these things in the wiki on github.

Make sure you have SDL2_net and SDL2_image installed as well.


OK sorted it out and created a wiki page on your repo with instructions. I look forward to building something!


What is really interesting on the Mac is the cut and paste do not seem to work!


Have you tried Ctrl instead of Command? The config.s has set copy/past/cut with Ctrl, not Command


Ctrl does not work either … when I press the command key, I can see the ‘Edit’ menu highlight. I cannot even copy and paste using the Edit menu options.

In the config.js (I assume you meant this?) I see …

APP.bindKeys("global", {
    "C-c": APP.copy,
    "C-x": APP.cut,
    "C-v": APP.paste,
    "C-/": APP.toggleComment,
    "C-,": APP.goBack,
    "C-.": APP.goForward,

    "C-S-g": APP.gitCommitAll,

What should I change it to so that the command key works?


Unfortunately I don’t know much about how the whole framework work.
Since I knew App.paste used to make a double paste on Windows, I assumed it’d at least work once on MacOS as well.


Do any of the shortcuts work? Can you copy code from the editor and paste outside, or vice versa?


I can copy from Femto (using command-c) and paste outside but not the other way around.

I cannot copy from outside and paste using the edit>paste menu option. I find this one the strangest.

Some of the other functions like command - / comments out code properly.

So it looks like paste is broken via the menu and the shortcut in Femto.


Have a look in plugins/text.js, see if commenting this line works: this.ace.onPaste = function() { return ""; };

I’ll have to debug to find a proper fix.