User forums > Using Code::Blocks

CodeBlocks and contrib projects for MacOSX 10.4

<< < (2/4) > >>

takeshimiya:

--- Quote from: bnilsson on November 03, 2006, 11:10:48 pm ---1) libwxscintilla apparently needs to be a .dylib, automatic extension makes it a .so, and this does not link. I did not see auto prefix do anything at all.

--- End quote ---
well then c::b needs a little fix, on Mac autoextension should change it to .dylib, not .so


--- Quote from: bnilsson on November 03, 2006, 11:10:48 pm ---2) removing `wx-config -libs`from "sdk" and "src" targets caused link errors against wx.

--- End quote ---
there's probably a linker-order error, I was talking about plugins anyways; let's take an example, codesnippets plugin:

there's this in the Target:

--- Code: (xml) ---<Linker>
<Add option="`wx-config --libs`" />
<Add directory="../../../devel" />
</Linker>

--- End code ---

and you added this in the Project:

--- Code: (xml) ---<Linker>
<Add option="`wx-config --libs`" />
<Add option="-bundle" />
<Add library="libcodeblocks" />
<Add library="libwxscintilla" />
</Linker>

--- End code ---

so the suggestion is to merge all in the Project for example:

--- Code: (xml) ---<Linker>
<Add option="`wx-config --libs`" />
<Add directory="../../../devel" />
<Add option="-bundle" />
<Add library="codeblocks" />
<Add library="wxscintilla" />
</Linker>

--- End code ---

well that's it,

here comes the interesting part, build scripts:
http://wiki.codeblocks.org/index.php?title=Build_scripts

if you can create build scripts instead of new -mac.cbp's it would be a lot nicer,
something like this in the above case:

--- Code: (cpp) ---function SetBuildOptions(base)
{
    // no PLATFORM_MAC for now, btw the logic in sdk/scripting/bindings/sc_consts.cpp
    // is wrong because there is gtk for mac =P
    if (PLATFORM == PLATFORM_UNKNOWN)
    {
        base.AddLinkerOption(_T("-bundle"));
        base.AddLinkLib(_T("codeblocks"));
        base.AddLinkLib(_T("wxscintilla"));
    }
}

function UnsetBuildOptions(base)
{
    if (PLATFORM == PLATFORM_UNKNOWN)
    {
        base.RemoveLinkerOption(_T("-bundle"));
        base.RemoveLinkLib(_T("codeblocks"));
        base.RemoveLinkLib(_T("wxscintilla"));
    }
}

--- End code ---

sethjackson:

--- Quote from: takeshi miya on November 04, 2006, 12:20:37 am ---here comes the interesting part, build scripts:
http://wiki.codeblocks.org/index.php?title=Build_scripts

if you can create build scripts instead of new -mac.cbp's it would be a lot nicer,
something like this in the above case:

--- Code: (cpp) ---function SetBuildOptions(base)
{
    // no PLATFORM_MAC for now, btw the logic in sdk/scripting/bindings/sc_consts.cpp
    // is wrong because there is gtk for mac =P
    if (PLATFORM == PLATFORM_UNKNOWN)
    {
        base.AddLinkerOption(_T("-bundle"));
        base.AddLinkLib(_T("codeblocks"));
        base.AddLinkLib(_T("wxscintilla"));
    }
}

function UnsetBuildOptions(base)
{
    if (PLATFORM == PLATFORM_UNKNOWN)
    {
        base.RemoveLinkerOption(_T("-bundle"));
        base.RemoveLinkLib(_T("codeblocks"));
        base.RemoveLinkLib(_T("wxscintilla"));
    }
}

--- End code ---


--- End quote ---

I agree.

afb:

--- Quote from: bnilsson on November 04, 2006, 08:25:48 am ---What came as a surprise to me was that the frontpage buttons and icons (New project, Open project, Recent projects, etc.) was working instantly on CodeBlocks built by the CodeBlocks-mac104.cbp, while these functions are not working (at least for me) when building CB from command line.

--- End quote ---

Interesting, I can see if I can isolate what the bug fix for wxMac turned out to be then...

I've fixed the issues with opening files and with locating the prefix, so will commit those.

afb:
FYI: Info.plist for the application will be probably done as codeblocks.plist, generated automatically from codeblocks.plist.in with the current SVN revision, and with support for all of the file types (incl. icons)

See:
http://www.algonet.se/~afb/wx/codeblocks.plist
http://www.algonet.se/~afb/wx/icons48.zip

afb:
Also, with autotools wxscintilla is statically linked (libwxscintilla.a)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version