include library file <.lib>

CodeLite installation/troubleshooting forum
borodadada
CodeLite Enthusiast
Posts: 22
Joined: Wed Oct 16, 2013 4:20 pm
Genuine User: Yes
IDE Question: c++
Contact:

include library file <.lib>

Post by borodadada »

How do I connect the library file format .lib?
I try
Image
Not work.
Image

Windows 7x64.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: include library file <.lib>

Post by eranif »

Hi,

You are mixing here 2 different tools: The GNU toolchain and Windows MSVC lib files
They are not compatible.

Either use MSVC toolchain (note that codelite support for MSVC is limited, e.g. there are no debugging capabilities for binaries created with MSVC compiler )
Or find the proper .a that can be used with GNU (g++/gcc)

BTW, this stackoverflow answer suggests that it is OK to rename it from .lib to .a
http://stackoverflow.com/questions/1290 ... -windows-7

Eran
Make sure you have read the HOW TO POST thread
borodadada
CodeLite Enthusiast
Posts: 22
Joined: Wed Oct 16, 2013 4:20 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: include library file <.lib>

Post by borodadada »

rename it from .lib to .a dont work.
in the set there is a bin folder
libsndfile-1.dll
need to connect dll?
wrote on his website that this version windows 7x64.

on site
There is currently only one way of building libsndfile for Win32 and Win64; cross compiling from Linux using the MinGW cross compiler.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: include library file <.lib>

Post by eranif »

If it was built for MinGW, then you should be able to link to the dll directly without the .lib (unlike VC, GCC does not need an export file to find the symbols)

So try this:
- Copy libsndfile-1.dll to the C:/MinGW-4.7.1/libsndfile/lib
- In the project settings, change the library name to libsndfile-1 (notice that I did not add any extension to the library name)

Eran
Make sure you have read the HOW TO POST thread
borodadada
CodeLite Enthusiast
Posts: 22
Joined: Wed Oct 16, 2013 4:20 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: include library file <.lib>

Post by borodadada »

No more mistakes, apparently all is well.
Image

But...
Image
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: include library file <.lib>

Post by eranif »

This error means that the DLL is not set in your path
Settings -> Environment variables

and add this line (copy paste it);

Code: Select all

PATH=C:\MinGW-4.7.1\libsndfile\lib;$PATH
this should fix this

Eran
Make sure you have read the HOW TO POST thread
borodadada
CodeLite Enthusiast
Posts: 22
Joined: Wed Oct 16, 2013 4:20 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: include library file <.lib>

Post by borodadada »

Big thx Eran All Work!
Post Reply