I am porting a program to AIX which takes use of hash_map in many places.
For linux and solaris hash_map is included in _gnu_cxx package and stlport.
However, I can't find hash_map on AIX platform. Anybody know?
Btw, I have to use IBM compiler /usr/vacpp/bin/xlC.
Thanks.
I think you want <unordered_map> on the AIX xlC compiler. That's because <hash_map> is a gcc extension.
You'll need to change your code to use the different name (or do some jiggery-pokery with a translation layer).
Related
I use ActiveStates TCL version 8.6.0.0 for Windows x64.
In a script I call:
package require tcom
Tcom is included in the installation but I get the following error:
couldn't load libary "C:/TCL/lib/tcom/tcom.dll": Invalid argument while executing
"load C:/TCL/lib/tcom/tcom.dll"
("package ifneeded tcom 3.9" script)
invoked from within
"package require tcom"
Does anyone understand whats actually missing? C:/TCL/lib/tcom/tcom.dll is installed on my system, so what is the "invalid argument" ?
This appears to be a 32-bit/64-bit issue. You can't mix different bit-sizes within the same process† and you may well have installed a 64-bit build of ActiveTcl 8.6.0.0 under the belief that matching the size of the build and the system architecture is a good idea. Alas, this is not the case. ActiveTcl 8.6.0.0 for 64-bit Windows, for commercial reasons‡, requires an extra product key to access their 64-bit builds of external packages. But you've got the package installed anyway (perhaps from a previous installation of ActiveTcl?) and that appears to be a 32-bit build.
The misleading error from using the wrong size of binary library build is unfortunate (a relatively minor bug stemming from the subtle differences between Windows and POSIX and how Tcl handles the mapping between the two) but I'd bet that's it.
The easiest fix is to:
Uninstall all copies of ActiveTcl that you've got installed, then
Ensure that your C:\Tcl directory really is deleted, and then
Install the 32-bit build of ActiveTcl 8.6.0.0 (which works just fine on Win64-based systems like 64-bit Windows 7 and Windows 8). Once you've done that, you
Use teacup update to get a full set of packages installed and you should get Tcom working.
†Except on ARM with extra trickiness, which doesn't apply here.
‡I'm not going to try to justify them; it's their decision, not mine.
I'm having trouble setting up a cross compiler (Sourcery Codebench) and simulator (OVP) on my machine. Could someone please show me how to do this?
I'd like to cross compile C to MIPS and then simulate it on my windows 7 x86-64bit machine. I don't have a lot of experience with this kind of thing and am having trouble even figuring out which versions to download
I have seen one or 2 other questions about getting sourcery to work on windows, but they didn't have the information I need.
I am not familiar with OVP, but I do know Sourcery CodeBench. Sourcery CodeBench is available for Windows and comes in an easy to use installer. The lite edition pages are here:
http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/
There are links for MIPS ELF (Bare Metal) and GNU/Linux lite edition downloads. I'm not sure which one you need. The most recent toolchains are from the Spring 2012 release.
Once you have installed the toolchain, you can compile your application and run it on real hardware or on a simulator.
How far did you get? Did you install the toolchain and simulator? Can you compile and run the application on your target?
Firebreath can be used in Windows and Linux like Ubuntu etc., but can it be used in armx86 platform. Can we cross compile using arm x86 cross chain toolkit?
To the best of my knowledge, nobody has tried. You'd have to try it and find out.
There is no technical reason that I know of that it couldn't be; look into cross-compiling with cmake.
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'm trying to setting up a mySql connection using Matlab, I have read I few tutorial but unfortunately I can't get work of them. I had tried to compile the source(.cpp) but I got the following error:
Error: Could not detect a compiler on local system
which can compile the specified input file(s)
C:\PROGRA~1\MATLAB\R2010B\BIN\MEX.PL: Error: No compiler options file could be found to compile source code. Please run "mex -setup" to rectify.
So I I typed "mex -setup"
Please choose your compiler for building external interface (MEX) files:
Would you like mex to locate installed compilers [y]/n? y
Select a compiler:
[0] None
Compiler:
but there is no compiler.
Anybody can help me, how can I make a connection between matlab and mysql, I'm using windows 7 64 bit and Matlab 2010b.
I already installed wampserver.
Have you tried to establish MySQL connection from MATLAB using JBCC connector?
I did it successfully and put the complete workflow with the code example (requires Database Toolbox) in this question:
connection of MATLAB 7.0 and MYSQL
Haven't try on 64-bit though. Please let me know if it will fail.
UPDATE
You can also try the following submissions to File Exchange that do not require the Database toolbox:
queryMySQL
Access a MySQL database
I'm guessing you installed Matlab 64-bit as well, which does NOT come with a built-in MEX compiler (32-bit version uses lcc). You have a few options, but the easiest is to install Visual C++ Express (it's free! http://www.microsoft.com/express/Windows/) which will give you a 64-bit compatible compiler in the mex -setup listing. You'll have to double check which versions of the compiler 2010b is compatible with though.
Caveat: I tried this once and couldn't get it to work, but it was with like 2007b or something, and I didn't try that hard, I just installed 32-bit Matlab.