2 Replies - 394 Views - Last Post: 26 May 2012 - 07:15 AM Rate Topic: -----

#1 Rhysorourky  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 24
  • Joined: 01-May 12

errors in my code?

Posted 26 May 2012 - 07:04 AM

i know the reason why i get errors in my code its because of these lines of code
#include <windows.h>
#include <stdio.h>
#include <winuser.h>



i originally made the program for windows and tried to now make it on mac but i get lots of errors because of those libaries and was hopeing anyone new what the mac version of those libaries are please help and by the way its just a console application no gui

Is This A Good Question/Topic? 0
  • +

Replies To: errors in my code?

#2 sepp2k  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2153
  • View blog
  • Posts: 3,315
  • Joined: 21-June 11

Re: errors in my code?

Posted 26 May 2012 - 07:12 AM

There's no drop-in replacement for those headers. So you can't just replace those headers with their OSX equivalent and be done with it.

You'll need to significantly rewrite your program to use OSX or cross-platform libraries instead of functions from those headers (except stdio.h which is actually a standard header that you can keep as-is).
Was This Post Helpful? 0
  • +
  • -

#3 jimblumberg  Icon User is offline

  • member icon


Reputation: 4290
  • View blog
  • Posts: 13,454
  • Joined: 25-December 09

Re: errors in my code?

Posted 26 May 2012 - 07:15 AM

You will need to show code for a complete answer, but with what you've shown just delete the two Windows specific include files.

#include <windows.h> // This is Windows specific and not available on a Mac
#include <stdio.h>
#include <winuser.h>// This is Windows specific and not available on a Mac


Jim
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1