Results 1 to 9 of 9

Thread: Can I use Win API in linux?

  1. #1
    Junior Member
    Join Date
    Mar 2003
    Posts
    17

    Can I use Win API in linux?

    Hi,
    I currently using Win98SE to develop c++ code using win API, but Im intressted to switch to my Slack+Winex. My question is can I somehow use Win API under linux? Thanks in advance.
    -=[ r 4 B B i T ]=-

  2. #2
    AntiOnline Senior Member souleman's Avatar
    Join Date
    Oct 2001
    Location
    Flint, MI
    Posts
    2,883
    No
    \"Ignorance is bliss....
    but only for your enemy\"
    -- souleman

  3. #3
    Just Another Geek
    Join Date
    Jul 2002
    Location
    Rotterdam, Netherlands
    Posts
    3,401

    Re: Can I use Win API in linux?

    Originally posted here by r4BBiT
    Hi,
    I currently using Win98SE to develop c++ code using win API, but Im intressted to switch to my Slack+Winex. My question is can I somehow use Win API under linux? Thanks in advance.
    Take a look at wine
    Oliver's Law:
    Experience is something you don't get until just after you need it.

  4. #4
    AntiOnline Senior Member souleman's Avatar
    Join Date
    Oct 2001
    Location
    Flint, MI
    Posts
    2,883
    If you are programming for windows/wine/winex whatever, then yes, winAPI's will (should at least) work and can be used. If you are programming for linux/KDE/Gnome/Enlightenment/X/whatever then you can not use them.
    \"Ignorance is bliss....
    but only for your enemy\"
    -- souleman

  5. #5
    Leftie Linux Lover the_JinX's Avatar
    Join Date
    Nov 2001
    Location
    Beverwijk Netherlands
    Posts
    2,534
    the only question is why . . .

    the MFC's (Microsoft Foundation Classes) suck ass !!!
    QT (www.trolltech.com ) has far better API's
    ASCII stupid question, get a stupid ANSI.
    When in Russia, pet a PETSCII.

    Get your ass over to SLAYRadio the best station for C64 Remixes !

  6. #6
    Senior Member
    Join Date
    Mar 2003
    Location
    central il
    Posts
    1,779
    The machine you are programming on is irrelevant (assuming the LIbs are there), ll that matters is the machine that you are running it on. But if you want to write windows code on a Linux box Wine will help with debugging if you use windows api's. Otherwise you will need to transfer the program to a windows box for debugging...pain in the butt.

  7. #7
    If you want to write code that can be use on an windows or linux machine, you should write your own functions. The answer to your question is: NO.

  8. #8
    Junior Member
    Join Date
    Mar 2003
    Posts
    17
    Thanks to everyone for reply, I'll install winex again on my linux and try to use win api. Im not using MFC; for now just API.

    Originally posted here by Mahdi
    If you want to write code that can be use on an windows or linux machine, you should write your own functions.
    I dont know what do Mahdi mean by that, are you thinking about modules or header files?
    -=[ r 4 B B i T ]=-

  9. #9
    Just Another Geek
    Join Date
    Jul 2002
    Location
    Rotterdam, Netherlands
    Posts
    3,401
    Originally posted here by r4BBiT
    I dont know what do Mahdi mean by that, are you thinking about modules or header files?
    He means you have to write your own functions for opening a window i.e.. Then you can create 2 libraries with the same functions, 1 for windows and 1 for linux. That way your program can stay the same and it's just a case of recompiling and/or relinking to make it work on either of them.
    Oliver's Law:
    Experience is something you don't get until just after you need it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •