trying to compile my first libraries

G

GiuseppeDini

I'm new to c++ and I'm trying to understand how libraries work with c+
+.
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
IDE (codeblock, but not necessary), 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
 
I

Ian Collins

GiuseppeDini said:
I'm new to c++ and I'm trying to understand how libraries work with c+
+.
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
IDE (codeblock, but not necessary), so that I can modify the source
code if I want.
It looks like you have a windows question rather than a C++ one, try a
windows programming group.
 
G

GiuseppeDini

It looks like you have a windows question rather than a C++ one, try a
windows programming group.

The way libraries are compiled, linked and referred is so different
between windows and linux?
I think the situation if I did the same things on a different OS would
be the same.

Giuseppe
 
I

Ian Collins

GiuseppeDini said:
The way libraries are compiled, linked and referred is so different
between windows and linux?
I think the situation if I did the same things on a different OS would
be the same.
Unix/Linux dose not have .dll or .lib files. They have static (.a) and
dynamic (.so) libraries.

How they are built is both platform and tool specific.

This group is for C++ language questions. Questions about tools are
best directed at platform or tool specific groups, you will get better
help there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top