Homebrew 3ds.h: no such file or directory

StackMasher

Well-Known Member
OP
Member
Joined
Nov 29, 2016
Messages
136
Trophies
0
Age
20
XP
370
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

Xenon Hacks

Well-Known Member
Member
Joined
Nov 13, 2014
Messages
7,414
Trophies
1
Age
30
XP
4,687
Country
United States
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

StackMasher

Well-Known Member
OP
Member
Joined
Nov 29, 2016
Messages
136
Trophies
0
Age
20
XP
370
Country
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,

Deleted member 373057

Well-Known Member
Member
Joined
Oct 5, 2015
Messages
462
Trophies
0
XP
561
Country
Canada
  • Like
Reactions: gnmmarechal

gnmmarechal

Well-Known Member
Member
GBAtemp Patron
Joined
Jul 13, 2014
Messages
6,040
Trophies
2
Age
25
Location
https://gs2012.xyz
Website
gs2012.xyz
XP
6,000
Country
Portugal

gnmmarechal

Well-Known Member
Member
GBAtemp Patron
Joined
Jul 13, 2014
Messages
6,040
Trophies
2
Age
25
Location
https://gs2012.xyz
Website
gs2012.xyz
XP
6,000
Country
Portugal
Yeah, that was the only "problem". Was able to easily fix by cloning the latest libctru and building it though.
I thought those examples used outdated stuff and don't build with a newer build of ctrulib?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Xdqwerty
    what are you looking at?
  • BigOnYa
  • BakerMan
    I rather enjoy a life of taking it easy. I haven't reached that life yet though.
    SylverReZ @ SylverReZ: Lol