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 7687895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:48:08+00:00 2026-05-31T19:48:08+00:00

Ok I am writing a library that will be shard between unix and windows.

  • 0

Ok I am writing a library that will be shard between unix and windows. I work with unix all day so the layout of the code is no problem. It is how I present this to a windows guys using VS2008.

Its been a really long time since I did windows dev (cough 3.1) so way out of touch.

I noticed VS2008 creates lots of directories and sub-directories (all of which seem undeeded).

Ok so onto the real question – I think cmake seems a nice easy portable solution – but what about instructions for the windows guys to include the library.

Unix guys know by command line how to add a library – but when you add an IDE it all gets (overly) complicated to me

So the meat of the question is how to provide/layout dir struct for a shared unix/windows library from the point of view of a die hard unix guy

  • 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-31T19:48:10+00:00Added an answer on May 31, 2026 at 7:48 pm

    The IDEs are frustrating as hell to use, but it is “expected” of you. 🙂 I find that I just create a “win32/” directory, in which the VC++ project files and directories go, in whatever manner the IDE wants to put them. In the project, I add the files in src/, the same as Unix. At least the IDE will refer to them with relative paths, so it tends to work out.

    As for the code itself, using #if HAVE_UNISTD_H around #include <unistd.h> etc, has been very helpful, and in the Windows compile, I tend do have one “win32.h” file that does the porting need.

    It gets a little ugly in win32.h, with the preprocessor calls for “strcase* -> stri*” and win32 versions of opendir etc. But I prefer that myself, as I personally do not want the bulk of the code be littered with #ifdef WIN32. I only boot Windows to compile, not to dev.

    I will say that I did the Win32 IDE work with the idea that people could compile my apps themselves. This has never happened, and they ask me to compile newer versions. Which is the opposite to Unix world.

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

Sidebar

Related Questions

So I'm writing a bunch or multithreaded code in library that will run in
So, I'm writing code for a class that will go into a library that
I am writing a library that will provide a collection of public types to
I'm writing a special data structure that will be available in a .NET library
While making some final tests of a class-library that I'm writing for Windows Mobile
I am thinking of writing a PHP extension library that will use the memcached
I'm writing a library that will be used in desktop and web apps. It
I'm writing a simple message queue library that will basically let you set up
So I'm writing a library and I want to define a constant that will
I'm re-writing a small C math library of mine that will end up as

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.