0

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.

2
Contributors
2
Replies
4
Views
6 Years
Discussion Span
Last Post by vijayan121
0

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

0

> 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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.