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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:35:44+00:00 2026-06-14T17:35:44+00:00

does anybony compiled successfully the Maxmind C library on Visual Studio 2010? I’m not

  • 0

does anybony compiled successfully the Maxmind C library on Visual Studio 2010? I’m not able to compile it on Windows because I get a lot of errors regarding files not found like unistd.h

  • 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-06-14T17:35:45+00:00Added an answer on June 14, 2026 at 5:35 pm

    The error that you are seeing is probably because you are including GeoIPUpdate which isn’t really necessary. GeoIPUpdate is a standalone script for updating the databases, and isn’t necessary to use the APIs themselves. Try removing that to see if that resolves your issues.

    Additionally, to get version 1.4.8 to compile for me on Visual Studio 2005 I had to do the following additional steps:

    1. In GeoIPCity.c change the inclusion of the GeoIP*.h files to use “” instead of <>
    2. In GeoIPCity.h change the inclusion of GeoIP.h to use “” instead of <>
    3. In GeoIP.h add #define ssize_t long
    4. In GeoIP.c change PACKAGE_VERSION to “1.4.8”
    5. In GeoIPCity.c you cannot use a static const when declaring an array. Change the definition of tmp_fixed_record to be
      unsigned char tmp_fixed_record[6+4]; //Can't use CITYCONFIDENCEDIST_FIXED_RECORD in declaration
    6. In GeoIPCity.c declare t at the start of _extract_record().
    7. Add main function to GeoIPCity.c to get your code to compile.
    8. Download the zlib125.dll.zip files from http://www.winimage.com/zLibDll/index.html. Extract these files and save the dllx64/* and static64/zlibstat.lib files to a location on disk.
      Now, in Visual Studio go to Project->Properties->Linker->Input and under “Additional Dependencies” add “ws2_32.lib zlibwapi.lib zlibstat.lib”. Next, Under Linker->General go to
      “Additional Library Dependencies” and add the location of where you saved the files above.
    9. In GeoIPCity.c and GeoIP.c pread is undefined. Add the following definition to each of these files:

    #define pread my_pread
    static size_t my_pread( int file_no, void *buffer, size_t size, size_t offset )
    {
      if (_lseek( file_no, (long)offset, SEEK_SET) == offset)
        return _read(file_no, buffer, (int)size);
      else
        return -1L;
    }
    

    Additionally, add #include <io.h> to GeoIP.h so that _lseek and _read are included.

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

Sidebar

Related Questions

I compiled my trayicon utility c++ code in visual studio 2005 express edition and
Visual Studio language extensibility Does anybody know whether there's an open source (or paid)
I've successfully compiled Moses (v0.91) on my machine (Windows 7 64-bit) by following the
Does anybody know if the CUDA library 'Thrust' can generate random numbers on the
Does anybody try zf2? I can not understand new mechanism of using sessions in
Does anybody know a Perl library that can parse XML documents and enables me
does anybody know of an extension of shouldjs or some other assertion library which
Does anybody know where to get a MySQL libraries compiled for the arm iPhone
I'm writing a C++ application in Visual Studio 2008. It has a lot of
I'm writing a C++ application in Visual Studio 2008. It has a lot of

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.