LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-13-2016, 05:12 PM   #1
thickglass
LQ Newbie
 
Registered: Nov 2016
Posts: 1

Rep: Reputation: Disabled
C++ app with DOS libs to GNU


Hi guys, here is one problem I came across recently - I have an app which operates with dos functions, so I tried to compile it with gnu and it doesn't seem to work due to the dos libs,even though I put them in right folders, I've made a little research and people were saying that dos doesn't fit well with linux and noone proposed any solution, could you guys recommend me something? Thank you, have a nice day
 
Old 11-13-2016, 07:05 PM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,242

Rep: Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322
What is the app? Does it have a homepage? Can we download the source too?

What are the DOS functions that it uses?

What were "dos libs" and what were the "right folders" that you put them in?

Note: if you're asking what it sounds like you're asking, then consider the very strong possiblity that "it won't work in Linux" actually is the right answer. In that case, you'd have to build and run it using DosEMU, DosBox, a VM running FreeDOS, etc.

Last edited by dugan; 11-13-2016 at 08:02 PM.
 
Old 11-14-2016, 08:43 AM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,671
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
You might need to re-code this application somewhat in order to make it work. How easy this may be will depend entirely on just how the original was built.

If, for instance, there are subroutine calls that are used to request various DOS system services, these could be replaced on a case-wise basis by adding a new file to your application (with appropriate #include directives in the appropriate other places) in which you create an appropriate implementation of this functionality.

If, on the other hand, the application is chock-full of asm{...} sections with hard-coded int instructions, you'll have much more work to do.

If your DOS program expects to use libraries (other than components of itself ...) you will probably have to re-create the functionality of those libraries as well.

Likewise, how does the application do screen I/O and keyboard input? Some programs were very brutish, directly writing to display memory. Others made use of "GUI" (sic ...) libraries that you may or may not have.

As others have noted, tools like "DosBox" also exist. They put the program into an environment that reasonably mimics the DOS environment as seen by application programs.

Last edited by sundialsvcs; 11-14-2016 at 06:25 PM.
 
Old 11-14-2016, 12:34 PM   #4
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,269
Blog Entries: 24

Rep: Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196
Moved: This thread is more suitable in the programming forum and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 11-15-2016, 01:07 PM   #5
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Member Response

Since I have no idea how helpful or good this application is and what the benefit it derives from DOS, my personal instinct would be rewrite the functionality entirely in C and compile it under Linux. Further, I could tweak it to do exactly what I'd want it to do, maybe even improve it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GNU make best practices; single makefile, multiple programs or libs Enoch247 Linux - Software 4 06-01-2012 10:01 AM
[SOLVED] DOS - GNU/Linux ? soplin Linux - General 6 08-19-2009 01:47 PM
can libs use symbols defined in app jackandking Linux - Software 1 12-04-2008 08:50 AM
koffice app kplato libs missing BEBigBear Linux - Software 2 08-11-2007 11:09 PM
What app uses what libs... sourceman Linux - General 2 02-18-2002 10:03 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration