User forums > Using Code::Blocks
How can i get CompilerID from compiler name?
Jungle:
I've recently spent much time trying to find out why SetCompilerID() doesn't work. I thought that CompilerID == compiler name, but i was wrong. So the question is: how can i get Compiler ID from compiler name?
Alpha:
--- Code: ---wxString name = wxT("My Example Compiler");
Compiler* comp = CompilerFactory::GetCompilerByName(name);
comp->GetID();
--- End code ---
Jungle:
That is what i get when calling from Wizard script:
--- Quote ---SquirrelFunction<> call failed
AN ERROR HAS OCCURED [the index 'GetCompilerByName' does not exist]
--- End quote ---
And there is no GetCompilerByName function on the "Scripting commands" wiki page.
Alpha:
Sorry, I did not realize you were scripting.
What is it you are trying to achieve? Is it that you have a compiler's name (from somewhere), and are trying to set a build target/project to use that compiler?
Jungle:
Yes, i've created 2 new compiler profiles which i use from project wizard script (without compiler selection page). Of course i've already got compiler id's. But i'm not sure that they will always stay the same.
Navigation
[0] Message Index
[#] Next page
Go to full version