Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6545659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:36:46+00:00 2026-05-25T11:36:46+00:00

I am trying to port a Windows program to Linux. I have never programmed

  • 0

I am trying to port a Windows program to Linux. I have never programmed in Linux and have very little idea what I am doing. I have managed to eliminate a lot of the errors I got in the G++ compiler on Linux and have traced most of the remaining ones to non existent variable types.

I took out the windows.h file but I do know know what to do with the CALLBACK, HANDLE, DWORD and HHOOK variables. Apparently there is no equivalent to HANDLE in Linux so I think I may have to rewrite some of the structure.

Can anyone explain what I should be doing or point me to some tutorials that teach me how to do these things in Linux?

My program runs a polling loop on an RS-485 network if that helps.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:36:47+00:00Added an answer on May 25, 2026 at 11:36 am

    The missing typedefs (HANDLE etc.) aren’t your problem. Your problem is that Linux and Windows have completely different APIs, you cannot simply hope to port one to the other by replacing a few type definitions.

    The complete platform-dependent portion of your code has to be replaced. Your first step is therefore to learn the Linux API. The best way of doing this is getting a book on Linux programming.

    Furthermore, Linux doesn’t provide a default API for window management as does Windows so if you are programming a graphical application then you need to choose a windowing library as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to port a C++ program from Linux to Windows using cygwin.
I am trying to port a Linux program written in C to Windows. In
I have a program I am trying to port to linux. The program is
I'm trying to port some Windows code to Linux, ideally through platform-independent libraries (eg
I have some old fortran 77 I'm trying to port to gcc on Windows.
I'm trying to port a program/game that was developed in linux/g++ so that it
I'm trying to port a program that uses zlib to Windows with MSVC. Unfortunately,
Currently I'm trying to port a web application(ASP.NET MVC) to windows azure and have
I'm trying to port some code from Linux to Windows. I really don't know
I'm trying to port an application written in C from linux to windows. At

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.