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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:07:20+00:00 2026-05-27T11:07:20+00:00

This question is a bit specific, but here goes: I’d like to use ZZipLib

  • 0

This question is a bit specific, but here goes: I’d like to use ZZipLib with SDL. (http://zziplib.sourceforge.net/) ZZipLib comes with a file called SDL_rwops_zzip.c that is specifically intended to make it easy to plug into SDL’s file calls. And I have in fact done this without trouble on the Mac.

The problem is on Windows it won’t compile. The code in question is from SDL_rwops_zzip.c:

#define SDL_RWOPS_ZZIP_DATA(_context) \
         ((_context)->hidden.unknown.data1)
#define SDL_RWOPS_ZZIP_FILE(_context)  (ZZIP_FILE*) \
         ((_context)->hidden.unknown.data1)

static int _zzip_seek(SDL_RWops *context, int offset, int whence) // line 30
{
    return zzip_seek(SDL_RWOPS_ZZIP_FILE(context), offset, whence);
}

The errors I get are:

SDL_rwops_zzip.c(31): warning C4028: formal parameter 1 different from declaration
SDL_rwops_zzip.c(31): warning C4028: formal parameter 3 different from declaration
SDL_rwops_zzip.c(31): warning C4029: declared formal parameter list different from definition
SDL_rwops_zzip.c(31): error C2491: ‘_read’ : definition of dllimport function not allowed

This Stack Overflow post gives some info on that error:
definition of dllimport function not allowed

but I really don’t understand what to do to resolve this error in this particular situation.

  • 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-27T11:07:21+00:00Added an answer on May 27, 2026 at 11:07 am

    I solved the problem by recompiling zziplib using a built-from-scratch Visual Studio 10 Project (the upgraded visual studio 7 project did not produce a working library or .dll), and then by commenting out these lines in conf.h:

    # if !__STDC__
    #  ifndef _zzip_lseek
    #  define _zzip_lseek _lseek
    #  endif
    #  ifndef _zzip_read
    #  define _zzip_read _read
    #  endif
    #  ifndef _zzip_write
    #  define _zzip_write _write
    #  endif
    #      if 0
    #  ifndef _zzip_stat
    #  define _zzip_stat _stat
    #  endif
    #      endif
    # endif // !__STDC__
    #endif
    

    and this:

    #  ifndef _zzip_lseek
    #  define _zzip_lseek lseek
    #  endif
    
    #  ifndef _zzip_read
    #  define _zzip_read  read
    #  endif
    
    #  ifndef _zzip_write
    #  define _zzip_write  write
    #  endif
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question may be a bit specific for stackoverflow, but here it is. I
I noticed This question , but my question is a bit more specific. Is
This question may seem a little bit stackoverflow-implementation specific, but I have seen a
I already asked a similar question but this one is a bit different/specific: I'm
This question is a bit of a two parter for .Net data services. This
This question is a bit of a two-parter. First, the title question. Here's what
I know this question has been asked a bit before. But looking around I
The question plot (a bit abstract, but answering this question will help me in
So, the context of this question is pretty specific, but I think there is
I know that this question might have been asked like 100 times, but, believe

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.