News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

trying to compile my first libraries

Started by giusdisa, September 14, 2008, 12:33:14 PM

Previous topic - Next topic

giusdisa

I'm new to c++ and I'm trying to understand how libraries work with codeblock.
I have a project (opencv, but this question is not opencv specific) with a folder for each library, and in each folder two folders "include" with headers and "code" with some headers and .cpp files.
Furthermore there are two folders outside "bin" with .dll files and "lib" with .lib files.

What I want to do is to produce .lib and .dll files by myself using my codeblock, so that I can modify the source code if I want.

If I choose a shared library or a dynamic library project and take all the files in a source folder in my project, compile and link them I get, in both case, two files: cxcore100.dll (980 Kb) and cxcore.a
(607Kb).
The original files were cxcore100.dll (989 Kb) and cxcore.lib (80Kb).

Why the second file is much bigger, do I be wrong somewere?

     Giuseppe

stahta01

Use the same brand compiler and the results will be closer.

GCC produces .a files
MS VC produces .lib files
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

giusdisa

Thank you.
So the size could be so different.  :shock:

   Giuseppe