Author Topic: BOUNTY: bakefile - Output: C::B Project Files  (Read 33426 times)

Offline ABX

  • Single posting newcomer
  • *
  • Posts: 9
Re: BOUNTY: bakefile - Output: C::B Project Files
« Reply #15 on: September 21, 2005, 07:11:06 pm »
2) I guess you probably missed this tag? (<FileVersion major="1" minor="1"/>)

Yes. I missed that. Thanks!

7) Target names are free text, whatever describes them better. In MSVC terms, an example target could be named "Win32 | Release"

That raises the question about handling of different platforms withing one development. Would you prefer to have separate projects for wxWidgets collected as targets of single project of separated projects within common workspace or just separated workspaces. I mean would you prefer:

Workspace: wxWidgets
+ project: wxWidgets
++ target: wxMSW Debug
++ target: wxMSW Release
++ target: wxGTK Debug
++ target: wxGTK Release

or

Workspace: wxWidgets
+ project: wxMSW
++ target: Debug
++ target: Release
+ project: wxGTK
++ target: Debug
++ target: Release

or

Workspace: wxWidgets-wxMSW
+ project: wxMSW
++ target: Debug
++ target: Release
Workspace: wxWidgets-wxGTK
+ project: wxGTK
++ target: Debug
++ target: Release

Note that there is another level of complexity between port name and build type which is multilib/monolithic idea of wxWidgets.

To understand the syntax and concepts better I will start from wxMSW which is my own native platform but I need to think about the future extension according to your needs.

If you want to have a more in-depth look at the ...

Thanks!

ABX

Offline ABX

  • Single posting newcomer
  • *
  • Posts: 9
Re: BOUNTY: bakefile - Output: C::B Project Files
« Reply #16 on: September 30, 2005, 03:32:34 pm »
Code: [Select]
<Add directory="\usr\X11R6\lib"/>
</Linker>
<Environment> <!-- environment variables for target -->
<Variable name="GM" value="/home/mandrav/Devel/GameMonkey/gm"/>

Looking at quoted part I'm not sure what is directory separator? \ or / ? BTW: I have 'codeblocks' format quite advanced already.

ABX

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: BOUNTY: bakefile - Output: C::B Project Files
« Reply #17 on: September 30, 2005, 04:02:11 pm »
Code: [Select]
<Add directory="\usr\X11R6\lib"/>
</Linker>
<Environment> <!-- environment variables for target -->
<Variable name="GM" value="/home/mandrav/Devel/GameMonkey/gm"/>

Looking at quoted part I'm not sure what is directory separator? \ or / ?

Whichever. Code::Blocks converts it to the system default, on load ;)
[*EDIT*]
It doesn't convert the env. vars contents though because it doesn't know if it's a path or not...
[/*EDIT*]

BTW: I have 'codeblocks' format quite advanced already.

That's nice to hear :D
« Last Edit: September 30, 2005, 04:04:08 pm by mandrav »
Be patient!
This bug will be fixed soon...

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: BOUNTY: bakefile - Output: C::B Project Files
« Reply #18 on: September 30, 2005, 08:42:12 pm »
Great! :D

Offline ABX

  • Single posting newcomer
  • *
  • Posts: 9
Re: BOUNTY: bakefile - Output: C::B Project Files
« Reply #19 on: October 04, 2005, 12:21:20 am »
BTW: I have 'codeblocks' format quite advanced already.

That's nice to hear :D

Question about flags:

bakefile has concept of 4 groups of flags: C flags, CPP flags, C++ flags, linker flags and these flags are specified per project (no possibility now for flags per source). From the example given in this thread I don't see how in <Compiler> I can split C vs. CPP vs. C++. Currently I decided that <Compile><Add option="..."> will serve for CPP flags, while C and C++ will be added into every unit depending on 'compilerVar' value. Also don't see how to add linker flags (no example syntax). Any hint would be appreciated. Thanks in advance.

ABX

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: BOUNTY: bakefile - Output: C::B Project Files
« Reply #20 on: October 04, 2005, 01:23:36 am »
I think that solution is ok for now, using <Option compilerVar="CC"/> or <Option compilerVar="CPP"/> at Project/Unit/Target level when corresponding.

And for separating Compiler/Linker flags, it is currently implemented at Project/Unit/Target level (take a look at the CodeBlocks-wx2.6.0.cbp itself), for example at Target level:

<Target title="sdk">
    <Option output="devel\codeblocks.dll"/>
    <Option working_dir="devel"/>
    <Option object_output=".objs\2.6"/>
    <Option deps_output=".deps"/>
    <Option external_deps="sdk\tinyxml\libtxml.a;"/>
    <Option type="3"/>
    <Option compiler="0"/>
    <Option parameters="--debug-log --no-check-associations"/>
    <Option createStaticLib="1"/>
    <Option projectLinkerOptionsRelation="2"/>
    <Compiler>
        <Add option="-DEXPORT_LIB"/>
        <Add option="-DEXPORT_EVENTS"/>
        <Add option="-D_USRDLL"/>

    </Compiler>
    <Linker>
        <Add option="-Wl,--enable-auto-image-base"/>
        <Add option="-Wl,--export-all-symbols"/>
        <Add option="-Wl,--add-stdcall-alias"/>

        <Add library="libtxml.a"/>
        <Add library="libwxscintilla.a"/>
        <Add directory="devel"/>
    </Linker>
</Target>

for compiler and linker flags.

Hope that helps :)

PD: What's the difference between CPP and C++ flags?
« Last Edit: October 04, 2005, 01:47:12 am by takeshimiya »

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: BOUNTY: bakefile - Output: C::B Project Files
« Reply #21 on: October 04, 2005, 08:41:43 am »
Quote
PD: What's the difference between CPP and C++ flags?

C PreProcessor flags
vs
C++ compiler flags
although it is seldom followed (people usually put CPP flags in C++ (CXX) flags)...
Be patient!
This bug will be fixed soon...

Offline ABX

  • Single posting newcomer
  • *
  • Posts: 9
Re: BOUNTY: bakefile - Output: C::B Project Files
« Reply #22 on: October 04, 2005, 10:04:04 am »
PD: What's the difference between CPP and C++ flags?

In short CPP is common to C and C++. See comments in any wxW/build/msw/config.*

Thanks for the answer!

ABX

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: BOUNTY: bakefile - Output: C::B Project Files
« Reply #23 on: October 04, 2005, 09:18:44 pm »
Is using the name "CPP" for preprocessor a good idea? Last time I checked, CPP used to mean "C Plus Plus" (confused)

Offline ABX

  • Single posting newcomer
  • *
  • Posts: 9
Re: BOUNTY: bakefile - Output: C::B Project Files
« Reply #24 on: October 04, 2005, 09:39:14 pm »
Is using the name "CPP" for preprocessor a good idea? Last time I checked, CPP used to mean "C Plus Plus" (confused)

I'm not sure I understand your questions. Do you mean/think we (bakefile) invented it? AFAIK this is widely used split, see how many sites refer to them in http://www.google.com/search?q=cppflags+cxxflags

ABX

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: BOUNTY: bakefile - Output: C::B Project Files
« Reply #25 on: October 04, 2005, 11:47:32 pm »
Oh, OK. Thanks.

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: BOUNTY: bakefile - Output: C::B Project Files
« Reply #26 on: October 05, 2005, 02:02:30 am »
Yeah, I supposed that the PP mean for PreProcessor.

Probably most people use them in C/C++ flags because most compilers include a preprocessor in the same executable I think.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: BOUNTY: bakefile - Output: C::B Project Files
« Reply #27 on: October 05, 2005, 08:51:22 am »
Right. But the reason it's provided as a separate variable, is what ABX said for: to allow for common options for C and C++ files (assuming you 're mixing them).
Be patient!
This bug will be fixed soon...

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: BOUNTY: bakefile - Output: C::B Project Files
« Reply #28 on: January 09, 2006, 10:38:35 am »
Is this little project still in progres? I can't find any source in the cvs...
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

Offline ABX

  • Single posting newcomer
  • *
  • Posts: 9
Re: BOUNTY: bakefile - Output: C::B Project Files
« Reply #29 on: January 09, 2006, 10:43:42 am »
Is this little project still in progres?

Yes. Had to delay it due to private issues but have plan to complete it. Thanks for interest!

ABX