Module capability like a DLL?

Discussion to talk about software related topics only.
Post Reply
RickB
Posts: 4
Joined: Mon Jan 15, 2018 8:12 am

Module capability like a DLL?

Post by RickB »

Very new to Netburner after inheriting some code after the original developer passed away.

Broad question: is there a way to do something like a windows DLL in Netburner? We have a core product functionality that doesn't change. But then there are customizations based on what the customer has purchased that require custom development.

what I would like to do is create an interface that remains constant. The main core product would call these interface commands. The baseline product would ship with a module that fleshes out these interface commands which are No Op commands. Then, if the customer has purchased extended capability, they get a different module which fleshes out the interface commands.

This way, I don't have to recompile the main code base for every customization.

Is this something that the NetBurner architecture provides for?
sulliwk06
Posts: 118
Joined: Tue Sep 17, 2013 7:14 am

Re: Module capability like a DLL?

Post by sulliwk06 »

I do think NBEclipse has an option in the project wizard to compile as a library, but I've personally never done it. If you can do that then you should be able to link that library into all of your projects when you compile them.
joepasquariello
Posts: 85
Joined: Mon Apr 28, 2008 7:32 am

Re: Module capability like a DLL?

Post by joepasquariello »

This is how I create libraries with NBEclipse:

1) From File menu, choose New, then Project.
2) When the New Project window opens
a) choose NetBurner Project
b) press Next button
3) When the C++ Project window opens
a) enter Project Name
b) change Project Type from NetBurner Executable to NetBurner Device Library
c) press Next button
4) From next window
a) press Advanced Options
b) click on NetBurner options
c) choose Target Platform
d) press OK button
e) press Finish button

This is how I add a library to a project in NBEclipse:

1) Right-click on project name and choose Properties.
2) From left panel, choose C/C++ Build, then Settings.
a) Add library path to "C" directories:
- On right side, choose GNU C Compiler, then Directories.
- Click on "+" icon at top right.
- In dialog, press Workspace, browse to library folder, press OK.
- Make sure new library path is at the BOTTOM of the list.
b) Add library path to "C++" directories:
- On right side, choose GNU C++ Compiler, then Directories.
- Click on "+" icon at top right.
- In dialog, press Workspace, browse to library folder, press OK.
- Make sure library path is at the BOTTOM of the list.
c) Add library to C/C++ libraries:
- Make sure library project is OPEN in the Eclipse IDE.
- On right side, choose GNU C/C++ Linker, then Libraries
- Click on "+" icon at top right.
- In dialog, press Workspace, browse to library folder, then
Release, then library.a, and press OK.
- Make sure library path is at the BOTTOM of the list.
d) Be SURE to press OK to exit Properties dialog!!!

I'm not sure there isn't a simpler way to do all of this, but it's what I came up with by trial and error.
Post Reply