Building openocd on linux for windows requires which winusb drivers - fedora-25

I need to build openocd for windows. I tried building openocd on linux for 64-bit windows by using spec file. Build succeeded but when I tried to use the generated openocd.exe on windows, it gives me the error
“LIBUSB_ERROR_NOT_FOUND”.
On windows, although I have WINUSB drivers which I am using to program MCU, I am still getting same error.
Can anybody help, Does anybody also face the same issue?
Although if I am building openocd through cygwin on windows machine, openocd works properly.
My requirement is to build on linux machine only.
PS: I am using fedora fc25 linux machine

Related

Building Xalan for iOS (armv7/armv7s) platform

Has anybody successful cross compiled the Xalan C++ library for armv7/armv7s arch to be used on iOS device (not simulator)?
I was able to cross compile the xerces library by setting the iOS g++/gcc compilers for armv7 but using the same procedure for Xalan gives me below error while running the make file:
iComp:c iComp$ make
Linux, Solaris, AIX, Compaq Tru64, OS/390, MacOSX, HP-UX, NETBSD, FREEBSD, CYGWIN, and MINGW are the only platforms supported.
Above error clearly states that I cannot target the iOS platform.
So was there some problem in configuring the makefiles?
UPDATE
The above issue was occurring because of incorrect usage of Xalan's runConfigure file.
The correct usage to pass additional options to Configure file via runConfigure is to use '-C' option with "--host=arm-apple-darwin --disable-shared"
This has helped to resolve the above platform detection issue and generated the cross-compile make files.
PROBLEM
But now the issue is while running the make, default MsgLoader (inmeme)executable is generated (target: armv7) and after that the make file tries to run the armv7 executable on Mac OSX obviously giving the error 'Bad CpuType in executable'
How can I either avoid the building of Xalan by creating a armv7 exe of MsgLoader or run this armv7 exe in terminal (doesn't seems possible!) so that it proceeds with the build.
Thanks in advance for any help!!!

Can I generate exe from ubuntu

I'm using Ubuntu and I use Code::Blocks as my IDE, I'm still a student and my professor wants us to write and compile some c++ programs and give him the exes to check them
Is there a way for me to generate exe files on my Linux os ?
ps: I'm new to Linux so take it easy on me.
Thanks
You need a cross-compilation. You can use mingw tool chain, if your want 32bit Windows application, install mingw32. Here are the detailed instructions for using it with IDE CodeBlocks.
If you want to build 64-bit applications, try mingw-w64 fork.
Also, then you could run the compiled application (or, even some native windows applications, compiled on Windows) in Linux under Wine:
sudo apt-get install wine
wine myapp.exe

"Cannot execute binary file" when running compiled c++ programs with Eclipse on Ubuntu for Windows platform

I would like to move from Visual Studio on Windows platform to Eclipse on Ubuntu for c++ development, since I develop almost all my programs on Java, with Eclipse, and I just use a Windows virtual machine in order to develop C++ programs for Win OS. So if I would be happy being able to not use Windows VM at all. However, I've managed to configure MinGW and Eclipse successfully enough to compile programs, but not to execute them.
Steps I've gone through so far:
I've installed mingw32 package and dependencies:
$ sudo apt-get install mingw32
I've installed Eclipse Mars for C/C++ development (manually, to keep this installation isolated from other Eclipses I have) and created a new project in this way:
- New C++ project.
- [...]
- Cross-prefix: i586-mingw32msvc-
- Cross path: /usr/bin/
With this configuration I'm able to correctly build a .exe which I can successfully execute on Windows, but when trying to debug it or execute it under Eclipse I get this error: "cannot execute binary file".
Googleing I've seen some posts suggesting to use wine in order to execute the .exe, but I thought mingw32 would be able to execute it. Am I wrong and this is not possible or just doing something wrong?
Mingw32 is a windows compiler, and will compile source to a Windows executable file. Additionally, the compiler cannot execute files (as worded in the question), it just compiles the source code to an executable form, in this case the windows executable (*.exe). So yes, in order to run the .exe in Ubuntu you would need something like Wine which emulates a Windows environment
mingw is a set of GNU tools for building native Windows executables.
It does not execute anything.
If you really want to cross-compile for Windows, you need Windows or an emulator for the execution.
To build for Ubuntu you can just use the native compilers.
sudo apt-get install gcc

Compile vowpal-wabbit in ubuntu for use in windows 7

I have a Windows 7 laptop with an Ubuntu 12.04 installation on the same machine.
I am trying to compile a program from source (VowPal Wabbit). I tried using Cygwin but had no luck getting it to work. I ended up installing Ubuntu 12.04 to get access to get a functioning compiler.
It worked on the Ubuntu side but I am curious if there is a way to bring the compiled files over to Windows as that's where I actually do most of my work. More specifically, will programs compiled in Ubuntu function on a Windows machine?
Any suggestions?
You should check out MinGW:
MinGW, a contraction of "Minimalist GNU for Windows", is a minimalist
development environment for native Microsoft Windows applications.
I realize it is almost a year later. Credit Chris Quirk, Nick Nussbaum and others, current versions of vowpal wabbit (7.x) should build and work fine on Windows.
This reference should provide all the necessary details.
Edit: 2017-07-10:
I should also note: the library and basic train and test from files functionality has been working on Windows for a while. However, not all the functionality supported in a native Linux environment is available on Windows. In particular, the --daemon option, network related features like spanning-tree (under the cluster directory), and some of the utilities under the util directory have not been fully ported and/or tested on Windows. vw developers welcome pull-requests from Windows users.

Cross-compiling python extensions under Linux using distutils

Is there any way to compile both Windows and Linux versions of Python/distutils/SWIG/C++ extensions under Linux? As far as I understand the problem is at least in obtaining windows version of python-dev.
Thank you.
You could do it in two ways:
Install MingW on your linux system, and cross-compile the extension using it
Compile it in a Windows Virtual Machine (eg. Windows7 on VirtualBox)
I prefer the second option as it gives the opportunity to test that your program is working