473,625 Members | 3,064 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

class library in c++

what is a class library and how does it different from c++ header file?

Sep 29 '05 #1
20 1787
In general, a class library would consist of several header files and
the associated source files.

--
EventStudio System Designer 2.5 - http://www.EventHelix.com/EventStudio
Sequence Diagram Based System Design and Modeling Tool

Sep 29 '05 #2
thanks.
Tell me one more thing , that how can I hide my header files and other
source file in a class library, so that my client would not be able to
open it and can not tamper the classes with in it.

Sep 30 '05 #3
Search Google for "c++ code obfuscator".

For source files, you could just ship the object files.

--
EventStudio System Designer 2.5 - http://www.EventHelix.com/EventStudio

Sequence Diagram Based System Design and Modeling Tool

Sep 30 '05 #4
pooja wrote:
Tell me one more thing,
"How can I hide my header files and other source file in a class library
so that my client would not be able to open it
and can not tamper the classes with in it?"


You can't.
You *must* distribute the header files
which define the public interface for the library.
Developers who distribute proprietary libraries
distribute object files in library archives
and *not* the source files which define the implementation.
You can do this too if you can compile your library
for every target platform.
Sep 30 '05 #5
how can I distribute the header files
which define the public interface for the library.?
how does Developers distribute proprietary libraries
distribute object files in library archives
and *not* the source files which define the implementation.
Tell me the code snippet for it.
also teel me the site from where i can get the information

Oct 1 '05 #6
pooja wrote:
how can I distribute the header files
which define the public interface for the library.?
how does Developers distribute proprietary libraries
distribute object files in library archives
and *not* the source files which define the implementation.
That depends on your toolset. For instance on Unix you might use the
'ar' command. With Microsoft VC++ you might use the 'lib' command.

Tell me the code snippet for it.
also teel me the site from where i can get the information


There is no code snippet. You just write the code as normal, make a
library from it. Then send the library and the header files to whoever
wants to use the library.

You get the information by reading the documentation that comes with
your compiler and other tools.

john
Oct 1 '05 #7
Can we develop library files and header files in a way so that it can
not be tampered by the programmers by using Turbo C and Borland C
compiler?

Oct 3 '05 #8
pooja wrote:
Can we develop library files and header files in a way so that it can
not be tampered by the programmers by using Turbo C and Borland C
compiler?


The library file is compiled already. Without access to the sources, your
customers will not be inclined to change. (The obvious path of changing a
library file is to recompile the source. This path is blocked if your keep
the source. Non-obvious paths of changing the binary exist, but the few who
can do that, you cannot stop.)

As for the headers, your customers would not use the compiler to "tamper"
with the header. They would just use their favorite text editor and change
it. More likely, however, they would create a different version and then
include their file rather than yours. Nothing forces a user to tell the
compiler about your header just because he intends to tell the linker about
your library. The compiler has no premonitions, it simply does not know
about the linker.

Also, why would that be of your concern? Keep in mind that, since their
version still would have to match the library file, they cannot really
depart very much. However, they could put certain identifiers into a
different namespace. Actually, your customers might have a very legitimate
reason for doing exactly that: it could be the only way to avoid conflicts
arising from the use of several libraries.
Best

Kai-Uwe Bux
Oct 3 '05 #9
Ok thanks , but still some confussion is there

suppose I have created a file "abcd.h" like this
//abcd.h
#inlcude<iostre am.h>
class c1
{
public:
void sum()
{
cout<<"I am sum function";
}
};

now I created another file "file1.cpp" , in which I included this
"abcd.h" file.
//file1.cpp
#include"abcd.h "
void main()
{
c1 obj;
obj.sum();
}

I want that my customer would also use "abcd.h" header file as I am
using it in the above file1.cpp.
Tell me how should I distribute "abcd.h" to my programmer using TC as a
compiler.
Can I Simply copy it on a CD and hand it to the customer or so some
other steps are there?

Oct 3 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
1937
by: syd | last post by:
In my project, I've got dozens of similar classes with hundreds of description variables in each. In my illustrative example below, I have a Library class that contains a list of Nation classes. In one case, I might want a Library class with only Nations of with the continent variable "Europe", and so I'll do something like library.getContinent('Europe') which will return a Library() instance with only European nations. Similarly, I...
6
6172
by: Patrick | last post by:
Following earlier discussions about invoking a .NET class library via ..NET-COM Interop (using regasm /tlb) at http://groups.google.com/groups?hl=en&lr=&threadm=%23Van7eSrEHA.4004%40TK2MSFTNGP10.phx.gbl&rnum=1&prev=/groups%3Fhl%3Den%26lr%3D%26selm%3D%2523Van7eSrEHA.4004%2540TK2MSFTNGP10.phx.gbl I have concluded that my .NET class library (following the suggestions. namely setting the marshall type, etc.) , I can 1) Invoke public methods...
4
1759
by: Brian Shannon | last post by:
I am playing around with class libraries trying to understand how they work. I created a class library, library.vb. I placed the library.dll into the bin directory and set my reference. If I update the library.dll can I Just place the new .dll in the bin directory or do I need to recompile my program. During testing I am just placing the new library.dll in the bin directory and don't get any of the updates I made until I re-reference...
3
1636
by: eBob.com | last post by:
I have several applications which mine web sites for personal information which they publish. They publish the info in one form, I transform the info into Excel spreadsheets. So all these programs pick up name, telephone number, age, sex, etc.. And as they pick up the information they display it in text boxes. The text boxes are display only, and the info is displayed only for debugging purposes. Right now I have a lot of duplicate...
5
1936
by: Tony Johansson | last post by:
Hello! I have one solution file that consist of three project. One project that build the exe file called A One project that build a user control dll. Here we have a class called B One project that build a class library dll. Here we have a class called C We have one dependency and that is from the user control to the class library because in the constructor for class B in the user control we have a call to
0
1747
by: tony | last post by:
Hello! I have one solution file that consist of three project. One project that build the exe file called A One project that build a user control dll. In this user control we have a class called B One project that build a class library dll. In this class library we have a class called C In the user control project I have a project reference to the class library.
5
1990
by: tony | last post by:
Hello! This is a rather long mail but it's a very interesting one. I hope you read it. I have tried several times to get an answer to this mail but I have not get any answer saying something like this is a bug or that .NET doesn't support what I trying to do. I hope that one that is is microsoft certified read this because this must be a bug.
5
8606
by: Rainer Queck | last post by:
Hello NG, Is it possible to share the settings of an application with a class libreary? In my case I have a application and a set of different reports (home made) put into a class library. The plan is to delivere different report.dlls with the main app. But it is essentially importent, that the reports and the app use the same settings.
0
2400
by: drawing in aspnet | last post by:
Question about putting the data layer in a separate class library. I keep reading that the data layer should be separated from the presentation layer and put in its own class library. I am trying to do this but running into a problem. I'm hoping someone can point me in the right direction. I first create a class library (all code in C#) and within this class library create a very simple Sql Server Express database (.mdb) file. It's...
4
1386
by: Steve Baer | last post by:
I've already tested this with C# and it works, but I'm being paranoid and I wanted to also check here. Our application has a large class library written in C++/CLI for plug-in projects. The original library was written in C++ and the general rule for not breaking our SDK is to not change the class size by adding member variables and to not add virtual functions because this will change the vtable for the class. This is fine and we know...
0
8259
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8192
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8696
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8358
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6119
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5571
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2621
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1805
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1504
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.