Open Lenheart357 opened 6 days ago
What's stopping you from compiling squirrel the same was as every other C++ file in your project?
lenheart@lenheart-Virtual-Machine:~/squirrel-master/build9$ /opt/devkitpro/devkitA64/bin/aarch64-none-elf-cmake -DCMAKE_C_COMPILER=/opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc -DCMAKE_CXX_COMPILER=/opt/devkitpro/devkitA64/bin/aarch64-none-elf-g++ -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY -Wno-dev -DISABLE_DYNAMIC=on -SQ_DISABLE_INTERPRETER=on .. -- The C compiler identification is GNU 14.2.0 -- The CXX compiler identification is GNU 14.2.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /opt/devkitpro/devkitA64/bin/aarch64-none-elf-g++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done CMake Error: install(EXPORT "squirrel" ...) includes target "squirrel" more than once in the export set. CMake Error in CMakeLists.txt: given target "squirrel" more than once.
CMake Warning: Manually-specified variables were not used by the project:
ISABLE_DYNAMIC
CMake Generate step failed. Build files cannot be regenerated correctly.
lenheart@lenheart-Virtual-Machine:~/squirrel-master/build9$ make
[ 2%] Building CXX object squirrel/CMakeFiles/squirrel.dir/sqapi.o
[ 4%] Building CXX object squirrel/CMakeFiles/squirrel.dir/sqbaselib.o
[ 6%] Building CXX object squirrel/CMakeFiles/squirrel.dir/sqclass.o
[ 8%] Building CXX object squirrel/CMakeFiles/squirrel.dir/sqcompiler.o
[ 10%] Building CXX object squirrel/CMakeFiles/squirrel.dir/sqdebug.o
[ 12%] Building CXX object squirrel/CMakeFiles/squirrel.dir/sqfuncstate.o
[ 14%] Building CXX object squirrel/CMakeFiles/squirrel.dir/sqlexer.o
[ 16%] Building CXX object squirrel/CMakeFiles/squirrel.dir/sqmem.o
[ 18%] Building CXX object squirrel/CMakeFiles/squirrel.dir/sqobject.o
[ 20%] Building CXX object squirrel/CMakeFiles/squirrel.dir/sqstate.o
[ 22%] Building CXX object squirrel/CMakeFiles/squirrel.dir/sqtable.o
[ 25%] Building CXX object squirrel/CMakeFiles/squirrel.dir/sqvm.o
[ 27%] Linking CXX static library ../lib/libsquirrel.a
[ 27%] Built target squirrel
[ 29%] Building CXX object squirrel/CMakeFiles/squirrel_static.dir/sqapi.o
[ 31%] Building CXX object squirrel/CMakeFiles/squirrel_static.dir/sqbaselib.o
[ 33%] Building CXX object squirrel/CMakeFiles/squirrel_static.dir/sqclass.o
[ 35%] Building CXX object squirrel/CMakeFiles/squirrel_static.dir/sqcompiler.o
[ 37%] Building CXX object squirrel/CMakeFiles/squirrel_static.dir/sqdebug.o
[ 39%] Building CXX object squirrel/CMakeFiles/squirrel_static.dir/sqfuncstate.o
[ 41%] Building CXX object squirrel/CMakeFiles/squirrel_static.dir/sqlexer.o
[ 43%] Building CXX object squirrel/CMakeFiles/squirrel_static.dir/sqmem.o
[ 45%] Building CXX object squirrel/CMakeFiles/squirrel_static.dir/sqobject.o
[ 47%] Building CXX object squirrel/CMakeFiles/squirrel_static.dir/sqstate.o
[ 50%] Building CXX object squirrel/CMakeFiles/squirrel_static.dir/sqtable.o
[ 52%] Building CXX object squirrel/CMakeFiles/squirrel_static.dir/sqvm.o
[ 54%] Linking CXX static library ../lib/libsquirrel_static.a
[ 54%] Built target squirrel_static
[ 56%] Building CXX object sqstdlib/CMakeFiles/sqstdlib.dir/sqstdaux.o
[ 58%] Building CXX object sqstdlib/CMakeFiles/sqstdlib.dir/sqstdblob.o
[ 60%] Building CXX object sqstdlib/CMakeFiles/sqstdlib.dir/sqstdio.o
[ 62%] Building CXX object sqstdlib/CMakeFiles/sqstdlib.dir/sqstdmath.o
[ 64%] Building CXX object sqstdlib/CMakeFiles/sqstdlib.dir/sqstdrex.o
[ 66%] Building CXX object sqstdlib/CMakeFiles/sqstdlib.dir/sqstdstream.o
[ 68%] Building CXX object sqstdlib/CMakeFiles/sqstdlib.dir/sqstdstring.o
[ 70%] Building CXX object sqstdlib/CMakeFiles/sqstdlib.dir/sqstdsystem.o
[ 72%] Linking CXX static library ../lib/libsqstdlib.a
[ 72%] Built target sqstdlib
[ 75%] Building CXX object sqstdlib/CMakeFiles/sqstdlib_static.dir/sqstdaux.o
[ 77%] Building CXX object sqstdlib/CMakeFiles/sqstdlib_static.dir/sqstdblob.o
[ 79%] Building CXX object sqstdlib/CMakeFiles/sqstdlib_static.dir/sqstdio.o
[ 81%] Building CXX object sqstdlib/CMakeFiles/sqstdlib_static.dir/sqstdmath.o
[ 83%] Building CXX object sqstdlib/CMakeFiles/sqstdlib_static.dir/sqstdrex.o
[ 85%] Building CXX object sqstdlib/CMakeFiles/sqstdlib_static.dir/sqstdstream.o
[ 87%] Building CXX object sqstdlib/CMakeFiles/sqstdlib_static.dir/sqstdstring.o
[ 89%] Building CXX object sqstdlib/CMakeFiles/sqstdlib_static.dir/sqstdsystem.o
[ 91%] Linking CXX static library ../lib/libsqstdlib_static.a
[ 91%] Built target sqstdlib_static
[ 93%] Building C object sq/CMakeFiles/sq.dir/sq.o
[ 95%] Linking C executable ../bin/sq.elf
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/14.2.0/../../../../aarch64-none-elf/bin/ld: ../lib/libsquirrel.a(sqclass.o): in function SQInstance::~SQInstance()': /home/lenheart/squirrel-master/squirrel/sqclass.cpp:193:(.text+0x210): undefined reference to
operator delete(void)'
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/14.2.0/../../../../aarch64-none-elf/bin/ld: ../lib/libsquirrel.a(sqclass.o): in function SQClass::~SQClass()': /home/lenheart/squirrel-master/squirrel/sqclass.cpp:51:(.text+0x8c0): undefined reference to
operator delete(void)'
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/14.2.0/../../../../aarch64-none-elf/bin/ld: ../lib/libsquirrel.a(sqclass.o): in function SQTable::~SQTable()': /home/lenheart/squirrel-master/squirrel/sqtable.h:61:(.text._ZN7SQTableD0Ev[_ZN7SQTableD5Ev]+0xec): undefined reference to
operator delete(void)'
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/14.2.0/../../../../aarch64-none-elf/bin/ld: ../lib/libsquirrel.a(sqobject.o): in function SQFunctionProto::~SQFunctionProto()': /home/lenheart/squirrel-master/squirrel/sqobject.cpp:406:(.text+0x67c): undefined reference to
operator delete(void)'
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/14.2.0/../../../../aarch64-none-elf/bin/ld: ../lib/libsquirrel.a(sqobject.o): in function SQClosure::~SQClosure()': /home/lenheart/squirrel-master/squirrel/sqobject.cpp:276:(.text+0xa28): undefined reference to
operator delete(void)'
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/14.2.0/../../../../aarch64-none-elf/bin/ld: ../lib/libsquirrel.a(sqobject.o):/home/lenheart/squirrel-master/squirrel/sqobject.cpp:104: more undefined references to `operator delete(void)' follow
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/14.2.0/../../../../aarch64-none-elf/bin/ld: ../lib/libsquirrel.a(sqvm.o): in function SQVM::ARITH_OP(unsigned long long, SQObjectPtr&, SQObjectPtr const&, SQObjectPtr const&)': /home/lenheart/squirrel-master/squirrel/sqvm.cpp:94:(.text+0x89a8): undefined reference to
fmod'
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/14.2.0/../../../../aarch64-none-elf/bin/ld: /home/lenheart/squirrel-master/squirrel/sqvm.cpp:94:(.text+0x8f0c): undefined reference to fmod' /opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/14.2.0/../../../../aarch64-none-elf/bin/ld: ../lib/libsqstdlib.a(sqstdblob.o): in function
SQBlob::~SQBlob()':
/home/lenheart/squirrel-master/sqstdlib/sqstdblobimpl.h:17:(.text._ZN6SQBlobD0Ev[_ZN6SQBlobD5Ev]+0x34): undefined reference to operator delete(void*)' /opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/14.2.0/../../../../aarch64-none-elf/bin/ld: ../lib/libsqstdlib.a(sqstdio.o): in function
SQFile::~SQFile()':
/home/lenheart/squirrel-master/sqstdlib/sqstdio.cpp:66:(.text._ZN6SQFileD0Ev[_ZN6SQFileD5Ev]+0x38): undefined reference to operator delete(void*)' /opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/14.2.0/../../../../aarch64-none-elf/bin/ld: /home/lenheart/squirrel-master/sqstdlib/sqstdio.cpp:66:(.text._ZN6SQFileD0Ev[_ZN6SQFileD5Ev]+0x4c): undefined reference to
operator delete(void*)'
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/14.2.0/../../../../aarch64-none-elf/bin/ld: ../lib/libsqstdlib.a(sqstdmath.o): in function std::exp(float)': /opt/devkitpro/devkitA64/aarch64-none-elf/include/c++/14.2.0/cmath:220:(.text+0xd0): undefined reference to
expf'
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/14.2.0/../../../../aarch64-none-elf/bin/ld: ../lib/libsqstdlib.a(sqstdmath.o): in function std::pow(float, float)': /opt/devkitpro/devkitA64/aarch64-none-elf/include/c++/14.2.0/cmath:377:(.text+0x194): undefined reference to
powf'
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/14.2.0/../../../../aarch64-none-elf/bin/ld: ../lib/libsqstdlib.a(sqstdmath.o): in function std::atan2(float, float)':/opt/devkitpro/devkitA64/aarch64-none-elf/include/c++/14.2.0/cmath:151:(.text+0x1e0): undefined reference to
atan2f'
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/14.2.0/../../../../aarch64-none-elf/bin/ld: ../lib/libsqstdlib.a(sqstdmath.o): in function std::atan(float)': /opt/devkitpro/devkitA64/aarch64-none-elf/include/c++/14.2.0/cmath:132:(.text+0x220): undefined reference to
atanf'
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/14.2.0/../../../../aarch64-none-elf/bin/ld: ../lib/libsqstdlib.a(sqstdmath.o): in function std::tan(float)': /opt/devkitpro/devkitA64/aarch64-none-elf/include/c++/14.2.0/cmath:462:(.text+0x260): undefined reference to
tanf'
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/14.2.0/../../../../aarch64-none-elf/bin/ld: ../lib/libsqstdlib.a(sqstdmath.o): in function std::log10(float)': /opt/devkitpro/devkitA64/aarch64-none-elf/include/c++/14.2.0/cmath:346:(.text+0x2a0): undefined reference to
log10f'
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/14.2.0/../../../../aarch64-none-elf/bin/ld: ../lib/libsqstdlib.a(sqstdmath.o): in function std::log(float)': /opt/devkitpro/devkitA64/aarch64-none-elf/include/c++/14.2.0/cmath:327:(.text+0x2e0): undefined reference to
logf'
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/14.2.0/../../../../aarch64-none-elf/bin/ld: ../lib/libsqstdlib.a(sqstdmath.o): in function std::acos(float)': /opt/devkitpro/devkitA64/aarch64-none-elf/include/c++/14.2.0/cmath:94:(.text+0x320): undefined reference to
acosf'
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/14.2.0/../../../../aarch64-none-elf/bin/ld: ../lib/libsqstdlib.a(sqstdmath.o): in function std::asin(float)': /opt/devkitpro/devkitA64/aarch64-none-elf/include/c++/14.2.0/cmath:113:(.text+0x360): undefined reference to
asinf'
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/14.2.0/../../../../aarch64-none-elf/bin/ld: ../lib/libsqstdlib.a(sqstdmath.o): in function std::cos(float)': /opt/devkitpro/devkitA64/aarch64-none-elf/include/c++/14.2.0/cmath:182:(.text+0x3a0): undefined reference to
cosf'
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/14.2.0/../../../../aarch64-none-elf/bin/ld: ../lib/libsqstdlib.a(sqstdmath.o): in function std::sin(float)': /opt/devkitpro/devkitA64/aarch64-none-elf/include/c++/14.2.0/cmath:405:(.text+0x3e0): undefined reference to
sinf'
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/14.2.0/../../../../aarch64-none-elf/bin/ld: ../lib/libsqstdlib.a(sqstdmath.o): in function std::sqrt(float)': /opt/devkitpro/devkitA64/aarch64-none-elf/include/c++/14.2.0/cmath:443:(.text+0x428): undefined reference to
sqrtf'
collect2: error: ld returned 1 exit status
make[2]: [sq/CMakeFiles/sq.dir/build.make:100:bin/sq.elf] 错误 1
make[1]: [CMakeFiles/Makefile2:245:sq/CMakeFiles/sq.dir/all] 错误 2
make: *** [Makefile:136:all] 错误 2
I see warnings, and "CMake Generate step failed. Build files cannot be regenerated correctly." Everything after that is irrelevant. Fix your command line. You may need to ask chatgpt for help on how to operate cmake to correctly pass SQ_DISABLE_INTERPRETER and DISABLE_DYNAMIC
I see warnings, and "CMake Generate step failed. Build files cannot be regenerated correctly." Everything after that is irrelevant. Fix your command line. You may need to ask chatgpt for help on how to operate cmake to correctly pass SQ_DISABLE_INTERPRETER and DISABLE_DYNAMIC
I fixed the cmake file and I know that passing parameters requires adding an extra 'D', but the error still persists at the end
I see warnings, and "CMake Generate step failed. Build files cannot be regenerated correctly." Everything after that is irrelevant. Fix your command line. You may need to ask chatgpt for help on how to operate cmake to correctly pass SQ_DISABLE_INTERPRETER and DISABLE_DYNAMIC
I tried to embed squirrel in switch game development, but this requires me to compile squirrel using aarch64 none elf