#How can I set additional include paths for NCPatcher?

1 messages · Page 1 of 1 (latest)

hollow sandal
#

I need to set the standard library because Mac moment; where would I set this?
This is the folder I need to set:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include

#

@ripe geyser / @untold canyon Thinkio

ripe geyser
#

wdym with standard includes

hollow sandal
#

Such as <stdio.h>

ripe geyser
#

so the standard library

hollow sandal
#

Yeah

ripe geyser
#

well first of all i don't think you want to use the OSX SDK on the nds just sayin 💀

hollow sandal
#

stdio is a depency for nsmb.h

#

Let me get the error

ripe geyser
#

it should be included by gcc, something that you wouldn't have to do yourself

#

send error

hollow sandal
#

Gcc is probably trying to look in /usr/include/

untold canyon
#

ncpatcher should allow them already

ripe geyser
#

ohh mahh gawd thanks mac os

#

how is the setup currently?

#

to run NCP on mac

hollow sandal
#

Same as Windows

untold canyon
#

yeah pretty much

hollow sandal
#

Here's my .json

#
{
  "$arm_flags": "-masm-syntax-unified -mno-unaligned-access -mfloat-abi=soft -mabi=aapcs",
  "$c_flags": "-Os -fomit-frame-pointer -ffast-math -fno-builtin -nostdlib -nodefaultlibs -nostartfiles -DSDK_GCC -DSDK_FINALROM",
  "$cpp_flags": "-fno-rtti -fno-exceptions -std=c++20",
  "$asm_flags": "-Os -x assembler-with-cpp -fomit-frame-pointer",
  "$ld_flags": "-lgcc -lc -lstdc++ --use-blx",
  
  "backup": "backup",
  "filesystem": "NSNDY",
  "toolchain": "arm-none-eabi-",
  
  "arm7": {},
  "arm9": {
      "target": "arm9.json",
      "build": "build"
  },
  
  "pre-build": [],
  "post-build": [],
  
  "thread-count": 0
}
untold canyon
#

only the get executable path function is different for mac in ncp lmao

ripe geyser
#

you shouldn't change anything in the config to get it working

#

so you got the arm-none-eabi-gcc for mac or what

hollow sandal
#

Yeah

untold canyon
#

might be this

ripe geyser
#

nono

#

these avoid linking against the standard static library

#

however the includes should be always there

hollow sandal
untold canyon
#

why do you need those includes? I will try to sell to you that you don't need them so that I don't need to help

hollow sandal
#

I can’t include nsmb.h without it

untold canyon
#

oh

hollow sandal
ripe geyser
#

they are required everywhere throughout sdk/nns

#

you cannot avoid them

#

gcc should have a way to print the include paths

#

-v flag

ripe geyser
#

and run compilation

untold canyon
#

I am pretty sure that in the past I saw ndy compile on mac didn't I?

#

or maybe without those headers

hollow sandal
#

I'm on ARM mac now, might be different

ripe geyser
#

hopefully we can find a way out

#

cross compilation has never been fun

hollow sandal
ripe geyser
#

this is scary

#

can you check at what point that path becomes nonexistent?

#

trace it back

hollow sandal
#

Seems like there's no lib folder in /opt/homebrew/Cellar/arm-none-eabi-gcc/13.2.0/

#

Wait hold on

ripe geyser
#

📉

#

either there is something wrong with your installation

#

or gcc did not ship with the libraries

#

in both cases concerning

hollow sandal
#

This path exists:
/opt/homebrew/Cellar/arm-none-eabi-gcc/13.2.0/lib/gcc/arm-none-eabi/13.2.0/
This part does not:
../../../../arm-none-eabi/include/c++/13.2.0

#

Let me try an alternative way of installing it

#

Ok, that fixed it

#

It seems brew just didn’t install all of the gcc things

#

So I just got the version from the website

#

Then added to path as usual

ripe geyser
#

does it work?

hollow sandal
#

Yep

#

Code compiled

ripe geyser
#

runs?

hollow sandal
#

Building it now

#

Yep!

#

And the no coin grab example works

#

Thanks for the help Praise

ripe geyser
#

np

#

thank god it was an easy fix

#

did not expect that

hollow sandal
#

Lmao ikr

teal jewel
#

now you can put hiw to set up ncpatcher on mac on the wiki

hollow sandal
#

Real

untold canyon
#

Last time we did this we had used the arm website I'm pretty sure