Author Topic: why doesn't dynamic library template exist?  (Read 5195 times)

ensamblador

  • Guest
why doesn't dynamic library template exist?
« on: December 27, 2006, 04:02:31 pm »
Hi

I have installed package CB_20061220_rev3407_Ubuntu6_10.deb in ubuntu edgy. When I want to start a new project there isn't any template to build dynamic libraries, only static libraries. Where dynamic libraries template is?  :?

Thanks

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: why doesn't dynamic library template exist?
« Reply #1 on: December 28, 2006, 02:56:34 pm »
Where dynamic libraries template is?  :?
Dynamic Link Libraries are currently Win32 only. (And in fact there are no DLL's under Linux.) The reason is simple: I hardly have access to a linux box to make it linux "compatible". In fact: There should be created an additional wizard for Linux as DLL's are fairly different to the shared libraries concept under linux (e.g. the example code wouldn't work at all).
So either you create a linux "SO" wizard based on the DLL wizard or you provide me with a minimal example code for such on linux and help me testing... ;-)
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: why doesn't dynamic library template exist?
« Reply #2 on: December 29, 2006, 08:57:05 am »
There is no need for a template because in Unix shared libraries are simpler to create than in windows.  Just create the static library template, and then change the executable type (The part that says, 'GUI Program', 'Console Program', etc) to 'Dynamic Library' then you are set.

ensamblador

  • Guest
Re: why doesn't dynamic library template exist?
« Reply #3 on: December 29, 2006, 12:39:28 pm »
Excuse me Morten, I wanted to say shared libraries, not dynamic libraries  :oops:

Game_Ender, I don't understand what you are saying me, create a new static library template and then modify it? :S

Thanks ;)

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: why doesn't dynamic library template exist?
« Reply #4 on: December 29, 2006, 01:45:20 pm »
Game_Ender, I don't understand what you are saying me, create a new static library template and then modify it? :S

He wants to say that open the file <Code::Blocks Dir>\share\CodeBlocks\templates\wizard\staticlib\wizard.script in Notepad++ (My favourite) or Notepad. Then goto line no 66.
Code
target.SetTargetType(ttStaticLib);

Now change it to -
Code
target.SetTargetType(ttDynamicLib);

That's it!

But I don't know whether the sample code will work or not.  :D

If that works then you can create a new wizard very easily by some Copy-Paste of few files and Adding few lines of code.
« Last Edit: December 29, 2006, 08:00:34 pm by Biplab »
Be a part of the solution, not a part of the problem.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: why doesn't dynamic library template exist?
« Reply #5 on: December 29, 2006, 03:13:01 pm »
If that works then you can create a new wizard very easily by some Copy-Paste of few files and Adding few lines of code.
That's exactly what I meant. Except that C::B surely supports to edit *.script files inside C::B itself. No need for another Editor... ;-)
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

ensamblador

  • Guest
Re: why doesn't dynamic library template exist?
« Reply #6 on: December 29, 2006, 04:49:08 pm »
Ok, anyway, if someone could create and exampled wizard and post here I would be very grateful.

Thanks for the aid, this is a great forum. ;)

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: why doesn't dynamic library template exist?
« Reply #7 on: December 29, 2006, 07:39:18 pm »
I should of been more specific.   Just go into the target properties dialog and change the 'static library' to 'dynamic/shared library'.  No need to hack the scripts, but if want a whole new template instead of just a working project that will work as well.