Processing - No library found - processing

In Processing, I have the following error :
No library found for bezierVertex
Libraries must be installed in a folder named 'libraries' inside the 'sketchbook'
I am trying to run "exemplePPhys2D_geeknessrain.pde", that can be found at
https://projets.pingbase.net/libro/projects/hub/repository/revisions/7/entry/EXEMPLES/pphys2d/examples/exemplePPhys2D_geeknessrain/exemplePPhys2D_geeknessrain.pde
The error is puzzling, since I did install the bezierVertex.jar library in
.\pphys2d\examples\exemplePPhys2D_geeknessrain\libraries, under
.\pphys2d\examples\exemplePPhys2D_geeknessrain (which is what Processing shows as the sketch folder)
I searched the net (a lot), and I saw that some of the proposed solutions included other paths (see Wiki), like :
C:\Users\.........\Documents\Processing\libraries
C:\Users\.........\Documents\Processing\libraries\libraries
I now have the bezierVertex.jar library in all of the above.
However, Processing is still not finding it, and there's no way to just browse to the jar file from within Processing. The import library option does not seem to be able point to local folders (this would make things easier).
What am I missing ?
Thanks for your advice !

You have to copy bezierVertex.jar in the libraries folder within your sketchbook.
On Windows:
C:\Documents\Processing\libraries\bezierVertex\library\bezierVertex.jar
On Mac OS X / Linux:
~/Documents/Processing/libraries/bezierVertex/library/bezierVertex.jar
If you just want to use the library for one project you can copy the jar-file into a code-folder within your sketch directory, i.e. ~/Documents/Processing/MySuperSketch/code/bezierVertex.jar

Related

Windows Lua to executable not find lua5.1.dll

I have a Lua program (written in Lua 5.1). I'm on Windows 7, trying to use srlua to convert a lua file into an executable. finally i have create an executable used
glue.exe srlua.exe myscript.lua gd.exe
when i click exe/bat to execute. it crashed . tips : no find lua51.dll in computer.
when i used cmd to execute . it work. even i only move gd.exe to other dir.
so, why ?
doesnot srlua create standalone exe without lua environment?
dir ls
error tips
You are mixing Lua environments: your directory structure shows Lua51.dll, but your error message references Lua5.1.dll, which you don't have (and those are two different files). Somehow you depend on a module that was compiled against Lua5.1.dll. You can figure out the dependency chain by using a dependency walker as it will show what DLLs are being loaded and from what locations. You can also run it in the "profile" mode, which will show where the error you see happens in the dependency chain, so you'll know what DLL or executable is at fault.
In Windows, an executable will only look in a few places for the .dll (in order):
1) Any dependency paths will be searched first. These you can set when you are creating the project (generally through the IDE).
2) The current directory that the executable is running from. For example, if gd.exe was in the folder myexe in C: drive, the directory C:\myexe would be checked.
3) The system directory. For Windows, it's something along the lines of C:\Windows\System32.
4) Anything additional paths, specified by the PATH environment variable.
So, if you moved your executable gd.exe from C:\myexe to C:\myexe2, you would either need to point to the .dll via dependencies/the PATH environment variable, or move all of the .dll files that you need to the new directory.
If command line works to run the program, but not the .exe itself, your command line has the PATH environment variable set. You can set it in the command line using setx path "%path%;c:\newpath" or use the the Control Panel -> System and Security -> System then clicking on Advance System Settings -> Environment Variables and under System Variables, look for the PATH key word.
Keeping the .dll files and executable in the directory (c:\myexe for example) and running the executable is a good way to make sure they work together and that all required .dll files are seen by your executable.
Source (even though it doesn't mention the PATH environment variable): https://msdn.microsoft.com/en-us/library/windows/desktop/ms682586(v=vs.85).aspx

Use Npackd for plug-in distribution

I've set up a repository to distribute plug-ins using Npackd. I am aware, that I can use a batch script to move all files from a package wherever I want, but I'm afraid I might accidentally overwrite files. Currently, my setup works like this (which is npackd common practice, I believe):
a package myFile.zip gets downloaded
the contents gets extracted to %PROGRAMFILES%\myPackage\myFile
a batch script optionally moves the files elsewhere
Unfortunately, the Npackd documentation doesn't explain the internal process of how this is handled. My first concern is that a folder myPackage already exists and might get overwritten, consequently its files being moved by my Install.bat. Is there a way to define the destination path before the files get extracted? Since I'm installing plug-ins for an existing software, this would avoid my script moving all the files.
One way to achieve could be "abusing" the 7z examples, but if possible I'd like to a avoid the dependency since my plug-ins stored inside a standard zip archive, and Npackd can handle these without dependencies.
Npackd always creates a new directory during the installation of a package version. Normally the name of this directory is the package title (e.g. "Firefox"). If this directory already exists the version number is used as a suffix (e.g. "Firefox-27.0.1"). If this directory is also already there an underscore and a number is used additionally (e.g. "Firefox-27.0.1_2", "Firefox-27.0.1_3", etc.)
There is no way to define where a package should be installed exactly. As you would probably define a dependency on the main software package in each plugin anyway, I'd recommend something like this:
<dependency package="com.mycompany.WordProcessor" versions="[5.00.2195, 6.1)">
<variable>WP</variable>
</dependency>
<file path=".Npackd\Install.bat">copy spellcheck.dll "%WP%\plugins"</file>

Prevent Docpad from scanning vendor files (but still copy them)

I've got a project which holds third party files (installed with Bower) under src/public/vendor. It seems ever since I added those docpad has gotten considerably slower in generating ./out, no doubt cause it's going over all the vendor files.
I'd like to exclude the vendor files from being interpreted by DocPad, but they should still be copied to ./out.
Is there a built-in way to do this through DocPad or should I simply put the vendor files outside the src directory and have Grunt copy it manually to ./out?
Your issue is legit and I raised the same a while ago :
https://github.com/bevry/docpad/issues/276
In the end, hypercubed developed the "raw" plugin available through npm :
https://npmjs.org/package/docpad-plugin-raw
Depending on what you provide as options, it can either do a cp or a rsync command.
So it basically what you intend to do with a Grunt task.

LLVM compile error for a custom back-end

I am getting familiar myself to LLVM, and my goal is to implement a back-end for my custom processor.
Before I jump into my back-end implementation, I first try to learn how a build procedure works, so I first copy lib/Target/MSP430 to lib/Target/myproc, and build llvm targeting "myproc" (even though it actually is a back-end for MSP430, I did this just to learn how I can add a new target to LLVM).
When I configure/make llvm, I got the following error message.
...
/bin/cp: cannot stat `/mydir/build/lib/Target/myproc/Debug+Asserts/MSP430GenRegisterInfo.inc.tmp': No such file or directory
...
I checked /lib/Target/myproc, and saw there was only one file, Makefile, copied from /lib/Target/myproc.
Here is what I have done before I configure and make.
In my LLVM source directory, copy lib/Target/MSP430 to lib/Target/myproc.
Modify configure and projects/sample/configure to add "myproc".
Go to lib/Target/myproc and change "MSP430" to "myproc" in MSP430.td, LLVMBuild.txt, and Makefile (I also modify the files in subdirectories).
As the LLVM compile works for other targets on my machine, I believe it's not the problem of machine of tools that I am using, but the problem of my modification.
Am I missing something? Are there any further modifications that I am supposed to make?
There's a decent tutorial for writing backends here:
http://llvm.org/docs/WritingAnLLVMBackend.html
There's also this tutorial from a dev meeting:
http://llvm.org/devmtg/2012-04-12/Slides/Workshops/Anton_Korobeynikov.pdf
*GenRegisterInfo.inc comes from running tblgen on the target .td file. The .inc output file name depends on what the .td files are named in the myproc/ target directory.
It would be helpful to see more of your make log but my guess is that you're getting a tblgen error when processing .td files in myproc/. That tblgen error is the real problem you need to diagnose and address.

Acceleo standalone generation

I also need to generate outside eclipse and i didn't figured out how to do it.
I've read this thread but I have another problem to overcome first : I'm unable to start the main !
I tried different ways : export the project as standalone, put the project in a regular or executable jar, and launch directly Generator.class. I would like some help with the last solution. Here's how I launch it :
java -cp "..\testGene\bin\;C:\Program Files\Eclipse\plugins" testGene.main.Generate testModel.uml outputDir
I can't copy the whole console (dev computers are not connected to internet), but it says :
Exception in thread "main" java.lang.NoClassDefFoundError: org/Eclipse/acceleo/engine/service/AbstractAcceleoGenerator
Could not find the main class: testGene.main.Generate.
The generator works well inside eclipse, and I manage to call a simple test class with the same command line. I tried to copy the whole acceleo plugins in my bin directory in case the space in "Program Files" is a problem.
I'm pretty sure this is a simple error I made, any ideas ?
Furthermore, I'm not sure that it's sufficient to use the plugins folder in your classpath. Shouldn't there be a list of the jar files you need?
Since the program does not seem to find the AbstractAcceleoGenerator I would say that you are lacking some dependencies of the generator. Have a look at this screenshot to see the jar used for an UML to Java generator.

Resources