954,504 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Library requirements

I am trying to make a static library using Code::Blocks and when I make a new static library project it generates a cpp file with functions encased with extern "C" I am just wondering if this is necessary or if I can write the functions in normal c++ as well.

Labdabeta
Posting Pro in Training
489 posts since Feb 2011
Reputation Points: 27
Solved Threads: 18
 

Oh, also what other types of syntax can be used in static libraries? structs? classes? inheritance? templates?

Labdabeta
Posting Pro in Training
489 posts since Feb 2011
Reputation Points: 27
Solved Threads: 18
 

> I am just wondering if this is necessary or if I can write the functions in normal c++ as well.

No, it isn't necessary. As always, you would need to build both the library and the program using the library with the same compiler (version).

> Oh, also what other types of syntax can be used in static libraries?

Anything that you could use in a program without libraries.

vijayan121
Posting Virtuoso
1,606 posts since Dec 2006
Reputation Points: 1,159
Solved Threads: 287
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: