Jump to content
Sign in to follow this  
chrisassall

How To Make Lib's In Boostbasic

Recommended Posts

Just want to make a lib in Boostbasic.

 

I tried your example from PunerjotMangat -> Hard-Usart

 

consist of 3 files Usart.bas , Mylibs\usartlib.bas , Mylibs\lcdbaslib.bas

 

compiling and linking at this state/ with the deliverd project file. Works. - O.K.

 

Now tried to make a XXX.lib file from Mylibs\usartlib.bas , Mylibs\lcdbaslib.bas let's say Mylibs\uartlcd.lib for later linking with Usart.bas in a second project.

 

So I deleted Usart.bas from the project and switch

 

Settings->Options->Compiler-options from Application to Library.

 

O.K. - Looking at Settings->Target now has changed from PIC16F877A to PIC16.

Seems to be o.k., as I understand ...

 

But now whenI I run a build all pic identifiers like 'trisc' a.s.o. are undefined ..

 

How are the right settings for making a lib.

 

 

Chris

Share this post


Link to post
Share on other sites

Chrisassal,

 

Just want to make a lib in Boostbasic.

 

I tried your example  from PunerjotMangat  ->  Hard-Usart

 

consist of 3 files    Usart.bas ,  Mylibs\usartlib.bas , Mylibs\lcdbaslib.bas

 

compiling and linking at this state/ with the deliverd project file. Works.  - O.K.

 

Now tried to make  a XXX.lib file from   Mylibs\usartlib.bas , Mylibs\lcdbaslib.bas  let's say  Mylibs\uartlcd.lib   for later linking with   Usart.bas in a second project.

 

So I deleted  Usart.bas  from the project and switch 

 

Settings->Options->Compiler-options from  Application to Library.

 

O.K. - Looking  at  Settings->Target now has changed from PIC16F877A  to PIC16.

Seems to be o.k., as I understand ...

 

But now whenI I run a build  all pic  identifiers like 'trisc' a.s.o. are undefined ..

 

How are the right settings for making a lib.

You are doing all the right things.

 

When a file is compiled for a specific target, there is an implied file that contains all the register definitions.

The problem is when making a library its not target specific, so no implied file that contains all the register definitions.

 

You can conisder this as a development environment problem that needs fixing.

Currently the work around would be to add the required definitions to the file you are trying to build as a library.

 

Regards

Dave

Share this post


Link to post
Share on other sites

Thanks Dave for quick answer.

 

Meanwhile I've made the example with some dos/command lines /batches ;-)

 

Now I want to know, if it's possible to mix .obj/.lib from Boostc/Basic in one Project.

 

In other words - are the obj/lib files generated from C/Basic are compatible so the linker can link them to a Hex file.

 

Chris

Share this post


Link to post
Share on other sites
...are the obj/lib files generated from C/Basic are compatible so the linker can link them to a Hex file.

 

Yes BoostC and BoostBasic have compatible obj/lib files that can be mixed. In fact BoostBasic already uses libs.lib that contains system code that was built using BoostC.

 

Regards,

Pavel

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×