linker could not found object files from different directory with scons
问题 Currently, I make a project with scons. I compiled source codes and it is time to link them. However, I got an error that ld cannot find object files. The SConscript is located in src/kernel32, and import os, sys # Compile CPP env_gpp_options = { 'CXX' : 'x86_64-pc-linux-g++', 'CXXFLAGS' : '-std=c++11 -g -m32 -ffreestanding -fno-exceptions -fno-rtti', 'LINK' : 'x86_64-pc-linux-ld', 'LINKFLAGS' : '-melf_i386 -T scripts/elf_i386.x -nostdlib -e main -Ttext 0x10200', } env_gpp = Environment(**env