943,751 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 1936
  • C++ RSS
Sep 2nd, 2009
0

error: windows.h: No such file or directory

Expand Post »
Hi,

I have this code in C++ and it is not compiling in a terminal window on a Fedora Linux machine.

Please help, thanks a lot

C++ Syntax (Toggle Plain Text)
  1. #include <windows.h>
  2.  
  3. int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
  4. LPSTR lpCmdLine, int nCmdShow)
  5. {
  6. MessageBox(NULL, "Goodbye, cruel world!", "Note", MB_OK);
  7. return 0;
  8. }
Last edited by tech291083; Sep 2nd, 2009 at 3:51 am.
Similar Threads
Reputation Points: 15
Solved Threads: 0
Junior Poster
tech291083 is offline Offline
181 posts
since Oct 2006
Sep 2nd, 2009
1

Re: error: windows.h: No such file or directory

This is Windows code, not Linux.
Reputation Points: 395
Solved Threads: 71
Posting Whiz
jencas is offline Offline
362 posts
since Dec 2007
Sep 2nd, 2009
0

Re: error: windows.h: No such file or directory

Click to Expand / Collapse  Quote originally posted by jencas ...
This is Windows code, not Linux.
Hi,

Thanks a lot for the reply, I am sorry to post the code since I am not aware of the fact that it belongs to Windows, Could you please tell me as to what I should do in order to find code that has buttons etc and can work in Linux terminal?

Any particular web site or books for the purpose?

Thanks a lot my friend for your time, appreciated.........
Reputation Points: 15
Solved Threads: 0
Junior Poster
tech291083 is offline Offline
181 posts
since Oct 2006
Sep 2nd, 2009
1

Re: error: windows.h: No such file or directory

Click to Expand / Collapse  Quote originally posted by tech291083 ...
Thanks a lot for the reply, I am sorry to post the code since I am not aware of the fact that it belongs to Windows
The line #include <windows.h> didn't ring a bell ?

Click to Expand / Collapse  Quote originally posted by tech291083 ...
, Could you please tell me as to what I should do in order to find code that has buttons etc and can work in Linux terminal?
My personal favorite is wxWidgets
Moderator
Featured Poster
Reputation Points: 4142
Solved Threads: 394
Industrious Poster
Nick Evan is offline Offline
4,132 posts
since Oct 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: How do I create my own compiler directives?
Next Thread in C++ Forum Timeline: cmd window





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC