Lib file windows linux

Open LIB file

There are 12 other file types using
the LIB file extension!

.lib — Microsoft Linker compressed input library file

.lib — AS/400 physical file library

.lib — Finale NotePad music library

.lib — Game Maker Drag & Drop actions library

Bookmark & share this page with others:

LIB file extension — Microsoft Linker input library data

What is lib file? How to open lib files?

File type specification:

Source code and script file type

The lib file extension is used for one of the Linker Input files.

LINK accepts COFF standard libraries and COFF import libraries, both of which usually have the extension .lib.

Linker input libraries contain objects and are created by the LIB tool.

Linker import libraries contain information about exports in other programs and are created either by LINK when it builds a program that contains exports or by the LIB tool.

The default software associated to open lib file:

Microsoft Visual Studio

Company or developer:
Microsoft Corporation

Microsoft Visual Studio is an integrated development environment (IDE) used to create applications for Microsoft Windows, Windows Mobile, .NET Framework, Silverlight as well as dynamic websites and web applications. Visual Studio is available for Windows and Mac.

Help how to open:

Use Visual Studio to open *.lib files.

How to convert:

There is no way how to convert *.lib files to other file formats.

List of software applications associated to the .lib file extension

Recommended software programs are sorted by OS platform (Windows, macOS, Linux, iOS, Android etc.)
and possible program actions that can be done with the file: like open lib file, edit lib file, convert lib file, view lib file, play lib file etc. (if exist software for corresponding action in File-Extensions.org’s database).

Hint:
Click on the tab below to simply browse between the application actions, to quickly get a list of recommended software, which is able to perform the specified software action, such as opening, editing or converting lib files.

Software that open lib file — Microsoft Linker input library data

Programs supporting the exension lib on the main platforms Windows, Mac, Linux or mobile. Click on the link to get more information about Microsoft Visual Studio for open lib file action.

Читайте также:  Linux standard base lsb

Multiplatform:

Microsoft Visual Studio

lib file editor and apps that can edit lib file — Microsoft Linker input library data

Programs supporting the exension lib on the main platforms Windows, Mac, Linux or mobile. Click on the link to get more information about Microsoft Visual Studio for edit lib file action.

Multiplatform:

Microsoft Visual Studio

Programs that can create lib file — Microsoft Linker input library data

Programs supporting the exension lib on the main platforms Windows, Mac, Linux or mobile. Click on the link to get more information about Microsoft Visual Studio for create lib file action.

Multiplatform:

Microsoft Visual Studio

Browse by extension type:

  • Common file extensions
  • Video
  • Audio
  • Bitmap
  • Digital camera RAW
  • Vector graphics
  • Graphics
  • 3D graphics, CAD
  • Font
  • Document
  • Simple text
  • Ebook
  • Spreadsheet
  • Microsoft Office related
  • Computer game
  • Software emulation
  • Virtualization
  • Internet related
  • Email related
  • Email attachment blocked
  • Dangerous and malicious
  • Ransomware encrypted
  • Archive and compressed
  • Backup
  • Disk image
  • Mobile platforms
  • Mobile ringtone
  • Accounting, financial, tax files
  • Database
  • GIS, GPS, mapping
  • Program executable
  • System file
  • Settings, options, themes and skins
  • Plugin
  • Source code and script
  • Configuration file
  • Binary
  • Encrypted
  • Temporary
  • Unknown file type
  • Various data
  • Misc file extensions

Similar file types:

Note: We try to keep all external and related links up-to-date, however we are not responsible for the content of any site linked, further links on sites linked, or any changes or updates to the the information found on these sites. File-Extensions.org provides links to third party sites only as a convenience and the inclusion of such links on our site does not imply File-Extensions.org’s endorsement of either the site, the organization operating such site, or any products or services of that organization. A visit to any site or page from our web site via these links is done entirely at your own risk.

Legal notice: You may not, under any circumstances, resell or reproduce any information for commercial use without the express prior written consent of File-Extensions.org. Scripts to automatically harvest results are strictly prohibited due to performance reasons and will result in your IP being banned from this website.

Enter any file extension without dot (e.g. pdf)
Search for file extension details and associated application(s)

Источник

What is the equivalent of /usr/lib/ on Windows?

I am creating a cross-platform program that depends on libxml2. I do not want to use a POSIX environment such as Cygwin or MSYS on the Windows port of the app. I am planning to create a system of build scripts using Javascript Host for Windows and nmake. But, the question arose of where the build system should look for libxml2. In what locations should it look when the user does not specify a location? On Linux, it is usually /usr/lib/ and /usr/local/lib/. But on Windows, the only place that comes to mind is C:\Windows\system32. But isn’t that directory only modified by the system? (I obviously know next to nothing about the internals of Windows)

1 Answer 1

The true equivalent of /usr/lib/ in Windows really is %windir%\system32 , as it is always the (last) place where Windows looks for DLLs.

Читайте также:  Set variable in shell linux

But simply dumping your libraries there is part of why DLL Hell is a thing. This is why the COM system was introduced; if your DLL is a «server module» for COM classes, you can register it (for instance through the regsvr32 utility), after which applications can dynamically link with its served classes through the CoCreateInstance() function. Here, the registry serves the purpose of /usr/lib/ , but is completely different.

In modern Windows versions, the need for explicit registration is no longer needed with (registration-free) side-by-side assemblies. In fact, explicit deregistration of assemblies is sometimes needed to play nice with this new system. In this sense, %SystemRoot%\winsxs is the equivalent of /usr/lib/ , but in an even more convoluted way.

Because of this mess, the answer to your underlying question — «where should I look for libxml2 ?» — is that «you won’t find it». Unlike the operating systems that were made for modularity, you usually don’t install separate libraries on Windows. If you want to build against libxml2 , you either bundle the .lib file with your source, or tell the user to provide it. If you want to deploy a build, you deploy libxml2 along with your application (either statically linked, or as a DLL inside the application directory).

And even if it were installed system-wide, since libxml2 isn’t made with Windows-specific concepts in mind, the only place to find it would be %windir%\system32 . Nobody has the gall to place it there, though.

Note: I’m not very well versed in COM and .NET, so the above might not be completely accurate. If someone wants to improve upon this answer, I’m open to turning this into a community wiki.

Источник

.LIB File Extension

The lib file extension is used for one of the Linker Input files.

LINK accepts COFF standard libraries and COFF import libraries, both of which usually have the extension .lib.

Linker input libraries contain objects and are created by the LIB tool.

Linker import libraries contain information about exports in other programs and are created either by LINK when it builds a program that contains exports or by the LIB tool.

How to open:

How to convert:

Microsoft Corporation

Source code and script

N/A

How to solve problems with LIB files

  • Associate the LIB file extension with the correct application. On :
    Windows:Right click on any LIB file and then click «Open with» > «Choose another app». Now select another program and check the box «Always use this app to open *.LIB files».Mac:Right click (or Ctrl-click) the LIB file, then click «Open with» > «Other. «. Then choose another program and check the «Always Open With» box.Linux:Right click on the file, and select «Open with» and choose another program.iPhone:Tap the file. If you do not see an app to open the file, then tap Share «Share» and choose an app. Alternatively, save the file. Then open the Files app Files app. There long-press on the file, then release your finger. You will see a black menu bar. Then tap «Share» and select an app.Android:Tap the Settings icon on your smartphone, then tap on the Apps section. There tap the Options icon in the top right-hand corner of the screen to change the default apps.
  • Update your software that should actually open .LIB is Microsoft Linker input library data. Because only the current version supports the latest LIB file format. Search, therefore, e.g. on the Microsoft Corporation manufacturer website after an available .LIB is Microsoft Linker input library data update.
  • To make sure that your LIB file is not corrupted or virus-infected, get the file again and scan it with antivirus software.
Читайте также:  Linux make all cores

Источник

How to compile static .lib library for Windows in Linux or Macos

I am searching way to compile static library for Windows in Linux or Macos, there seems to be cross compiler to generate .a library for Windows like this one, but that is not what I want, what I want is a .lib static library file for Windows, preferably for Visual Studio. I know I can run a Windows virtual machine and using Visual Studio, but that is too heavy, and can’t be done in command line.

1 Answer 1

For unix-like OSes (Linux, MacOS, etc) a static library means an ar archive of object files. ar is the GNU general purpose archiver. It doesn’t care what kind of files you stick into an archive. It’s just the custom to call it «a static library» when they happen to be object files. And it’s also just a custom for an ar archive to be called *.a . You can call it *.lib , or anything.

For Visual Studio, a static library means an archive of PE-format object files usually created by the Microsoft tool LIB .

The format of an Microsoft LIB archive is in fact the same as that of a Unix ar archive. Microsoft just adopted it, long long ago.

So if you compile some PE object files on Linux using your distro’s PE cross-compiler then archive them into a *.lib with ar , you’ve got yourself a static library that’s good to go in Windows with the Visual Studio compiler.

Well, you have as long as those object files have C binary interfaces. If any of them have C++ interfaces, they’re useless: the Microsoft and GCC C++ compilers use different name-mangling protocols and are otherwise ABI incompatible.

We start in linux with some source code for the static library:

$ x86_64-w64-mingw32-gcc-win32 -o hello.obj -c hello.c 

Then a program that’s going to be linked with hello.lib :

extern void hello(void); int main(void)

Now we hop into a Windows 10 VM where we’re looking at the the files we’ve just created through a shared folder:

E:\develop\so\xstatlib>dir Volume in drive E is VBOX_imk Volume Serial Number is 0000-0804 Directory of E:\develop\so\xstatlib 03/12/2017 18:37 72 main.c 03/12/2017 18:29 978 hello.lib 03/12/2017 18:26 66 hello.c 03/12/2017 18:27 832 hello.obj 4 File(s) 1,948 bytes 0 Dir(s) 153,282,871,296 bytes free 

Compile and link our program:

E:\develop\so\xstatlib>cl /Fehello.exe main.c hello.lib Microsoft (R) C/C++ Optimizing Compiler Version 19.11.25547 for x64 Copyright (C) Microsoft Corporation. All rights reserved. main.c Microsoft (R) Incremental Linker Version 14.11.25547.0 Copyright (C) Microsoft Corporation. All rights reserved. /out:hello.exe main.obj hello.lib 
E:\develop\so\xstatlib>hello Hello world 

Источник

Оцените статью
Adblock
detector