C++ and xercesc: Cannot load message domain - c++

I'm trying to read a a XML file with C++ using xercesc. It compiles OK, but when I try to excecute the app (and read the XML), I get this error:
Could not open catalog:
XercesMessages_en_US.cat or
XercesMessages_en_US.cat
Cannot load message domain
Someone knows what this means?

I answer myself:
As the error says, xerces is unable to find XercesMessages_en_US.cat, wich is a file located in /usr/share/xerces-c/msg/ (in my case, gentoo linux).
To solve it, just need to write in a bash:
export XERCESC_NLS_HOME=/usr/share/xerces-c/msg/
Then, it will find it.
In my case, I wrote this in .bashrc so it is exceuted in every start.

Related

How can I solve this error in OMNest 5.5.1?

I get the following error:
Exception occurred executing command line.
Cannot run program "C:/OMNEST-5.5.1/samples/enera/lteAdvanced/enera.exe" (in directory "C:\OMNEST-5.5.1\samples\enera\lte"): CreateProcess error=2, The System cannot find the file.
I already built the project many times. I have tried to make a simplier already given example from omnet just to check if this is working. It is working. But if I copy this example in my Project it also doesn't work, so there is sth wrong with my Project file. But it seems to be correct. I just have one Connection and kept it really really simple. But it doesn't work. I have installed Omnest and inet correctly.
The most likely cause is that the EXE file cannot find the omnet++ dynamic libraries it tries the load. And the most likely reason is that you are trying to execute the executable from a CMD prompt instead of from the shell provided by the mingwenv.cmd script.
Everything you do in OMNeT++ (including starting the simulations) must be run from the mingwenv shell.

Why can I not load files using "c++ [insert file name here].cpp"

I have not used C++ in for about one year. But it seems that I fail when attempting to run a simple program again. The way I remember it:
change directory cd to the desired file location.
Type c++ [insert file name here].cpp
Type a./.exe to actually run the program.
However, when attempting to run the program, I get an error message at step 2, stating :
'c++' is not recognized as an internal or external command, operable
program or batch file.
What has changed? I've also seen some suggestions of cl on the internet but when using it, I get the exact same message.
I believe the software I have is associated with NetBeans. Any ideas to alleviate this problem?

Receiving a syntax-error while trying to get the output of an external exe-file

I'm trying to get the output of an exe in python (called: ibstat.exe).
As this exe is on an external server, I got one possible output and used it to make a mock-object. (As I don't know how to create exe-files I made a ibstat.py mock-object.)
When I was done writing and testing my programm locally on my computer, I went back to the external server to test it again there. But I got this Error message:
SyntaxError: Non-ASCII character '\x90' in file hello.exe on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details"
I used this to get the output of the exe-file:
subprocess.check_output([sys.executable, "ibstat.exe", "34"])
when this didn't work I also tried:
subprocess.call([sys.executable, "ibstat.exe"])
subprocess.Popen([sys.executable, "ibstat.exe"])
On my computer when I was opening ibstat.py everything was working just fine (with call, Popen and check_output).
And executing ibstat.exe on the server in the command-shell works too.
Questions:
Is there anything I overlooked/I forgot to do/try?
What can I do to open the exe properly without getting the
Syntaxerror?
Do I need to clarify my question more clearly, or is more
Information needed?
Removing sys.executable SOLVED the issue.

Invalid PE File x64dbg

I am trying to open a simple Hello World program written in c++ in x64dbg and I get an error "Invalid PE File". The file loads fine in IDA. What might be the problem ?
Author of x64dbg here, the error you're experiencing is misleading and has nothing to do with the validity of the PE file. It simply means that CreateProcess failed for your file. This can have various reasons, once of which is the validity of the PE file. Get the latest version from here for a better error message.
Validate the process starts correctly outside of the debugger and make sure it is not blocked by for example your anti virus software.

pcl::MovingLeastSquares doesn't work

I'm new to PCL and I'm trying to do this tutorialhere. The problem is that I can compile it, but when I run this, it give me an error: *exception at 0x000007fefd27940d in pcl_VFHexperiment.exe: Microsoft C++ exception: pcl::IOException at memory location 0x001cf0e0*
I guess the problem is that mls. process function doesn't work correctly and the operation of file saving provides an error.
Could be the input file the problem? I use ism_test_cat.pcd file found here. I don't know where the file suggested in the tutorial is. How should the input file be?
Anyway I can see ism_test_cat.pcd file in the viewer following the other tutorial.
How to solve? Please help me.
I use VS2010, PCL 1.6, all 64bit
Thanks in advance a lots
"You should be able to find the input file at pcl/test/bun0.pcd." It says in the tutorial.