Author Topic: Compiler API  (Read 4184 times)

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Compiler API
« on: May 31, 2014, 12:14:39 am »
Hi,
i would like to add some compiler api to the squirrel binding, but i don't have the time to get through all the compiler specific code, and so i hope to find some hints here in the forum. As far as i can tell, the whole compiler code is exported to the plugins. I can get the compilers from the compiler factory, but the plugins aren't derived from the compiler class or am i missing something? Also the compiler base class has no virtual function like "compile" or similar.

So has someone a overview over the compiler api or does someone know a easy function to call and let a target compile ;)

greetings

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Compiler API
« Reply #1 on: May 31, 2014, 01:04:49 am »
I would guess it would be in the project code.

Edit: My best  guess is projectbuildtarget.h; but, I am feeling rotten today; so, might be way off.

Tim S.
« Last Edit: May 31, 2014, 01:13:04 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Compiler API
« Reply #2 on: May 31, 2014, 11:13:12 am »
It seems that the whole compiler code is outsourced to the plugin, without some api in the sdk. Is this a good idea? I mean, it would be nice if the compiler base class could have the Build Rebuild etc. virtual function or? Can the developer of this code give some hints of his thoughts?

greetings

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Compiler API
« Reply #3 on: May 31, 2014, 08:30:57 pm »
If you get access to a pointer/reference to cbCompilerPlugin object you should be able to start build/run/rebuild/clean/etc as far as I can see.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]