Porting VisualStudio (2008) Project to Linux - linux

I'm trying to port a wide Visual Studio (2008) Project to Linux System.
Do somebody know if it exist a way to easly "transform" the .vcproj file into a makefile?

Easiest would be to just learn how to write your own Makefile. It's quite simple.
But other than that you could try http://www.codeproject.com/Articles/28908/Tool-for-Converting-VC-2005-Project-to-Linux-Makef

Maybe this can help you, but you need to handle whit you outputs in the original code
Make-It-so
http://code.google.com/p/make-it-so/
or
sln2mak
http://www.codeproject.com/Articles/28908/Tool-for-Converting-VC-2005-Project-to-Linux-Makef
i hope this can help you

You can use Winemaker, which is part of WINE: something all major distributions already include.
On Fedora, which use yum, you can, as root, run yum install /usr/bin/winemaker to install it. This will probably also work on other yum based operating system, but you may have to provide another path, if winemaker is packaged to install in /usr/bin (which I doubt will be the case).
Once you have converted the project, consider using Autotools instead -- it's, in my experience, by far the simplest build tool available and is very easy to learn and use. Just don't be scared to poor documentation you will often find lying around. The only files you have to edit are configure.ac and Makefile.am files.

Related

GNSS-SDR on Windows?

I know the answer might be negative, but is there any way to run Gnss-Sdr on Windows Instead of Linux/Mac OS?
I Use it on Linux Already But I have just wondered if it can be done.
only related answers please.
It's possible. I'm just doing this. The problem is that some code fragments are written under Linux. The build system and library search methods are also under it. For the first time, I had to cut TCP data transfer and heavily correct some CMake files. I build it with the help MSYS2 under MinGW. The biggest problem is linking files. At this stage, I build most of the individual components. It was also required to manually build all the libraries. With my little experience in porting programs from system to system, it was hard

Installing GLPK (GNU Linear Programming Kit) on Windows

This could be an annoying question. But I was hoping someone could provide me with step by step instructions on how to get GLPK up and running on a Windows machine. I have Windows 7 64-bit.
I have tried looking at some instructions on various websites but keep running into problems. I am not very versed in creating directories, working with binaries (e.g. what is a binary), etc.... Even running commands is a little foreign to me.
To get an idea of what kind of detail I need in the instructions, here are some I have tried (and failed) to use:
http://winglpk.sourceforge.net/
http://en.wikibooks.org/wiki/GLPK/Windows
As you can see, I need something fairly detailed. I have read an example of a GLPK program in action, and I believe that once I get the program up and running I should be able to write the code to use it.
Can anyone help me? I would be so grateful.
EDIT: As a parallel question, I would also be interested in suggestions for other programs that will do the similar things as GLPK, but are more straightforward to install and use.
here an easy step-by-step explanation of "how to make glpk work":
To download GLPK , first go to the GLPK windows download page and then follow the instructions here from 1:
Go to control panel to determine whether you have 32-bit or 64-bit Windows (assume 64-bit from now on).
Download the latest version of GLPK, 4.65 at the time of writing, from the following address Sourceforge.
Extract the Zip folder by: right clicking on the folder and then>> 7-Zip >> Extract Here as shown. Move the glpk-4.65 folder from your downloads folder to your C: drive.
Assuming you’re using 64-bit Windows, click on the C:\glpk-4.65 folder in Windows explorer, click on the w64 folder, and select and copy the file path, which should be C:\glpk-4.65\w64.
Search and open your Control Panel, select System and Security>>System>>Advanced system settings>>Environment Variables. Then click on ‘path’ in the top window, click the ‘Edit’ button, then ‘New’.
Paste the file path you copied above and save.
DONE.
Here are a few suggestions to get you moving forward:
If you are having difficulty with running Windows command-line, then maybe GLPK (installing by yourself) is not the best bet.
See if you can find someone more experienced in Windows help you with the installation? (Once installed the LP modules are fairly easy to use, no more complex than any of the others)
Do you have access to any commercial solvers? (MATLAB and CPLEX can be great)
If you are going to be working with Windows for some time to come, it is a good idea to invest some time to learn how to download and install software
This SO question has links to lots of other LP/IP solvers such as Gurobi and COIN-OR.
If you don't mind learning a bit of R programming language, I'd recommend downloading R and RStudio, both of which are straightforward. Next, what you want is the lpSolveAPI package. The examples are decent and you can get going in a day or two. (You'll have to learn the basics of R)
If none of these help you progress, post some details of where you are getting stuck in the GLPK download (post the errors you are getting) and someone will try and assist you.
Hope that helps
In my opinion, it would be way easier for you to install e.g. ubuntu, especially if you are interested in other GNU programs. You can use every open-source program on windows, but it will not be easy if you don't understand what is a "search path for binaries"...
Installing softwares and libraries on windows is not easy, which is why windows program usually come with a setup.exe installer that does everything for you (but GNU programs don't).
On the other hand, ubuntu has a beginner-friendly documentation, and once you have installed it on your computer (it won't take you more than 2 hours at most, and 10G of disk space), installing GLPK or any GNU program is pretty straigtforward (just type sudo apt-get install glpk on the command-line).
There is no drawback in having the two systems on the same computer (except for the small amount of disk space used), and getting to know another operating system will certainly teach you more than following any step-by-step guide anyway.
That would be my "general advice". Now if you just want help on how to install glpk on windows, please post more details about what "doesn't work" for you (where did you "failed" to use those instruction? what happened?) because I don't think you can find something more detailed than the second link you posted.
have you set the PATH correctly once you have unziped the files?
To check it, run the cmd.exe and put "echo %path%", if in the list does not appears your glpk folder then you are unnable to execute it right since windows does not find the glpk executables.
more info:
http://en.wikibooks.org/wiki/GLPK/Windows_executables
https://superuser.com/questions/284342/what-are-path-and-other-environment-variables-and-how-can-i-set-or-use-them

How to compile Intel Mac binaries on Linux?

I was reading an article about cross-compiling for OSX on linux, but it was quite hard to understand.
What tools do I need? And what configurations are necessary?
Are there any tools for creating packages too?
First you need odcctools, which contains assembler and linker and such (like binutils but capable of handling the Mach-O object format). Then you need the system libraries from the official SDK. You can download it from Apple, but must agree to some stuff and become a member to do so. And finally good old gcc. Quite easy in theory, but in reallity a horrible mess. The easiest way to go (that I know of) is to use I'm Cross!.
Update: I found a newer and better updated method called xchain. It requires more manual work than I'm Cross! thou.

Converting a script/program into an installable tarball?

I am quite familiar with writing small programs or scripts, and I am also familiar with downloading a source tarball and installing it using ./configure && make && make install (or, failing that, doing whatever the INSTALL or README files tell me to do). However, I don't know how to take a script that I've written and package it up (along with its supporting files) so that it can be installed as above.
I've tried Googling, but I'm not sure what search terms to use. If I try something involving the word "package," I get guides on how to convert a tarball to a deb/rpm/miscellaneous-distro-specific-package-format, which is not what I want.
I guess I need to use something called a build system, which might be called autotools, unless it's actually cmake, rake, scons, or something else?
Also, if my program requires some supporting files, how might I need to modify my program so that it can locate those files once they have been installed in /usr/share, /usr/lib, and wherever else they end up after installation?
Basically, I'm looking to graduate from writing scripts to writing distributable programs.
Answering your question "How do I learn how to use autotools to distribute my program as a tarball?"
http://www.gnu.org/software/autoconf/manual/
http://www.gnu.org/software/automake/manual/ and
http://sources.redhat.com/autobook/ (Outdated but still useful)

Distributing a program in linux without the source

I want to be able to distribute a program in Linux without distributing the source with it. The current solution is distributing a tar.gz with a precompiled binary. What is the easiest way to have this binary be placed in the Applications Menu? Is there a way to do this that is common across most linux distributions, but Ubuntu, Fedora, and OpenSUSE would be the priority.
You will want to create a .deb and a .rpm. The former covers Ubuntu (Debian variants), and the latter Red Hat variants. You can also supply a standalone executable for other users who can deal with things like menus themselves.
You will have to deal with Gnome and KDE menu management, and also different distributions lay out their menus differently. There is also the issue of netbook variants such as Moblin, that have a netbook interface that probably has its own "add application" mechanism. I don't know if it is possible for a single .deb to handle both Gnome and KDE menus systems (for Ubuntu and Kubuntu respectively) but I imagine the capability is there to reduce duplication of effort for Ubuntu.
All recent distributions should have xdg-utils installed, which provides scripts such as
xdg-desktop-icon
xdg-desktop-menu
which seem to be what you're looking for.
Haven't looked into it lately...but back in the day (which really wasn't all that long ago) when I was using Linux, RPM was the easiest way to distribute pre-combiled binaries (most distributations had, and still have, some kind of support for RPM packages).
Here's an old how-to on building an RPM package:
Linux Online - RPM How-To
You could look at BitRock intaller.
Try Autopackage or other solutions posted in another question.
Do tar.gz and then give community rights to redistribute modified packages. They will make RPMs, DEBs and any other packages for their beloved distributions... which will probably fit their distros much better than you could ever make.
There is really too many differences between distributions to make one-size-fits-all package, often subtle ones. For example some distributions has "Application" section, other "Applications"... and this made menu items disappear on some distros. Libraries can be different, default settings can be different, and so on...
RPMs and DEBs aren't so portable as it is believed. With one package there might be problems even with different versions of a single distribution, and there is nothing worse than fighting to install badly prepared package correctly.
JeeBee is correct that you would want to go with .deb or .rpm.
For Ubuntu/Debian (the .deb) I would add that you do not send it to people but you create a "repository" and have the users add that url to their /etc/apt/sources.list, then you get a easy way to update the software as well.
That way you solve the distribution and updated problem at the same time.
And here is a example of how this could look like:
http://www.avrfreaks.net/wiki/index.php/Documentation:AVR32_General/Installing_tools_on_Ubuntu_Linux#Ubuntu_8.04_-_Hardy_Heron
And how a repository could look like:
http://www.atmel.no/avr32/ubuntu/
But don't repeat Atmels mistake and only do i386 because there is a lot of other common architectures out there right now, like the amd64.
/Johan
For RPM, this three-part tutorial by IBM is the best beginner's guide to packaging I know:
http://www.ibm.com/developerworks/library/l-rpm1/
http://www.ibm.com/developerworks/library/l-rpm2/
http://www.ibm.com/developerworks/library/l-rpm3.html

Resources