My Problem:
error: object swing is not a member of package scala
import scala.swing._
^
When I try to start any GUI App with Scala. What I tryed up to now: call directly by the scala command, and precompile first by scalac and fsc, nothing works.
My System: an Ubuntu 11.10 Machine, with installed OpenJDK 6, OpenJDK 7, Oracle JDK 6 and the Scala-Packe from the Ubuntu Repositories, additionally I tryed the "new" Scala from the official Scala Homepage (scala-lang). The .deb-package fails to install, but the plain files from the *.tgz file works so far.
I tried every possible combination of those Software I have installed, no one works.
The Joke: on my Windows 7 Machine, the same code (dropbox-sync) works without any problems.
Any Ideas? Did I forget something?
already many months since the original question, but since I just ran into the same, and googling showed this thread:
Looks like they separated scala swing from the core swing library. So if you're using sbt:
libraryDependencies += "org.scala-lang" % "scala-swing" % "2.10.2"
(I guess the previous answers imply that as well, really, but since I got that error and this was the fix, I'm just adding it for others' reference).
It is apparently not finding scala-swing.jar on the classpath. I'm not sure why this would be; it works on my system (still 11.04; don't like Unity). Try adding it explicitly: -cp /wherever/oneiric-ocelot/puts/scala/lib/scala-swing.jar.
If the file is not on your system, you can download it from the project webpage. (Click on the appropriate "latest release" buttons in the README, just under the title. Then download the jar.)
the easiest way to resolve this error is to either download the scala.swing package and keep it in a folder called lib in your main project folder. this way when you compile the program uing sbt or any other tool the compiler will scan the lib folder and update itself with the new package. the other way is to edit the build.sbt file by adding the following line in it
"org.scala-lang" % "scala-swing" % "2.10.2"
Related
I want to use chisel3.2, and have installed "sbt" into Mac OS-X.
I wrote my project (Scala file), and downloaded template of project.
I did;
sbt
It did a lint of "scala" but did not import chisel3 object.
Indeed this is caused by PATH setting, but there is no information about it.
Does anyone suggest a solution?
This is the same problem I have read and no useful answer found,
I have libgdx, and tween engine progect,i'm working with eclipse,
I use this tutorial to install tween engine Uneversal Tween Engine
all ok, no errors, I use FileTree Dependency Method, the program run on desktop but not on android, there is no erros on the code,I
I import the project with Android studio, and the erros are
Error:(14, 33) error: package aurelienribon.tweenengine does not exist
Error:(25, 10) error: cannot find symbol class TweenManager
etc...
my project is at
C:\NovelaGrafica\codigoFonte
my tween jar files are located at
C:\NovelaGrafica\codigoFonte\libs\tween-engine-api-6.3.3
the main problens is on using the tween library,
WHAT CAN I DO,??? I have spend day looking for answers but nothing works
I'm using windows 10, eclipse Mars and android studio
HELP PLEASE!..........:(
I Finaly got it I just folow that tutorial Universal-Tween-Engine
with a difrence, at the end I didnt use gradlew --refresh-dependencies I use, and that is the importante point gradlew.bat eclipse I'm using windows10 if you are using linux I think is somethin similar probably ./gradlew eclipse
them I Close the eclipse project and import it again, this is important too
I spend 2 day for finding a solution to this ....
I installed monodevelop in ubuntu 13.04 from git with the help of README.md, but I received an error
checking for LIBVALA... no
configure: error: Package requirements (libvala-0.12 >= 0.12) were not met:
No package 'libvala-0.12' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables LIBVALA_CFLAGS
and LIBVALA_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
I have installed libvala-0.20-0 and libvala-0.20-dev by apt-get.
I have googled for this question and found some links,but helpless.
my mono was at version 3.6.1.
THX FOR HELP.
update 2014-06-19
I found the config.log file and see the error
configure:4075: checking for LIBVALA
configure:4084: $PKG_CONFIG --exists --print-errors "libvala-0.12 >= $LIBVALA_REQUIRED_VERSION"
Package libvala-0.12 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvala-0.12.pc'
to the PKG_CONFIG_PATH environment variable
Although I have installed libvala-0.20-0 and libvala-0.20-dev, I doesn't own a libvala-0.**.pc file.
What can I do the next?
I have resolved thest problem by finding a libvala-0.12.pc file :)
While the Vala language, valac, and most of the bindings distributed with Vala are meant to be API stable, libvala is not. libvala-0.20 provides a very different API/ABI from libvala-0.12, and apparently MonoDevelop's Vala plugin hasn't been updated since Vala 0.12.
If you don't want the Vala plugin, I'm sure MonoDevelop provides a way to disable it (probably passing --disable-vala or something similar to ./configure). If you need the Vala plugin, though, you'll have to install libvala-0.12 or update the plugin to use a newer version of libvala.
now the problem is solved.
I used cn.archive.ubuntu.com/ubuntu for my apt-get.
These's no libvala-**.pc file in the package.
So whatever version I installed by apt-get, I can not get a libvala-*.pc file.
I searched in google for libvala-12.0.pc and changed my source to cz.archive.ubuntu.com/ubuntu, then I got that file.
Now I can run my monodevelop with valabinding.
Thx for #nemequ , I didn't use a higher libvala, so I don't know if it will be different when using a libvala-hight-than-12.0.pc file.
Hope these is usefull for others.
If you don't want to install vavabind after configure once ,just use ./configure --select, it's written in README. My bad :(
I compiled MySQL++ with no issues. When I launched some of the executables (resetdb.exe and simple1.exe) they suggest to run to test if the installation has been successful, the first error I got was that libmysql.dll was missing.
Adding its path to the PATH environment variable did not fix the problem, even after launching a new command prompt; I had to copy the DLL in the directory where MySQL++ executables are.
Now the DLL is found, but I get this error:
simple1.exe - Application error
The application was unable to start correctly (0xc000007b).
Click OK to close the application.
even launching from the command line, I get no more information than these.
Thank you for any help!
MySQL 5.5 -
MySQL++ 3.0.9 -
Windows 7 64 bits -
MINGW32 -
GCC 4.4.0
0xC000007B is a Windows error that means the executable is corrupted. It could refer either to simple1.exe or to one of the DLLs it's linking against.
Some reasons this could happen:
You're mixing toolchains in an incompatible way. In your case, you may have built simple1.exe using pieces built by MinGW GCC and pieces built by Visual C++. MinGW should be compatible with any pure C DLL built by Visual C++, including the MySQL C API DLL. However, you may have other pieces interfering. MinGW isn't compatible with VC++ at the C++ level, but then, it shouldn't have linked at all if this were your problem.
You didn't follow the MySQL C API import library build steps in README-MinGW.txt. You either missed a step, or skipped it entirely and are trying to use the import library that shipped with MySQL.
In your previous gyrations, you ended up with a corrupt object file, which got linked in. Try saying make clean all at the top level of MySQL++ to force a complete rebuild.
You're mixing versions of MySQL or MySQL++. If you have more than one version of each on the system, make sure you're consistent in their use. That is, build the C API import library from the same DLL you run the programs against, use exrun.bat to run the examples to ensure you're using the just-built version of the MySQL++ DLL instead of another you have in your PATH, etc.
Additionally, I note that you're using an older version of MySQL++. If you were on Linux, I could understand that as some distributions still ship with 3.0.9. But since you have to build MySQL++ from source with MinGW, I don't see why you're not using 3.1.0. Did you get a binary build from somewhere?
As for your PATH problem, did you restart the MinGW shell after doing this? PATH updates don't affect running programs; they keep the value they saw when they started.
I want to interact with a MySQL database from Matlab.
I found a mysql "library" for matlab here and the same on mathworks.
I followed the instructions to compile the library and the compilation seems to be successful. I get a mex32 file at the end. Only, the instructions on the first page refer to a Dll that I need to use (I guess that a Dll was supposed to be generated).
I am not familiar with the mex compiler or with compiling external modules for Matlab.
Am I missing something trivial? Where is the Dll supposed to be?
Thanks.
The reference to the dll is obsolete.
When you compile a mex function on Windows, you compile it as a dll (not an .exe). Thus, compiled mex functions used to have the extension .dll. Mex-functions with .dll extensions still work, but there is a warning that this might stop being the case in the future.
When 64-bit Windows arrived, TheMathWorks needed a way that people were to be able to compile the same mex-function for both Win32 and Win64, thus they changed the extension to .mexw32 and .mexw64, respectively. Apparently, they did not update the documentation completely.
I'd recommend using java to connect MATLAB and MySQL (or any other db if required).
The java database connector is simple to set up. I built a simple java class to connect to the database - see previous posting for a crude but working solution.
The MATLAB code works as indicated
% include java class
import Jam.ConnectToDatabase
% set up database connection info
userName='myName';
userPassword='myPassword';
databaseUrl='jdbc:mysql://glnd2818898.internal.net/2000';
% create java class instance and open connection to the database
ctd = ConnectToDatabase;
ctd.openConnection(userName, userPassword, databaseUrl)
Once the connection is open I can then use the java methods to submit SQL queries, create tables, insert data etc. I'd never used java before but I downloaded Netbeans and I was away.
OK, here is the solution to my problem.
The compilation does generate a mex32 file (32 is because I compiled it under a 32bit systme). You can check the output file of the compilation by running mexext. So apparently a mex32 file is a compiled version of the C file.
Once I placed the file in a directory that is in the Matlab's path it worked.
I guess the reference to the Dll in the link I provided is either obsolete or wrong.