Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5994987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:53:48+00:00 2026-05-22T23:53:48+00:00

First off I should forewarn you that I am a new grad(and EE at

  • 0

First off I should forewarn you that I am a new grad(and EE at that), and not terribly familiar a build process more advanced than my hello world programs.

My issue is: We are attempting to use SCons ton build our project at work. Our compiler is called ‘i686-pc-elf-gcc’ and uses posix style command line arguments. But whenever I try and use scons it forces Windows arguments, so instead of:

i686-pc-elf-gcc -o hello.o -c hello.cpp

I get

i686-pc-elf-gcc /Fohello.obj /c hello.cpp /TP /nologo

Which our compiler doesn’t like.
Here is what my SConscript file looks like

import os

path = ['c:\\compiler\GCC\i686\bin',
    '../../build/include']

env = Environment(ENV = {'PATH' : path,'TEMP' : os.environ['TEMP']})
env.Replace(CC = "i686-pc-elf-gcc")
env['platform'] = 'posix'

env.Program('hello.cpp')

The environment is in a DOS prompt with cygwin installed. I was hoping setting the platform to posix was all that was needed, but I have been beating my head against the wall with no results.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T23:53:48+00:00Added an answer on May 22, 2026 at 11:53 pm

    Looks like the default SCons compiler detection is picking up the Microsoft compiler suite. Instead of:

    env = Environment(ENV = {'PATH' : path,'TEMP' : os.environ['TEMP']})
    

    maybe try:

    env = Environment(tools = ['gcc', 'g++', 'gnulink'],
                      ENV = {'PATH' : path,'TEMP' : os.environ['TEMP']})
    

    This way it will use the gcc toolset instead of the msvc one. If you only overwrite CC then all the flags are still MSVC style, while the compiler is really GNU. So the full SConstruct would be:

    import os
    path = [r'c:\compiler\GCC\i686\bin', '../../build/include']
    env = Environment(tools = ['gcc', 'g++', 'gnulink'],
                      ENV = {'PATH' : path,'TEMP' : os.environ['TEMP']})
    env.Replace(CC = "i686-pc-elf-gcc")
    env.Program('hello.cpp')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First off i am not all that familiar with the OOP side of Javascript
First off I should say that I don't have any experience in working with
First off, I would like to make clear, that I am SUPER NEW TO
First off, I know that this question begs the other question - should the
First off: I know that AES is a block cipher and not a hashing
First off, I'm not asking about how to generate documentation FROM PHP source. That's
First off my understanding is that cin >> std::noskipws >> str; should stick a
First off, let me say that this is not homework (I am an A-Level
First off I would like to say, that I am not trying to hack
First off, I’m not concerned with portability, and can safely assume that the endianness

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.