Skip to content

Problem linking with openssl in a recently created axmol project. #2569

@brlebtag

Description

@brlebtag
  • axmol version:

axmol version 2.6.1-038047e

  • devices test on:

11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
RAM 16GB
64 bits
Distributor ID: Ubuntu
Description: Ubuntu 22.04.5 LTS
Release: 22.04
Codename: jammy

  • developing environments
    • cmake version: cmake version 3.22.1

Steps to Reproduce:

I created an empty project and tried to compile using axmol build. I got the following errors:

[ 89%] Built target fairygui
[ 89%] Built target cocostudio
[ 98%] Built target particle3d
[ 98%] Linking CXX executable bin/game1/game1
/usr/bin/ld: /home/bruno.lebtag/Projects/axmol/3rdparty/openssl/_x/lib/linux/libcrypto.a(libcrypto-lib-e_afalg.o): na função "afalg_chk_platform":
e_afalg.c:(.text+0xc83): referência não definida para "__isoc23_strtol"
/usr/bin/ld: /home/bruno.lebtag/Projects/axmol/3rdparty/openssl/_x/lib/linux/libcrypto.a(libdefault-lib-rand_unix.o): na função "wait_random_seeded":
rand_unix.c:(.text+0xe6): referência não definida para "__isoc23_strtol"
/usr/bin/ld: rand_unix.c:(.text+0x214): referência não definida para "__isoc23_strtol"
collect2: error: ld returned 1 exit status
gmake[3]: *** [CMakeFiles/game1.dir/build.make:182: bin/game1/game1] Erro 1
gmake[2]: *** [CMakeFiles/Makefile2:1287: CMakeFiles/game1.dir/all] Erro 2
gmake[1]: *** [CMakeFiles/Makefile2:1294: CMakeFiles/game1.dir/rule] Erro 2
gmake: *** [Makefile:189: game1] Erro 2
build.ps1: /home/bruno.lebtag/Projects/axmol/tools/cmdline/axmol.ps1:91
Line |
  91 |          . $build_script @sub_args
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~
     | Build fail, ret=2

My OS is in portuguese but it says undefined reference to __isoc23_strtol.

For the record, It's my first time using axmol. I tried a couple of ideas to fix it like adding add_definitions(-D__STDC_WANT_IEC_60559_BFP_EXT__) to CMakeLists.txt but no success.

Any help would be appreciated!

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions