Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
C++ Application Development with Code::Blocks

You're reading from   C++ Application Development with Code::Blocks Using Code::Blocks it's possible for C++ developers to create application consistency across multiple platforms. This book takes you through the process from installation to implementing advanced features, all with a user-friendly approach.

Arrow left icon
Product type Paperback
Published in Oct 2013
Publisher
ISBN-13 9781783283415
Length 128 pages
Edition Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
BIPLAB MODAK BIPLAB MODAK
Author Profile Icon BIPLAB MODAK
BIPLAB MODAK
Arrow right icon
View More author details
Toc

Workspace


Workspace in Code::Blocks is a collection of projects. Workspace acts as a container of projects and also maintains project dependencies. So if project 2 is dependent upon project 1, then project 2 will be compiled before compilation of project 1.

Consider the following snippets. Create a static library project named libcalc by navigating to File | New | Project… and select Static library wizard.

Then replace code of project's main.c file with the following code:

int mult(int a, int b)
{
    return (a * b);
}

Next create a console project named App6 and then replace its main.cpp file with the following code:

#include <iostream>

extern "C" int mult(int a, int b);

int main() {
    std::cout << "2 * 3 = " << mult(2, 3);
    return 0;
}

The Management window now shows two projects in one workspace. Workspace has been renamed to App6 in the following screenshot:

This workspace can be saved by navigating to File | Save workspace as… menu option. Right-click on the App6 project...

You have been reading a chapter from
C++ Application Development with Code::Blocks
Published in: Oct 2013
Publisher:
ISBN-13: 9781783283415
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image