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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:33:42+00:00 2026-05-19T01:33:42+00:00

I’m trying to use a few open source libraries like libpng in my VC++

  • 0

I’m trying to use a few open source libraries like libpng in my VC++ project. I’ve used them in Linux environment without problems, but I’m clueless about how to get them to work in the VC++ environment. Here’s what I tried:

  1. I installed the libpng for Win32 package from SF (I also installed zlib the same way btw). I can see png.h in Program Files\GnuWin32\include but when I include it, the compiler says it requires unistd.h. I know this is the header for POSIX system calls so Windows won’t have it.

  2. I installed Cygwin, but later realized it’s only good for building linux source codes on windows using gcc, instead of using MS VC (or am I wrong?)

  3. I installed MinGW, but it seems MinGW is designed for using gcc too (or am I wrong?). MinGW does come with unistd.h but this header references MinGW’s sys/types.h which is from linux, and MSVC has its own different sys/types.h so the compiler doesn’t know which to use. The two files define different things and neither can cover both, so including either is not enough to get the whole project compile.

To this point it seems like a quite stupid #include problem but I just can’t figure out the right way to do. I’m really a cross-platfrom noob. Maybe I’m going the wrong way from beginning…

So how should I proceed? What is your standard way of using linux libraries in VC++?

By the way it is possible for me to build with gcc using MinGW or Cygwin to generate windows executables, but I’d really prefer being able to build with VC++ because of my existing code base. Thank you for any help!

  • 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-19T01:33:42+00:00Added an answer on May 19, 2026 at 1:33 am

    Obviously, you must download libpng.lib/dll and header files for MS VC.

    If your package has folder structure something like GnuWin32, it is definitely not for MS VC.

    Check out OpenCV distribution (http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.2/)

    It contains VC build of libpng and other image format libraries.

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
I've got a string that has curly quotes in it. I'd like to replace

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.