Author Topic: User Compiler problems  (Read 3284 times)

Offline fackue

  • Multiple posting newcomer
  • *
  • Posts: 10
User Compiler problems
« on: September 03, 2007, 10:17:50 am »
Hi everyone,

I'm using Code::Blocks 1.0 RC2 (mainly for it's less-than-complex template support) and it seems like everything I've tried Code::Blocks doesn't allow more than one user-defined compiler. Is this normal? After I manually add a compiler straight to the registry and try copying the "internal" GCC compiler profile, renaming it and fixing everything else like the folders and programs it disappears after I reopen Code::Blocks from the compiler list but the compiler I manually added stays.

I wrote a program in Visual Basic that imports hard-coded compiler settings, this is how I "manually" added the first compiler. The program checks for already existing user-defined compilers and adds the hard-coded compiler to the next available compiler ID starting from 256. So if there's a ID with 256 and has a non-empty "_name" value then I go to ID 257 and keep checking until "_name" is empty. But I'm having problems with the compiler staying if there's already a user-defined compiler after Code::Blocks is opened. Does the "_parent" value under the compiler's ID in the registry need to be changed to anything other than a value of 1 if the compiler ID is > 256? How does this get used?

I've done numerous searches trying to figure out if "_parent" had anything to do with the compilers not staying but it wouldn't explain why after I "manually" add a compiler profile then copy the internal GCC profile and reopen Code::Blocks the copied compiler does not stay. The following post:

http://forums.codeblocks.org/index.php/topic,1707.msg12631.html#msg12631

gets into how Code::Blocks 1.0 RC2 uses compiler IDs and numbers, which I understand, but nothing about what values the "_parent" DWORD take.

Thanks for your time :x

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: User Compiler problems
« Reply #1 on: September 03, 2007, 10:20:23 am »
please use a nightly build !! RC2 is almost 2 years old and completely outdated. Especially compiler support has changed a lot.

Offline fackue

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: User Compiler problems
« Reply #2 on: September 03, 2007, 10:22:46 am »
But isn't the template support for the nightly builds fairly complex? I think I remember it needing C\C++ knowledge...?

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: User Compiler problems
« Reply #3 on: September 03, 2007, 11:03:00 am »
But isn't the template support for the nightly builds fairly complex?
You see, all this registry hacking was so complex that nobody really understood what went where, and it never really worked reliably either. Therefore we said "fackue" at some point and threw all that stuff overboard.

The present system does not store anything in the registry at all any more, instead the settings are in a config file. The actual build system has undergone some changes too, but it is basically still the same. Besides, most serious compilers that exist are supported more or less out of the box already, so chances are good that you don't need to do a lot of "custom" stuff. If anything, you may need to adjust 2-3 variables, unless what you want to do is very, very, very exotic.

"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."