To run Omnet++ from command prompt, how to solve liboppcmdenvd.dll is missing error? - omnet++

I want to run that Omnet++ project using command prompt. I am trying to execute the .exe file using the cmd prompt it is showing me the system error- "The program can't start because liboppcmdenvd.dll is missing from your computer. Try reinstalling the program to fix this problem".
I reinstalled the program but still it is showing the same error. So can anyone please tell me what is that .dll file and how I resolve this error? And also is there any way run Omnet++ from command prompt and write result to a file without opening the graphical simulation interface?
Thank you.

It is possible to run OMNeT++ simulation without Eclipse in Windows. Setting paths to OMNeT++ libraries as well as to MinGw binaries is most important.
I assume that:
you use OMNeT++ 4.6
OMNeT++ is installed in e:\omnetpp\omnetpp-4.6
your model is called wireless1 and is located in e:\omnetpp\omnetpp-4.6\samples\wireless1
your model depends on MiXiM 2.3
Mixim-2.3 is located in e:\omnetpp\samples\MiXiM and it is built
1.Append the following path to the Windows system PATH variable: e:\omnetpp\omnetpp-4.6\bin;e:\omnetpp\omnetpp-4.6\tools\win32\mingw32\bin;e:\omnetpp\samples\MiXiM\src
2.The list of directories with NED files in MiXiM has to be prepared. Do the following:
open mingwenv.cmd
in the mingw console type cd /e/omnetpp/omnetpp-4.6/samples/wireless1 then find ../MiXiM/ -name "*.ned" -printf '%h\n'| sort -u > list1.txt then tr '\n' ';' < list1.txt > list2.txt
3.In the e:\omnetpp\omnetpp-4.6\samples\wireless1 directory create a new text file with the following content:
#echo off
wireless1.exe -u Tkenv -l mixim -n [CONTENT OF LIST2.TXT] ..\simulations\omnetpp.ini
where after -n you have to paste the whole content of list2.txt (without the last ; and without [,]).
Then save this file as standalone.bat and just double-click on it to start simulation. Results of the simulation will be written to *.sca and *.vec files in simulations\results.
In order to run without GUI change -u Tkenv into -u Cmdenv.

Related

How could I get the full path of a file with file name?

[ SOLUTION ]
Thanks to #oguzismail and #stylo I find the solution. In the find command I modified the 2>&1 for 2>/dev/null and deleted the grep command, but I found the problem that it retrieves me two different path (because Android studio it was generation two different apk with the same name in two different paths).
To only get the path of the apk I want, I add a "filter" for my find command so the solution is:
find / -path ./intermediates -prune -o -name app-ipd-debug.apk 2>/dev/null
with name of the folder ./intermediates and -prune -o I can get the path I wanted to.
I saw the solution in this post
[ PROBLEM ]
I am doing a shell script that build an android project, install apk and do some more configurations in the device like set owner device owner (is a kiosk mode app) and some more stuff.
Now I am trying to dynamically build the project and get the apk file to install in the device but it doesn't work correctly.
I try putting the full path as a variable in my shell script and this works installing the app using the command adb install:
adb install -t -r $APK_PATH
I have tried t get the APK_PATH with find command but it retrieves me a lot of output that I don't know how to handle it, the command is :
find / -name apk-file-name.apk
A lot of output with "Permission denied" and "Operation not permitted" is shown and in one line of those the apk path is shown (this is the one I don't know how to get it, only this result)
I try to filter the results using grep but it doesn't work
find / -name apk-file-name.apk 2>&1 | grep -v "Operation not permitted"
and
find / -name apk-file-name.apk 2>&1 | grep -v "Operation not permitted"|"Permission denied"
any help?
You can use the locate command to locate files in your file system.
if you haven't enabled it yet, you can do so by running the following command
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
you won't be able to use it for a few minutes since it will index everything and later on you can use locate file_name.apk to find the file you're looking for.

how can i run rouge Summarization on windows?

I installed Strawberry Perl to run the rouge program in Windows. But when I want to run my program, I receive an error message that you can see on the image:
The system can't find the path specified.
My code is attempting to run "ROUGE-1.5.5.pl" but i think the system can't find this file. So I think maybe I don't initialize the path correctly?
I change my code to :
#!/usr/bin/perl
use Cwd;
$curdir=getcwd;
$ROUGE="..\ROUGE-1.5.5.pl";
chdir("sample-test");
$cmd="$ROUGE -e ..\data -c 95 -2 -1 -U -r 1000 -n 4 -w 1.2 -a DUC2002-ROUGE.in.26.spl.xml > ..\sample-output\output.out";
print $cmd,"\n";
system($cmd);
chdir($curdir);
and i receive this error:
Missing braces on \o{} at C:\runROUGE-test.pl line 7, near "$ROUGE" Execution of C:\runROUGE-test.pl aborted due to compilation errors.
As per the screen shot, you are attempting to run \ROUGE-1.5.5.pl where you probably want it without the spurious backslash (or with ..\ROUGE-1.5.5.pl if the parent directory is not on your PATH).
Similarly, you probably want the output in sample-output\output.out, or even just output.out, not \sample-output\output.out unless you specifically have a folder C:\sample-output for this purpose.
The backslash is significant; it is the absolute path to the root (of the current drive, on Windows). ..\ is the relative path to the parent folder.
Why are you writing a Perl script to run a Perl script, though? Either a simple batch file, or copy/pasting the command directly at the DOS prompt would seem like a less roundabout solution.
The problem is that when you are outputting the contents of the program to the file output.out in folder sample-output, the sample-output folder does not exist.
Command Prompt will not create the folders for you, only the files. Try creating a directory first called "sample-output" (In your drive root) such that the path resolves to something like C:\sample-output and run it again.
If the same problem results, try using an absolute path such as C:\sample-output\output.out instead.

MonkeyRunner on Windows Command Line

How does Python (or MonkeyRunner) locate imported modules?
I previously asked about an error I get when running a monkeyrunner script from Git Bash. I still haven't resolved the issue and decided to try running it from the Windows 7 command line. I cd to the directory containing my .py files and run
> monkeyrunner screenshots.py
Can't open specified script file
Usage: monkeyrunner [options] SCRIPT_FILE
-s MonkeyServer IP Address.
-p MonkeyServer TCP Port.
-v MonkeyServer Logging level (ALL, FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE, OFF)
screenshots.py is indeed in the current directory. Why can't monkeyrunner find it? What do I need to do to fix this to run on Windows 7?
did you try giving full path to your screenshots.py.
monkeyrunner C:\folder_location_to_your_file\scrrenshots.py
There is an easier way to call monkeyrunner script if the cmd is in the directory that contains your script:
monkeyrunner "%cd%\your_script.py"
Make sure you put the "" marks.

Command not found

I am quite new to the Mac Terminal environment.
I donwloaded sqlplus (which is recognised as a UNIX executable program) and then in Terminal I do cd a few times until I arrive in the folder I put this in (\Applications\instantclient_10) in this case.
When I type 'ls' I see a listing of all the files including the sqlplus. So I would then expect to simply type at the Telnet prompt 'sqlplus' and then this would start but instead keep getting
-bash: sqlplus: command not found
This is problem one.
I have now downloaded MySQL and again, when I go to the correct folder (\Library\StarupItems\MySQLCOM) and I type 'ls' I see my files (including MySQLCOM) but when I come to try to 'run' this by simply typing 'MySQLCOM' again the message is:
-base: MySQLCOM: command not found
What am I doing wrong?
Thanks
To run binary/executables in current folder you need to prefix them with ./
./sqlplus
The idea here is that you want to force execution of local file and not run it accidentally. Imagine app that would put ls binary into it's folder and it would automatically run if did ls in that folder.

Why can't Cygwin CVS read the CVS password file in a Ruby/Perl script?

On the Windows command line and cygwin bash I can execute the following without problems:
cvs login
cvs -Q log -N -rVersion_01_00
A ruby script in the same directory contains the following:
`cvs login`;
`cvs -Q log -N -rVersion_01_00`;
When I execute the ruby script on the Windows command line I get the following error:
cvs log: warning: failed to open /cygdrive/c/Documents and Settings/za100744/.cvspass for reading: No such file or directory
If I run the script in a cygwin bash shell I get the same output I would as when I type in the commands manually.
I have no idea as to what is going wrong. The path generated by the Ruby script is wrong since it is a cygwin path but it works correctly directly on the command line. I use cvs that came as part of cygwin:
which cvs
cvs is an external : C:\cygwin\bin\cvs.exe
Ruby is the one-click installer version:
which ruby
/cygdrive/c/Ruby/bin/ruby
It seems like cvs under Ruby can not resolve /cygdrive/c to c: but works OK from the cmdline.
Perl gives me exactly the same problem.
my $str = "cvs -Q log -N -r$cvs_tag|";
open(CVS_STATUS, $str) or die "\n##ERROR##";
It looks like either CVS can't create the file, or your path is wrong. Does the file .cvspass exist? If not, this page suggests you try creating an empty .cvspass file and then run your command. e.g. do
touch ~/.cvspass
If this doesn't help, then the problem is probably path related. There are a few possibilities; $HOME not set correctly, your home dir not matching what's in \etc\passwd, etc. See this tutorial for some troubleshooting steps that should help pin down the problem.
Using a windows native compiled CVS solves the problem. It is not ideal since I have to send a cvs executable with the script for users that has cygwin CVS but its better than nothing.
We had several problems with unix-, mixed- and windows-style paths in cygwin based perl scripts and built-in tools such as rsync. E.g. rsync can't handle wind-style paths. Use the tool "cygpath.exe" to adjust them correctly. Maybe it's the cause.

Resources