User forums > Using Code::Blocks

How do I create shared library step by step.

<< < (2/2)

Zini:
-fPIC is a compiler flag, that should be used when compiling the source files of the shared library. Probably goes under "Other Options". Consult your Code::Blocks manual about how to set compiler flags.

stahta01:
FYI:

You really need to turn on Full Compiler Logging and ask in a group that supports the library.
Or an Linux person who builds Libraries. 

Tim S.

stahta01:

--- Quote from: str0g on March 08, 2010, 03:05:02 pm ---
ProSlib:
Project->Set programs and arguements->This prog provides main executable [checked] and I set path to [Generated binary from ProjExec]

--- End quote ---

This does not sound right; but, it might be OK.
I will try it and see what happens.
I can not find the option under windows.

The code Compiles under Windows; with no errors; no idea without Good Full Compiler Build log what the issue is.

Tim S.

str0g:
Adding compilation flag fix the problem, thanks!

How to include your library?
#include "yourlibheaderFile.hpp"
build options->Search directories->Compiler->add dir with headers.
build options->linker link libraries->add dir to your library.

Navigation

[0] Message Index

[*] Previous page

Go to full version