Link to home
Start Free TrialLog in
Avatar of naseeam
naseeamFlag for United States of America

asked on

Why my code (program) build with old compiler?

My computer is running Windows 10 Pro, 64-bit.  My C language files or my code (program) are stored in the hard disk.  

The old and new version of WindRiver Diab Compiler are stored in Linux Server?

My bash profile used to contain path to old compiler.  To compile, I ran Winscp to access Linux Server.  Then, I dragged my C language project to Linux Server.  I opened the command window from Winscp and invoked make program to build my executables.  This all worked fine.

To build with new compiler, I changed path in my bash profile but my code (program) is still getting build with old compiler.  The generated .map file shows path to old compiler.

My bash profile is stored in my windows desktop.  Does Winscp read bash profile when it is invoked?  How does it know to read bash profile from desktop?  Why is my program not getting built with new compiler?
Avatar of gheist
gheist
Flag of Belgium image

bash profile is run when you log in
probably best is to make start script per build, one for each compiler much like vcvarsall.bat
Avatar of naseeam

ASKER

I don't know what kind of batch file is vcvarsall.bat.

I just need to build with the old compiler.  From Winscp main menu, I went to Session -  Disconnect.  Then, I logged in but still program was built with old compiler?

How can I be sure path to compiler was exported to Linux server?
Avatar of naseeam

ASKER

I mean I need build my program with new compiler.
Avatar of sarabande
invoked make program to build my executables
are you using a makefile? if yes post it.

if not check environment variables used by the build (make) they probably point to the old folders and the old compiler.

Sara
Avatar of naseeam

ASKER

Since it's company makefile, I can't post it.

Few lines from makefile are as follows:
COMPILER= -D __DCC__

WRV_CMP = C:\WindRiver\diab\5.9.4.8\include\diab

Macro WRV_CMP isn't being used.  Macro COMPILER is being used.   I think symbol __DCC__ applies to both versions of Windriver Diab Compiler.

How can I be sure the path to new compiler specified in bash profile got exported to Linux Server?
Just make another user with another bash profile for another compiler.
Avatar of naseeam

ASKER

I made another bash profile for another compiler but I don't think I have access to  make another user.  Currently, I don't have admin rights on my computer.  Our IT Department controls creating users.
Macro WRV_CMP isn't being used
macros can be used by other macros indirectly or can be hidden in the common compiler settings. with your bash profile you can overrule the defaults. ask someone with administrator rights what you have to do such that the newer compiler was used.

Sara
Avatar of naseeam

ASKER

I removed bash profile files for old and new compiler from my computer.  My code(program) still builds with old compiler.  

WinSCP or Linux OS seems to have bash profile information?  How to remove bash profile  information from WinSCP so bash profile file will be read before build starts.
ASKER CERTIFIED SOLUTION
Avatar of Member_2_276102
Member_2_276102

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial