PIC32 C++ Compiler

Discussion in 'Embedded Systems and Microcontrollers' started by chrisw1990, Jan 4, 2014.

  1. chrisw1990

    Thread Starter Active Member

    Oct 22, 2011
    543
    41
    Hi, this will be short..
    I was unsure whether the XC++ compiler will compile a hybrid of C and C++ code?
    I am using a lot of I2C and figured i could write an I2C class that would be much simpler than writing each individual library for each i2c peripheral.
    but considering the majority of my code would be in C, i wanted to make sure that it would be compatible..
    Cheers Guys
     
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    I think all Microchip compilers are free to download, with 30 or 60 days to play with in full mode. After that they take away most of the code optimization. But the compiler will still work
     
  3. chrisw1990

    Thread Starter Active Member

    Oct 22, 2011
    543
    41
    they have 60 days, but i mean the actual compiler language.. if i wrote a c++ library and used it in c code, would it be even vaguely compatible?
     
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,388
    1,605
    It is doubtful they would be compatible.
     
    chrisw1990 likes this.
  5. chrisw1990

    Thread Starter Active Member

    Oct 22, 2011
    543
    41
    I agree.. following a thought i had i decided to widen my search from pic compiler to global compilers, seems a C++ library can be ported/modified to add C support, but it seems like a lot of extra hassle for an attempt at simplicity..
    i could always write entirely in c++, but theres something about C and pic32 i find quite easy to understand..
     
Loading...