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

  • SEARCH
  • Home
  • 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 3979890
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:13:31+00:00 2026-05-20T05:13:31+00:00

I am including a third party header and source file into my project. At

  • 0

I am including a third party header and source file into my project.

At the top of the header there is this:

#if defined(WIN32) || defined(WIN16)
#ifndef MSDOS
#define MSDOS
#endif
#endif

#include <stdio.h>
#include <stdlib.h>
#ifndef MSDOS
#include <unistd.h>
#endif
#include "des.h"

The problem is that #if defined(WIN32) fails and the compilation fails when trying to #include unistd.h which I don’t want to do.

I have third party project that works with this header file i.e. WIN32 is defined and it doesn’t try to include In Visual Studio I did “Go To Definition” on “WIN32” and was taken to the following definition in WinDefs.h.

#define WIN32

I’m not sure this is where its getting WIN32 definition from, as the third party project does not appear to include “WinDefs.h”.

So my problem is, how can I get WIN32 to be defined in my current new project?

  • 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-20T05:13:32+00:00Added an answer on May 20, 2026 at 5:13 am

    Depends on your project setup. WIN32 is defined inside the windows header files, but you can pass it to the compiler as well (“-DWIN32” for gcc for example). Try it and see whether it compiles.

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

Sidebar

Related Questions

Hi all this is my post on stackoverflow. I am normally a lurker and
I was just curious as to what CSS Pseudo selectors everyone thinks are safe
A colleague of mine wants to use my python 2 code on his OS
I am working on custom build software for postcode lookup based on Royal Mail
I'm trying to create a database but in the design process. A bit of
I just came to know to restrict my app only to be downloaded on
Not to be open-ended I will list my requirements. Must have native UI (or
I'm trying to write a function that will produce the combinations of list elements
I am trying to get the items of one list where any of the
GWT 2.2 and later includes Guava. The package containing Guava is com.google.gwt.thirdparty.guava . However,

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.