Skip to content

Cannot build using gcc on windows. #4350

Answered by mwichmann
amine-aboufirass asked this question in Q&A
Discussion options

You must be logged in to vote

The two questions: (1) you don't need admin, (2) while it's trying to use the command gcc, SCons hasn't been initialized for building with gcc.

Turns out on Windows, which defaults to using msvc, it's not enough to just set CC to gcc. You actually have to run the correct "tool" to get the steup right - as @loonycyborg just said while I was typing. Try this line (tools, not toolset, btw):

env = Environment(tools=["mingw"], CCFLAGS="-DENGLISH", ENV={ "PATH" : os.environ["PATH"]})

Not really sure how you've ended up in a place where it's trying to write in C:\windows\:, which should fail. Maybe check your setting of TEMP?

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@amine-aboufirass
Comment options

@loonycyborg
Comment options

Comment options

You must be logged in to vote
1 reply
@amine-aboufirass
Comment options

Answer selected by amine-aboufirass
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants