Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - How to specify GCC version in make file: (3 Items)
   
How to specify GCC version in make file  
Hi,

I am building a C++ application using GCC and am trying to create a make file.
On my QNX system there are two versions of the compiler 2.95.3 and 3.3.5.

When I do a gcc -dumpversion I always get 2.95.3 as the compiler version.

How do I specify in my make file that the GCC compiler to  use should be 3.3.5?

Regards,
Lakshmi.
Re: How to specify GCC version in make file  
If you're using QNX mkfiles project, they are set up to use a GCC_VERSION macro.

e.g

make GCC_VERSION=3.3.5

If you're using a standard makefile project:

CC=ntox86-g++-3.3.5

helloworld: hw.cc 
    ${CC} hw.cc


Regards,

Ryan Mansfield
Re: How to specify GCC version in make file  
> If you're using QNX mkfiles project, they are set up to use a GCC_VERSION 
> macro.
> 
> e.g
> 
> make GCC_VERSION=3.3.5
> 
> If you're using a standard makefile project:
> 
> CC=ntox86-g++-3.3.5
> 
> helloworld: hw.cc 
>     ${CC} hw.cc
> 
> 
> Regards,
> 
> Ryan Mansfield


Hi Ryan,

Thanks for the inputs, now its work fine.

Regards,
Lakshmi.