MSVC compilation of DLLs

Rolf Kalbermatter rolf.kalbermatter at citeng.com
Sun Jan 1 16:34:53 CST 2006


I was just looking to get some of the Wine DLLs compiled under Visual C and
run into a number of problems.

First msvcmaker seems to only create a wine.dsp file in the loader directory
but rather should do that in the libs/wine directory instead it would seem to
me.
Second it also should create a wine_unicode.dsp project in libs/unicode which
it doesn't do at all.

I created my own wine.dsp file to create a wine.lib file but run into new problems.
First the DECLSPEC_NORETURN position in following declaration does not work with
Visual C. It does want the DECLSPEC_NORETURN before the entire function declaration
and not before the function pointer name.

This:

struct wine_pthread_functions
{
    void   (*init_process)( const struct wine_pthread_callbacks *callbacks, size_t size );
    void   (*init_thread)( struct wine_pthread_thread_info *info );
    int    (*create_thread)( struct wine_pthread_thread_info *info );
    void   (*init_current_teb)( struct wine_pthread_thread_info *info );
    void * (*get_current_teb)(void);
    void   (* DECLSPEC_NORETURN exit_thread)( struct wine_pthread_thread_info *info );
    void   (* DECLSPEC_NORETURN abort_thread)( long status );
};

should get:

struct wine_pthread_functions
{
    void   (*init_process)( const struct wine_pthread_callbacks *callbacks, size_t size );
    void   (*init_thread)( struct wine_pthread_thread_info *info );
    int    (*create_thread)( struct wine_pthread_thread_info *info );
    void   (*init_current_teb)( struct wine_pthread_thread_info *info );
    void * (*get_current_teb)(void);
    DECLSPEC_NORETURN void (* exit_thread)( struct wine_pthread_thread_info *info );
    DECLSPEC_NORETURN void (* abort_thread)( long status );
};

to compile, but probably won't work for the GNU_C declaration of this macro, or does it?

The next problem are the use of BINDIR and DLLDIR in config.c and loader.c respectively.
What are those and do they have any function under a Windows compile of these files?
Should those parts of the files simply be excluded for such a compile, or are they not
necessary at all? 

Rolf Kalbermatter




More information about the wine-devel mailing list