Homebrew 3ds.h: no such file or directory

  • Thread starter Thread starter StackMasher
  • Start date Start date
  • Views Views 7,176
  • Replies Replies 14
  • Likes Likes 1

StackMasher

Well-Known Member
Member
Joined
Nov 29, 2016
Messages
136
Reaction score
65
Trophies
0
Age
23
XP
410
Country
I'm trying to get into 3ds homebrew development but I'm facing a problem with this code:
Code:
#include <stdio.h>
#include <3ds.h>

int main()
{
   //Initialise console
   gfxInitDefault();
   consoleInit(GFX_TOP,NULL);

   //Print hello world
   printf("Hello World!");

   //Main loop
   while (aptMainLoop())
   {
     gfxFlushBuffers();
     gfxSwapBuffers();
     gspWaitForVblank();
   }

   //Exit
   gfxExit();
   return 0;
}
Here's what bash looks like:
stackmasher@stackmasher-Precision-WorkStation-T3400 ~ $ /opt/devkitPro/devkitARM/bin/arm-none-eabi-gcc /media/stackmasher/cfca4fc1-f4ef-4ffd-a2d3-cf6fc050941e/Programming/learn/3ds/main.c
/media/stackmasher/cfca4fc1-f4ef-4ffd-a2d3-cf6fc050941e/Programming/learn/3ds/main.c:2:17: fatal error: 3ds.h: No such file or directory
compilation terminated.
 
  • Like
Reactions: Xenon Hacks
I'm trying to get into 3ds homebrew development but I'm facing a problem with this code:
Code:
#include <stdio.h>
#include <3ds.h>

int main()
{
   //Initialise console
   gfxInitDefault();
   consoleInit(GFX_TOP,NULL);

   //Print hello world
   printf("Hello World!");

   //Main loop
   while (aptMainLoop())
   {
     gfxFlushBuffers();
     gfxSwapBuffers();
     gspWaitForVblank();
   }

   //Exit
   gfxExit();
   return 0;
}
Here's what bash looks like:
Always nice to see a new face and even though I can't help you welcome to GBAtemp :)
 
  • Like
Reactions: StackMasher
Did you follow the instructions here? - http://devkitpro.org/wiki/Getting_Started

Once devkitarm is installed and configured then you probably want to get the latest version of ctrulib from git. You will need to compile and install it. https://github.com/smealum/ctrulib
make && make install
I used a perl script from the gbatemp wiki
Ah and it looks like libctru is what I needed all along
sigh I wish there was a proper tutorial for this stuff

So devkitpro is a cross-compiler and C library port, and libctru provides useful functions like hidScanInput?
 
Last edited by StackMasher,
  • Like
Reactions: gnmmarechal

Site & Scene News

Popular threads in this forum