Author Topic: Set to ANSI C standard?  (Read 13323 times)

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Solved: Set to ANSI C standard?
« Reply #15 on: February 05, 2015, 10:52:53 am »
2 compilers but in 2 different environments. (At least I think this is the best option for me right now if I want to use CB but also want to make sure compiling on my Prof's machine goes as expected)

This is exactly what we where talking about. It can be dangerous and lead to errors if you use two (one of them old) mingw compiler on the same system, because there are hard coded paths in it, and so it is possible that the old compiler takes headers/libraries from the new compiler. This will lead to errors...
If you are using two environments (by environment i mean two virtual machines, or two pc, not two different IDE  on the same windows installation) then this is no problem. But on the same machine this !can! lead to errors (i say it "can" not it "must" because i don't know exactly)

greetings

Offline drewvoros

  • Single posting newcomer
  • *
  • Posts: 9
Re: Solved: Set to ANSI C standard?
« Reply #16 on: February 05, 2015, 04:02:14 pm »
Hi BlueHazzard,

In your previous post when you mentioned keep PATH in sync with the compiler and delete the other compiler from the PATH variable, I'm sorry but I don't know what you mean.

Are you saying if both the CB w/ GNU GCC and the other IDE (called C-free) w/ mingw2.95 are both installed in the same c:\ drive i may have issues? By PATH do you mean same drive and same folder. They are both on the c:\ drive right now.

Would installing CB w/ GNU GCC on c:\ and the c-free w/ mingw2.95 on example d:\ drive solve this potential issue?

Also are you saying even though they are different compilers, mingw may still take headers/libraries from the GNU GCC compiler. Again both are located on c:\ drive now but in separate folders I believe.

Just a bit confused at what to do.
« Last Edit: February 05, 2015, 04:04:05 pm by drewvoros »

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Set to ANSI C standard?
« Reply #17 on: February 05, 2015, 05:29:05 pm »
Well I would switch my professor if I were you. ;) If that's not an option, see what C standard mingw 2.95 complies to and set the compiler you are using with cb to that standard and use cb only. If you are going to compile introductory code, it will possibly work with 2.95 but no one can guarantee that. And be aware that this topic is starting to go against the forum rules. You should consider consulting a programming forum for these kind of questions.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Set to ANSI C standard?
« Reply #18 on: February 05, 2015, 05:30:27 pm »
By PATH i mean this: https://en.wikipedia.org/wiki/PATH_%28variable%29

And do not install any of these compilers in "\MinGW" on any disk, at  least not if you want/need to install multiple versions on one system.

You can try it. And if it works good, if not, i would investigate future and ask again

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Set to ANSI C standard?
« Reply #19 on: February 05, 2015, 10:01:37 pm »
Why not use gcc 2.95 with Code::Blocks.
If no compiler is installed on any disk in the "\mingw"-folder it should/could work.
Make a copy of the default gcc, name it like you want and change the toolchain-path, so it points to gcc 2.95. Yo might not be able to use all options, but it could work.

Offline drewvoros

  • Single posting newcomer
  • *
  • Posts: 9
Re: Set to ANSI C standard?
« Reply #20 on: February 09, 2015, 11:52:30 am »
Thanks for the help everyone.

Scarphin, BlueHazzard, Jens thanks for your final input. Will take all into consideration and see what works best for me. Wish I understood compilers as well as some of you. It's all a bit confusing but as long as I'm able to get my assignments compiled and working with a few of the class exercises as expected then I think I will be set.

You all have been great help.