Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: giusdisa on September 14, 2008, 12:33:14 pm

Title: trying to compile my first libraries
Post by: giusdisa on September 14, 2008, 12:33:14 pm
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
Title: Re: trying to compile my first libraries
Post by: stahta01 on September 14, 2008, 04:58:54 pm
Use the same brand compiler and the results will be closer.

GCC produces .a files
MS VC produces .lib files
Title: Re: trying to compile my first libraries
Post by: giusdisa on September 14, 2008, 07:06:45 pm
Thank you.
So the size could be so different.  :shock:

   Giuseppe