January 22, 2019, 06:06:47 PM

Author Topic: Building for the Switch with devkitpro  (Read 414 times)

Offline Taorn

  • Jr. Member
  • **
  • Posts: 1
Building for the Switch with devkitpro
« on: January 06, 2019, 01:29:48 PM »
Hello,

with BlitzMax getting Switch support, I attempted to build a very simple example project.
I have the newest version of devkitpro for Switch installed and confirmed that it is building projects just fine.
Unfortunally I can't really build my project, as it's failing when the elf file is being linked.
I've tried to build on Ubuntu and on Windows 10 with the same result.
The building log looks like this:

Code: [Select]
Building hello-world
[ 97%] Processing:hello-world.bmx
[ 98%] Compiling:hello-world.bmx.gui.release.nx.arm64.c
[100%] Linking:hello-world.elf
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/brl.mod/timerdefault.mod/timerdefault.release.nx.arm64.a(timerdefault.bmx.release.nx.arm64.o): in function `_brl_timerdefault_TDefaultTimer_Stop':
timerdefault.bmx.release.nx.arm64.c:(.text._brl_timerdefault_TDefaultTimer_Stop+0x2c): undefined reference to `bbTimerStop'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/brl.mod/timerdefault.mod/timerdefault.release.nx.arm64.a(timerdefault.bmx.release.nx.arm64.o): in function `brl_timerdefault_TDefaultTimer_Create_TTTimer_fTTEvent':
timerdefault.bmx.release.nx.arm64.c:(.text.brl_timerdefault_TDefaultTimer_Create_TTTimer_fTTEvent+0x40): undefined reference to `bbTimerStart'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/freeprocess.mod/freeprocess.release.nx.arm64.a(freeprocess.bmx.release.nx.arm64.o): in function `_pub_freeprocess_TProcess_Status':
freeprocess.bmx.release.nx.arm64.c:(.text._pub_freeprocess_TProcess_Status+0x24): undefined reference to `fdProcessStatus'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/freeprocess.mod/freeprocess.release.nx.arm64.a(freeprocess.bmx.release.nx.arm64.o): in function `_pub_freeprocess_TProcess_Terminate':
freeprocess.bmx.release.nx.arm64.c:(.text._pub_freeprocess_TProcess_Terminate+0x24): undefined reference to `fdTerminateProcess'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/freeprocess.mod/freeprocess.release.nx.arm64.a(freeprocess.bmx.release.nx.arm64.o): in function `_pub_freeprocess_TPipeStream_Close':
freeprocess.bmx.release.nx.arm64.c:(.text._pub_freeprocess_TPipeStream_Close+0x2c): undefined reference to `fdClose'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: freeprocess.bmx.release.nx.arm64.c:(.text._pub_freeprocess_TPipeStream_Close+0x3c): undefined reference to `fdClose'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/freeprocess.mod/freeprocess.release.nx.arm64.a(freeprocess.bmx.release.nx.arm64.o): in function `_pub_freeprocess_TPipeStream_Read_pbl':
freeprocess.bmx.release.nx.arm64.c:(.text._pub_freeprocess_TPipeStream_Read_pbl+0x4): undefined reference to `fdRead'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/freeprocess.mod/freeprocess.release.nx.arm64.a(freeprocess.bmx.release.nx.arm64.o): in function `_pub_freeprocess_TPipeStream_Write_pbl':
freeprocess.bmx.release.nx.arm64.c:(.text._pub_freeprocess_TPipeStream_Write_pbl+0x4): undefined reference to `fdWrite'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/freeprocess.mod/freeprocess.release.nx.arm64.a(freeprocess.bmx.release.nx.arm64.o): in function `_pub_freeprocess_TPipeStream_Flush':
freeprocess.bmx.release.nx.arm64.c:(.text._pub_freeprocess_TPipeStream_Flush+0x4): undefined reference to `fdFlush'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/freeprocess.mod/freeprocess.release.nx.arm64.a(freeprocess.bmx.release.nx.arm64.o): in function `_pub_freeprocess_TPipeStream_ReadAvail':
freeprocess.bmx.release.nx.arm64.c:(.text._pub_freeprocess_TPipeStream_ReadAvail+0x4): undefined reference to `fdAvail'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/freeprocess.mod/freeprocess.release.nx.arm64.a(freeprocess.bmx.release.nx.arm64.o): in function `pub_freeprocess_TProcess_Create_TTProcess_Si':
freeprocess.bmx.release.nx.arm64.c:(.text.pub_freeprocess_TProcess_Create_TTProcess_Si+0x70): undefined reference to `fdProcess'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/libpng.mod/libpng.release.nx.arm64.a(pngrutil.c.release.nx.arm64.o): in function `png_read_filter_row':
pngrutil.c:(.text.png_read_filter_row+0xb8): undefined reference to `png_init_filter_functions_neon'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/freejoy.mod/freejoy.release.nx.arm64.a(freejoy.bmx.release.nx.arm64.o): in function `_pub_freejoy_TFreeJoyDriver_JoyCount':
freejoy.bmx.release.nx.arm64.c:(.text._pub_freejoy_TFreeJoyDriver_JoyCount+0x0): undefined reference to `JoyCount'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/freejoy.mod/freejoy.release.nx.arm64.a(freejoy.bmx.release.nx.arm64.o): in function `_pub_freejoy_TFreeJoyDriver_JoyName_i':
freejoy.bmx.release.nx.arm64.c:(.text._pub_freejoy_TFreeJoyDriver_JoyName_i+0xc): undefined reference to `JoyCName'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/freejoy.mod/freejoy.release.nx.arm64.a(freejoy.bmx.release.nx.arm64.o): in function `_pub_freejoy_TFreeJoyDriver_JoyButtonCaps_i':
freejoy.bmx.release.nx.arm64.c:(.text._pub_freejoy_TFreeJoyDriver_JoyButtonCaps_i+0x4): undefined reference to `JoyButtonCaps'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/freejoy.mod/freejoy.release.nx.arm64.a(freejoy.bmx.release.nx.arm64.o): in function `_pub_freejoy_TFreeJoyDriver_JoyAxisCaps_i':
freejoy.bmx.release.nx.arm64.c:(.text._pub_freejoy_TFreeJoyDriver_JoyAxisCaps_i+0x4): undefined reference to `JoyAxisCaps'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/freejoy.mod/freejoy.release.nx.arm64.a(freejoy.bmx.release.nx.arm64.o): in function `pub_freejoy_TFreeJoyDriver_SampleJoy_v_i':
freejoy.bmx.release.nx.arm64.c:(.text.pub_freejoy_TFreeJoyDriver_SampleJoy_v_i+0x8c): undefined reference to `ReadJoy'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/enet.mod/enet.release.nx.arm64.a(enet.bmx.release.nx.arm64.o): in function `__bb_pub_enet_enet':
enet.bmx.release.nx.arm64.c:(.text.__bb_pub_enet_enet+0x38): undefined reference to `enet_initialize'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: enet.bmx.release.nx.arm64.c:(.text.__bb_pub_enet_enet+0x3c): undefined reference to `enet_deinitialize'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: enet.bmx.release.nx.arm64.c:(.text.__bb_pub_enet_enet+0x40): undefined reference to `enet_deinitialize'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/enet.mod/enet.release.nx.arm64.a(host.c.release.nx.arm64.o): in function `enet_host_create':
host.c:(.text.enet_host_create+0x48): undefined reference to `enet_socket_create'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/enet.mod/enet.release.nx.arm64.a(host.c.release.nx.arm64.o): in function `enet_host_destroy':
host.c:(.text.enet_host_destroy+0x14): undefined reference to `enet_socket_destroy'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/enet.mod/enet.release.nx.arm64.a(host.c.release.nx.arm64.o): in function `enet_host_connect':
host.c:(.text.enet_host_connect+0xf0): undefined reference to `htons'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: host.c:(.text.enet_host_connect+0xfc): undefined reference to `htons'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: host.c:(.text.enet_host_connect+0x108): undefined reference to `htonl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: host.c:(.text.enet_host_connect+0x114): undefined reference to `htonl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: host.c:(.text.enet_host_connect+0x120): undefined reference to `htonl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: host.c:(.text.enet_host_connect+0x12c): undefined reference to `htonl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: host.c:(.text.enet_host_connect+0x138): undefined reference to `htonl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/enet.mod/enet.release.nx.arm64.a(host.c.release.nx.arm64.o):host.c:(.text.enet_host_connect+0x144): more undefined references to `htonl' follow
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/enet.mod/enet.release.nx.arm64.a(host.c.release.nx.arm64.o): in function `enet_host_bandwidth_throttle':
host.c:(.text.enet_host_bandwidth_throttle+0x10): undefined reference to `enet_time_get'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: host.c:(.text.enet_host_bandwidth_throttle+0x260): undefined reference to `htonl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: host.c:(.text.enet_host_bandwidth_throttle+0x278): undefined reference to `htonl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: host.c:(.text.enet_host_bandwidth_throttle+0x318): undefined reference to `htonl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/enet.mod/enet.release.nx.arm64.a(peer.c.release.nx.arm64.o): in function `enet_peer_queue_outgoing_command':
peer.c:(.text.enet_peer_queue_outgoing_command+0xbc): undefined reference to `htonl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/enet.mod/enet.release.nx.arm64.a(peer.c.release.nx.arm64.o): in function `enet_peer_send':
peer.c:(.text.enet_peer_send+0xc4): undefined reference to `htonl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/enet.mod/enet.release.nx.arm64.a(peer.c.release.nx.arm64.o):peer.c:(.text.enet_peer_send+0xe0): more undefined references to `htonl' follow
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/enet.mod/enet.release.nx.arm64.a(peer.c.release.nx.arm64.o): in function `enet_peer_send':
peer.c:(.text.enet_peer_send+0x160): undefined reference to `ntohl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/enet.mod/enet.release.nx.arm64.a(peer.c.release.nx.arm64.o): in function `enet_peer_queue_incoming_command':
peer.c:(.text.enet_peer_queue_incoming_command+0x13c): undefined reference to `ntohl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/enet.mod/enet.release.nx.arm64.a(protocol.c.release.nx.arm64.o): in function `enet_protocol_send_reliable_outgoing_commands':
protocol.c:(.text.enet_protocol_send_reliable_outgoing_commands+0x144): undefined reference to `htonl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/enet.mod/enet.release.nx.arm64.a(protocol.c.release.nx.arm64.o): in function `enet_protocol_send_outgoing_commands':
protocol.c:(.text.enet_protocol_send_outgoing_commands+0x124): undefined reference to `htonl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_protocol_send_outgoing_commands+0x130): undefined reference to `htonl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_protocol_send_outgoing_commands+0x13c): undefined reference to `htonl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_protocol_send_outgoing_commands+0x2d0): undefined reference to `htonl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_protocol_send_outgoing_commands+0x3cc): undefined reference to `htons'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_protocol_send_outgoing_commands+0x3e8): undefined reference to `htonl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_protocol_send_outgoing_commands+0x420): undefined reference to `enet_socket_send'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/enet.mod/enet.release.nx.arm64.a(protocol.c.release.nx.arm64.o): in function `enet_host_flush':
protocol.c:(.text.enet_host_flush+0x10): undefined reference to `enet_time_get'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/enet.mod/enet.release.nx.arm64.a(protocol.c.release.nx.arm64.o): in function `enet_host_service':
protocol.c:(.text.enet_host_service+0x50): undefined reference to `enet_time_get'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0xd4): undefined reference to `enet_socket_receive'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0xfc): undefined reference to `ntohs'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0x108): undefined reference to `ntohl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0x1b4): undefined reference to `ntohl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0x1e0): undefined reference to `ntohl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0x354): undefined reference to `ntohl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0x414): undefined reference to `ntohl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/enet.mod/enet.release.nx.arm64.a(protocol.c.release.nx.arm64.o):protocol.c:(.text.enet_host_service+0x530): more undefined references to `ntohl' follow
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/enet.mod/enet.release.nx.arm64.a(protocol.c.release.nx.arm64.o): in function `enet_host_service':
protocol.c:(.text.enet_host_service+0x604): undefined reference to `ntohs'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0x610): undefined reference to `ntohl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0x61c): undefined reference to `ntohl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0x628): undefined reference to `ntohl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0x634): undefined reference to `ntohl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0x640): undefined reference to `ntohl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0x6a4): undefined reference to `ntohs'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0x708): undefined reference to `ntohl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0x738): undefined reference to `htons'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0x744): undefined reference to `htons'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0x750): undefined reference to `htonl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0x75c): undefined reference to `htonl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0x768): undefined reference to `htonl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0x774): undefined reference to `htonl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0x780): undefined reference to `htonl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/enet.mod/enet.release.nx.arm64.a(protocol.c.release.nx.arm64.o):protocol.c:(.text.enet_host_service+0x78c): more undefined references to `htonl' follow
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/enet.mod/enet.release.nx.arm64.a(protocol.c.release.nx.arm64.o): in function `enet_host_service':
protocol.c:(.text.enet_host_service+0x7fc): undefined reference to `enet_time_get'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0x830): undefined reference to `enet_socket_wait'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0x838): undefined reference to `enet_time_get'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0x864): undefined reference to `ntohl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0x958): undefined reference to `ntohl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0x964): undefined reference to `ntohl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0xa10): undefined reference to `ntohl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0xa20): undefined reference to `ntohl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/enet.mod/enet.release.nx.arm64.a(protocol.c.release.nx.arm64.o):protocol.c:(.text.enet_host_service+0xa2c): more undefined references to `ntohl' follow
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/enet.mod/enet.release.nx.arm64.a(protocol.c.release.nx.arm64.o): in function `enet_host_service':
protocol.c:(.text.enet_host_service+0xce0): undefined reference to `ntohs'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0xcec): undefined reference to `ntohs'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0xd24): undefined reference to `ntohl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0xd54): undefined reference to `ntohl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: protocol.c:(.text.enet_host_service+0xd60): undefined reference to `ntohl'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/openal.mod/openal.release.nx.arm64.a(openal.bmx.release.nx.arm64.o): in function `pub_openal_P':
openal.bmx.release.nx.arm64.c:(.text.pub_openal_P+0x14): undefined reference to `GetOpenALFunction'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/pub.mod/openal.mod/openal.release.nx.arm64.a(openal.bmx.release.nx.arm64.o): in function `__bb_pub_openal_openal':
openal.bmx.release.nx.arm64.c:(.text.__bb_pub_openal_openal+0x54): undefined reference to `LoadOpenAL'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/brl.mod/threads.mod/threads.release.nx.arm64.a(threads.c.release.nx.arm64.o): in function `threads_CreateCond':
threads.c:(.text.threads_CreateCond+0x1c): undefined reference to `pthread_cond_init'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/brl.mod/threads.mod/threads.release.nx.arm64.a(threads.c.release.nx.arm64.o): in function `threads_CloseCond':
threads.c:(.text.threads_CloseCond+0x10): undefined reference to `pthread_cond_destroy'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/brl.mod/threads.mod/threads.release.nx.arm64.a(threads.c.release.nx.arm64.o): in function `threads_WaitCond':
threads.c:(.text.threads_WaitCond+0x0): undefined reference to `pthread_cond_wait'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/brl.mod/threads.mod/threads.release.nx.arm64.a(threads.c.release.nx.arm64.o): in function `threads_SignalCond':
threads.c:(.text.threads_SignalCond+0x0): undefined reference to `pthread_cond_signal'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/brl.mod/threads.mod/threads.release.nx.arm64.a(threads.c.release.nx.arm64.o): in function `threads_BroadcastCond':
threads.c:(.text.threads_BroadcastCond+0x0): undefined reference to `pthread_cond_broadcast'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/brl.mod/blitz.mod/blitz.release.nx.arm64.a(blitz_thread.c.release.nx.arm64.o): in function `threadProc':
blitz_thread.c:(.text.threadProc+0x28): undefined reference to `pthread_setspecific'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/brl.mod/blitz.mod/blitz.release.nx.arm64.a(blitz_thread.c.release.nx.arm64.o): in function `bbThreadSetData':
blitz_thread.c:(.text.bbThreadSetData+0x1c): undefined reference to `pthread_getspecific'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/brl.mod/blitz.mod/blitz.release.nx.arm64.a(blitz_thread.c.release.nx.arm64.o): in function `bbThreadGetData':
blitz_thread.c:(.text.bbThreadGetData+0x18): undefined reference to `pthread_getspecific'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/brl.mod/blitz.mod/blitz.release.nx.arm64.a(blitz_thread.c.release.nx.arm64.o): in function `bbThreadCreate':
blitz_thread.c:(.text.bbThreadCreate+0x50): undefined reference to `pthread_create'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/brl.mod/blitz.mod/blitz.release.nx.arm64.a(blitz_thread.c.release.nx.arm64.o): in function `bbThreadDetach':
blitz_thread.c:(.text.bbThreadDetach+0x10): undefined reference to `pthread_detach'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /opt/blitzmax/0.98.3.27/mod/brl.mod/blitz.mod/blitz.release.nx.arm64.a(blitz_thread.c.release.nx.arm64.o): in function `bbThreadWait':
blitz_thread.c:(.text.bbThreadWait+0x20): undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status
Build Error: Failed to link /home/makenshi/projects/switch/blitzmax/hello-world.elf
Process complete

The program itself is exactly one line:
Code: [Select]
Print "Hello World!"
I also couldn't build a debug version of it, as the compiler would fail with the error "Intrinsic types only available on x64". Which confuses me, why are data types used that are only available on x86_64? The Switch runs on ARM64 iirc.

So I'm a bit stumped here. The error logs indicates that a lot of references are missing. Maybe some associated header files are missing?
Could someone please help me find the solution?


Best regards

Offline Derron

  • Hero Member
  • *****
  • Posts: 1557
Re: Building for the Switch with devkitpro
« Reply #1 on: January 06, 2019, 07:25:55 PM »
I am not sure but the switch target is more of a "nx target". Thought Brucey did not have access to a devkit switch device.
So things might work - or not.


First of all: to avoid loading all modules, use the "Framework" command. So it becomes eg.:

Code: BlitzMax
  1. SuperStrict
  2.  
  3. Framework Brl.StandardIO 'so "print" and the likes
  4.  
  5. print "Hello World"
  6.  

If you then want to use more modules, just do an "import Brl.modulename" (eg. "Brl.Max2D" or so). Maybe you have to utilize SDL (sdl.mod).


bye
Ron

Offline Yellownakji

  • Full Member
  • ***
  • Posts: 100
  • The new logo looks like a butt plug
Re: Building for the Switch with devkitpro
« Reply #2 on: January 10, 2019, 12:36:22 AM »
First and foremost, NG support is for homebrew and is internally flagged as such.  So, don't submit anything to nintendo.  Just throwing that out there.

As for your error, DKP and NG compile just fine.   I use 0.98NG and Devkitpro with msys 2.10.0.   I'm not sure of the DKP version but it's from 9/12/2018.  That's the exact date it was released.

DKP gets updated far faster than NG and has more dependencies.  Keep this in mind.

Something on the DKP side is conflicting with NG, therefore you must find a downgrade.   I can prob give you my toolchain if you message me.