Ticket #57 (closed enhancement: fixed)

Opened 3 years ago

Last modified 18 months ago

add MSVC/WDK project files

Reported by: pbatard Owned by: stuge
Milestone: Component: libusb-1.0
Keywords: Visual Studio Cc:
Blocked By: Blocks:

Description

While the current libusb supports compilation on Windows, and the code was clearly designed to support MS compilers, it still lacks the MSVC project files.

This is an enhancement to add MSVC project files to libusb (Visual Studio 6, Visual Studio 2005) as well as a WDK/DDK build scripts, the latter being useful for people wanting to compile a 64 bit version of the library with the freely available Microsoft tools.

Change History

comment:1 Changed 3 years ago by dsd

  • Owner changed from pbatard to stuge
  • Status changed from new to assigned

After looking at the MSVC patches in detail I've decided that I'm not prepared to include this in libusb. Just doesn't make sense to support such a different environment where so much stuff has to be duplicated, especially when we're closing in on producing something that can be compiled on GNU and safely used by MSVC projects. But I think Peter Stuge is considering it.

comment:2 Changed 3 years ago by pbatard

What you're proposing is exactly similar to removing the ability for people using the most widespread compiler on Linux (gcc) to compile a static libusb application, and force them to use a shared library.

MinGW cannot generate a static library that can be used with the most common development environment on Windows (MSVC). The static library generated from MinGW can only be used with MinGW applications. What you are proposing then is forcing every MSVC developer to only use the DLL.

comment:3 Changed 3 years ago by dsd

I think it would be perfectly reasonable to reject static library support on Linux if it involved duplicating the build system.

comment:4 Changed 3 years ago by stuge

main.obj (from CL /c) can be LINKed with foo.o (from i686-w64-mingw32-gcc -c) and the resulting statically linked main.exe works fine. I think that any issues that have been noticed with static libraries built by MinGW can be solved pretty easily. That's not really on topic for this ticket though.

comment:5 Changed 18 months ago by pbatard

In [c1e75431418cdfc10ec963d823fce479cdae6840/libusb]:

Windows: MS project files part 1 - support files & preliminaries

  • adds the MSVC support files used by MSVC6, VS2005 and WDK
  • also adds missing defines required by MS compilers in libusb.h
  • also anticipatory sets .gitattributes for CRLF handling
  • also adds manually maintained .def file for import lib generation

References #57.

comment:6 Changed 18 months ago by pbatard

In [9e5f4277e379a82f5d32e81db1bd0ffaa6637596/libusb]:

Windows: MS project files part 2 - WDK project files

References #57.

comment:7 Changed 18 months ago by pbatard

In [78896ae99b9c2d5672fc93c5bad0f5e8e75c53ea/libusb]:

Windows: MS project files part 3 - VS2005 project files

References #57.

comment:8 Changed 18 months ago by pbatard

  • Resolution set to fixed
  • Status changed from assigned to closed

In [bb108cbe39802785d10fe025b74ca5ee19734151/libusb]:

Windows: MS project files part 4 - MSVC6 project files

Fixes #57 and #1.

Note: See TracTickets for help on using tickets.