User forums > Using Code::Blocks

Create project using a library project from Wizard.

(1/1)

MistaGNerd:
Hello,
i'm trying to create a library project via the Wizard, and use said library in a console project. Although I tried all 3 types of library project (Dynamic, Shared and Static) to keep things simple lets say I tried using an unmodified Shared Library and attempted to add it to my Console project. I always get a "No such file or directory" with my include <testLib> in the header of my main file and no matter how I try I can't seem to get it to work. As a result I can't call the add function in the default lib. I think i'm setting up the linker incorrectly in the project build options. Any help or link to a guide would be greatly appreciated.

-Mista G Nerd

oBFusCATed:
Read in the compiler manual how include paths work (-I option in gcc).
The add the required paths in Project -> Build options -> Search paths -> Compiler.
When you get to the linking stage you'll probably have to add the correct linker search paths.
It is in the same place but the linker tab.

Navigation

[0] Message Index

Go to full version