User forums > Help

why doesn't dynamic library template exist?

(1/2) > >>

ensamblador:
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

MortenMacFly:

--- Quote from: ensamblador on December 27, 2006, 04:02:31 pm ---Where dynamic libraries template is?  :?

--- End quote ---
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.

Game_Ender:
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:
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 ;)

Biplab:

--- Quote from: ensamblador on December 29, 2006, 12:39:28 pm ---Game_Ender, I don't understand what you are saying me, create a new static library template and then modify it? :S

--- End quote ---

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);
--- End code ---

Now change it to -

--- Code: ---target.SetTargetType(ttDynamicLib);
--- End code ---

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.

Navigation

[0] Message Index

[#] Next page

Go to full version