Author Topic: trying to compile my first libraries  (Read 7652 times)

giusdisa

  • Guest
trying to compile my first libraries
« 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

Online stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: trying to compile my first libraries
« Reply #1 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
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

giusdisa

  • Guest
Re: trying to compile my first libraries
« Reply #2 on: September 14, 2008, 07:06:45 pm »
Thank you.
So the size could be so different.  :shock:

   Giuseppe