Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, My first post here and brand new to linux.
A bunch of .c files were passed down to me and an executable file that was compiled with linux Debian and gcc 3.3 compiler back in 2005. I was told that I need to find a version of linux Debian and a Virtual Machine Image from back then (2005) to be able to run the executable or to try to re-compile again. Does anyone know where I can find a VM image and a linux Debian version from 2005 that are compatible with each other and how I can install it on my windows laptop?
I also would like to know if someone here could point out a tutorial where I can learn how to run the exe through the linux command prompt as well as to attempt to re-compile. I basically want to learn the basic commands in linux. Thanks for any advice beforehand.
I have all the .c files and exe file is someone if interested in taking a look at it and running them on their machine.
Apparently Debian 3.1 (Sarge) was initially released 6 June 2005 with GCC 3.3.5. There is a VirtualBox image available, which should work on your Windows laptop with VirtualBox installed.
How to run the executable file depends on whether it runs from the command line or requires a GUI interface.
I believe it runs from the command line but have no idea how to run it yet
Like all Unixen, Linux uses filenames as commands. If the file is in one of the directories on the command path (/bin, /usr/bin, /usr/local/bin or ~/bin), its name alone is sufficient. Otherwise, use the full pathname.
Hi, My first post here and brand new to linux.
A bunch of .c files were passed down to me and an executable file that was compiled with linux Debian and gcc 3.3 compiler back in 2005. I was told that I need to find a version of linux Debian and a Virtual Machine Image from back then (2005) to be able to run the executable or to try to re-compile again.
Was the executable compiled to run on a 32 bit or 64 bit machine? If it was 32 bit then you are probably better off to recompile the program as 64 bit on a current version of gcc.
If you have the source code to the entire project, I suggest that you take these source-code files to a modern Linux installation, then place them under git source-code control, and see if you can then compile it using the gcc compiler that is right now available to you. (Does the project include anything called Makefile?)
If you are fortunate, then perhaps you can use the make command to re-create a "present-day version of" your project. If not, then perhaps you can edit that Makefile to include a few necessary compiler options.
Please provide many more details about the exact technical situation that is right now facing you ... "with luck," it might be much less(!) dire than you now think. For instance, how about an outer-level directory listing of the source files that you now have. Look for a file called Makefile.
Last edited by sundialsvcs; 09-08-2022 at 03:46 PM.
I was told that the file was compiled with linux Debian. Since the files are from back to 2005 it was probably 32 bit.
I have about 18 .c files and about 15 or more .h files. I also have a Makefile in the same folder.
If I would try to compile with a new version of VM image, linux Debian and newer gcc compiler, where should I get these from?
Could you elaborate a bit more about git source-code control?
Based on what you have just said, it is reasonable to assume that you have a complete source-code based project which, at the time, could have been entirely re-compiled by issuing a single command: make.
(When this command is issued, various compile-commands are issued based on the content of "the Makefile.")
At this point, however, it may or may not be necessary to alter the compiler-options which are still contained within the Makefile.
As the next step forward, perhaps you could provide us with the actual content of that file. Also please tell us as much as you know about both your [i]present[/i environment, and that in which the application was most recently deployed.
Last edited by sundialsvcs; 09-08-2022 at 08:19 PM.
Yes, I have all the source files (.c) and header (.h) files, Make, Makefile among others. I know that they wrote this files using C and compiled using linux Debian with gcc 3.3 back in 2005. The files also have the executable file without the .exe extension. It will be nice to re-compile again. I was told that the executable needs to be re-link again.
Basically, the executable is a model that takes different parameters from a parameters.txt file that I also have in the same directory. Problem is, I have not been able to open the executable because I don't have linux yet and because according to some folks, the executable needs to be re-linked again. In addition, I don't know the linux commands to run it.
Attached is the Makefile as requested. I copied the contents onto notepad.txt. Thanks for checking into this.
The first thing I would do is get all of those files into a folder on a Linux machine. Debian should work well, and the latest stable release would be where I would start. Make sure the development libraries and tools are installed. Enter that source folder and type "make" and see what happens.
If there are errors we can help you.
None of the resulting files should have an .EXE extension, that is a Microsoft thing not used by the rest of the world.
If you get that far without error, you will have the application compiled for the current version of Debian and ready to use. If not, the exact error will be the hint needed to determine what to try next.
Yes, I have all the source files (.c) and header (.h) files, Make, Makefile among others. I know that they wrote this files using C and compiled using linux Debian with gcc 3.3 back in 2005. The files also have the executable file without the .exe extension. It will be nice to re-compile again. I was told that the executable needs to be re-link again.
Attached is the Makefile as requested.
The makefile compiles using g++ 3.3. Debian 11 supplies g++ 10. So I recommend that you find or install a Linux system with g++ release 10 or thereabout. So you need to install or get access to a current Linux system which has a g++ of about 10 or else install g++ on the modern linux system you decide to use.
makefile is a way to run a compile and link doing only the minimum of work necessary for the compile run in question. You might have several files with your source code in them. When you run makefile it only compiles the source files that have been changed by your editor since the previous run and replaces the object code with new object code. For the files that have not changed it uses the object code from the previous compile run.
Then makefile links all of your object code(s) together with the code supplied in the static and dynamic libraries.
When you read the tutorial on makefiles they start off with simple examples and your reaction will be why go through all this work when it can be done much easier by other methods. And in days of yore I did not bother with makefiles for most of the small C programs I wrote. But beyond a certain tipping point in the complexity of your program structure makefiles make compiling C programs much, much easier. Apparently your program structure is complex enough to justify makefiles.
After you have decided on exactly which route you want to take with operating system and compiler then we can go to the next level of detail in the problem.
This one seems to be straightforward. Can I install this one instead of Debian or ubuntu wouldn't work?
There are two basic approaches to using Linux for the first time on a Windows system. One way is to install Linux on a virtual machine on Windows which is a confusing pain in the butt the first time you do it. Another way is to set up Linux on its own partition(s) and dual boot Linux and Windows. This is a confusing pain in the butt the first time you do it. My preference is dual booting using grub but each to their own.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.