How to build almost ANY switch CFW or Homebrew app

Guide was designed for Windows 10 but should work on eariler Windows versions as well.
Download this: https://github.com/devkitPro/installer/releases
select "Download and install" and "remove downloaded files". select everything when it asks what you want installed. Default install location is recommended. This can take a while.
download this: https://cygwin.com/
make sure you get the one for your system architype. Choose "Download from Internet". Choose "all users". Use system proxy. Use the first mirror. Leave default packages. Uncheck Start Menu and Desktop Icon.
Search "edit the system enivorment variables" in the windows search
click enivorment variables
Under system variables look for "Path"
click edit then new and paste in C:\devkitPro\devkitA64\bin (or where you installed DevKitPro)
click Edit Text and put a ; then the same C:\devkitPro\devkitA64\bin (or where you installed DevKitPro) and then another ; at the end
go to https://github.com/switchbrew/libnx and download the source to the desktop and unzip (libnx-master folder should be on desktop now)
open CMD and CD to the directory of libnx-master folder (Should be on desktop)
now do "make install"
once it is done (may take a while) close that CMD
Open a new CMD window and do:
(these should be executed one at a time and if it asks for confirmation Type "Y")
pacman -S switch-sdl2_mixer
pacman -S switch-sdl2_image
pacman -S switch-sdl2_gfx
pacman -S switch-sdl2_ttf
download the source code of a switch CFW or NRO (for example FreeShopNX). Unzip and put the folder on the desktop. Open CMD and CD to the folder location. then do "Make". All the extracted files will be in the master folder or out folder in the master folder.
This will not work for everything but should work for most.
Guide by Daigan#9999 on Discord and Daigan on GBATemp
 

eyeliner

Has an itch needing to be scratched.
Member
Joined
Feb 17, 2006
Messages
2,887
Trophies
2
Age
44
XP
5,520
Country
Portugal
Tell Daigan I send much praise his way. I shall chant his name while holding my beer up high.
And I shall also chant footnotes in thy name.
 

shchmue

Developer
Developer
Joined
Dec 23, 2013
Messages
791
Trophies
1
XP
2,367
Country
United States
fatal error: curl/curl.h: No such file or directory
#include <curl/curl.h>
^~~~~~~~~~~~~
you and OP should just do the list from tumGER's SD files:
Code:
pacman -S devkitA64 switch-tools switch-curl switch-bzip2 switch-freetype switch-libjpeg-turbo switch-sdl2 switch-sdl2_gfx switch-sdl2_image switch-sdl2_ttf switch-zlib switch-libpng
 
  • Like
Reactions: DubaiKid83

ressit

Well-Known Member
Member
Joined
Jun 4, 2018
Messages
128
Trophies
0
Age
33
XP
418
Country
Vietnam
how fix it
Code:
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/10.2.0/../../../../aarch64-none-elf/bin/ld.exe: cannot find -lstratosphere
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/opt/devkitpro/libnx/switch_rules:80: /opt/devkitpro/examples/Atmosphere-master/stratosphere/ams_mitm/ams_mitm.elf]
 

Adran_Marit

Walküre's Hacker
Member
Joined
Oct 3, 2015
Messages
3,781
Trophies
1
Location
42*South
XP
4,548
Country
Australia
how fix it
Code:
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/10.2.0/../../../../aarch64-none-elf/bin/ld.exe: cannot find -lstratosphere
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/opt/devkitpro/libnx/switch_rules:80: /opt/devkitpro/examples/Atmosphere-master/stratosphere/ams_mitm/ams_mitm.elf]
Code:
make clean && make
 
  • Like
Reactions: ressit

ressit

Well-Known Member
Member
Joined
Jun 4, 2018
Messages
128
Trophies
0
Age
33
XP
418
Country
Vietnam
now i have it
Code:
C:/devkitPro/examples/Atmosphere-libs-master/libstratosphere/source/fs/fs_access_log.cpp: In function 'ams::Result ams::fs::impl::{anonymous}::OutputAccessLogToSdCardImpl(const char*, size_t)':
C:/devkitPro/examples/Atmosphere-libs-master/libstratosphere/source/fs/fs_access_log.cpp:192:22: error: '::fsOutputAccessLogToSdCard' has not been declared; did you mean 'OutputAccessLogToSdCardImpl'?
  192 |             return ::fsOutputAccessLogToSdCard(log, size);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                      OutputAccessLogToSdCardImpl
In file included from c:\devkitpro\examples\atmosphere-libs-master\libvapours\include\vapours\results.hpp:23,
                 from c:\devkitpro\examples\atmosphere-libs-master\libvapours\include\vapours.hpp:27,
                 from C:/devkitPro/examples/Atmosphere-libs-master/libstratosphere/include/stratosphere.hpp:20:
C:/devkitPro/examples/Atmosphere-libs-master/libstratosphere/source/fs/fs_access_log.cpp: In function 'void ams::fs::impl::{anonymous}::GetProgramIndexFortAccessLog(u32*, u32*)':
C:/devkitPro/examples/Atmosphere-libs-master/libstratosphere/source/fs/fs_access_log.cpp:286:34: error: '::fsGetProgramIndexForAccessLog' has not been declared; did you mean 'GetProgramIndexFortAccessLog'?
  286 |                 R_ABORT_UNLESS(::fsGetProgramIndexForAccessLog(out_index, out_count));
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
c:\devkitpro\examples\atmosphere-libs-master\libvapours\include\vapours\results\results_common.hpp:253:39: note: in definition of macro 'R_ABORT_UNLESS'
  253 |         const auto _tmp_r_abort_rc = (res_expr); \
      |                                       ^~~~~~~~
 

Adran_Marit

Walküre's Hacker
Member
Joined
Oct 3, 2015
Messages
3,781
Trophies
1
Location
42*South
XP
4,548
Country
Australia
now i have it
Code:
C:/devkitPro/examples/Atmosphere-libs-master/libstratosphere/source/fs/fs_access_log.cpp: In function 'ams::Result ams::fs::impl::{anonymous}::OutputAccessLogToSdCardImpl(const char*, size_t)':
C:/devkitPro/examples/Atmosphere-libs-master/libstratosphere/source/fs/fs_access_log.cpp:192:22: error: '::fsOutputAccessLogToSdCard' has not been declared; did you mean 'OutputAccessLogToSdCardImpl'?
  192 |             return ::fsOutputAccessLogToSdCard(log, size);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                      OutputAccessLogToSdCardImpl
In file included from c:\devkitpro\examples\atmosphere-libs-master\libvapours\include\vapours\results.hpp:23,
                 from c:\devkitpro\examples\atmosphere-libs-master\libvapours\include\vapours.hpp:27,
                 from C:/devkitPro/examples/Atmosphere-libs-master/libstratosphere/include/stratosphere.hpp:20:
C:/devkitPro/examples/Atmosphere-libs-master/libstratosphere/source/fs/fs_access_log.cpp: In function 'void ams::fs::impl::{anonymous}::GetProgramIndexFortAccessLog(u32*, u32*)':
C:/devkitPro/examples/Atmosphere-libs-master/libstratosphere/source/fs/fs_access_log.cpp:286:34: error: '::fsGetProgramIndexForAccessLog' has not been declared; did you mean 'GetProgramIndexFortAccessLog'?
  286 |                 R_ABORT_UNLESS(::fsGetProgramIndexForAccessLog(out_index, out_count));
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
c:\devkitpro\examples\atmosphere-libs-master\libvapours\include\vapours\results\results_common.hpp:253:39: note: in definition of macro 'R_ABORT_UNLESS'
  253 |         const auto _tmp_r_abort_rc = (res_expr); \
      |                                       ^~~~~~~~

Okay next guess do you have the latest commit of libnx? if not then I suggest trying that
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    ButterScott101 @ ButterScott101: +1