llakssz / CIAngel

Download GOOD CIAs on your 3DS!
189 stars 19 forks source link

Can't compile. #8

Closed noirscape closed 8 years ago

noirscape commented 8 years ago

When I compile, I get this output:

main.cpp
arm-none-eabi-g++ -MMD -MP -MF /home/ev1l0rd/CIAngel/build/main.d -g -Wall -O2 -mword-relocations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=hard -I/home/ev1l0rd/CIAngel/include -I/opt/devkitPro/libctru/../libhbkb/include -I/opt/devkitPro/libctru/include -I/home/ev1l0rd/CIAngel/build -DARM11 -D_3DS -fno-rtti -fno-exceptions -std=c++11 -c /home/ev1l0rd/CIAngel/source/main.cpp -o main.o 
/home/ev1l0rd/CIAngel/source/main.cpp:17:18: fatal error: hbkb.h: No such file or directory
compilation terminated.
make[1]: *** [main.o] Error 1
make: *** [build] Error 2

And I don't end up with any build files.

DevKitPro is installed to /opt/devkitPro/ .

Ubuntu 14.04.

DrakiaXYZ commented 8 years ago

The project now requires HBKB: https://gbatemp.net/threads/hbkblib-a-3ds-keyboard-library.397568/

DrakiaXYZ commented 8 years ago

Also you'll need to modify the Makefile for HBKB as it hard-codes the DEVKITARM directory as /usr/local/devkitArm or some such.

noirscape commented 8 years ago

I managed to change the makefile (the first line hardcodes DEVKITPRO, which in turn hardcodes DEVKITARM), but now I can't run sudo -E make install.

Error I get when running sudo -E make install

make: *** No rule to make targetinstall'. Stop.`

Do I need to copy the files over to a different directory?

DrakiaXYZ commented 8 years ago

Yeah. There's two files you'll need to copy. I did it the lazy way and just put them in libctru's folders:

From one directory up from the Makefile (Should contain "hbkb" and "hbkb_include_header"): cp hbkb/lib/libhbkb.a $DEVKITPRO/libctru/lib cp hbkb_include_header/hbkb.h $DEVKITPRO/libctru/include/

Give or take a path.

noirscape commented 8 years ago

Now I don't get any issues with hbkb anymore. Now the error is this:

ev1l0rd@ev1l0rd:~/CIAngel$ make
main.cpp
arm-none-eabi-g++ -MMD -MP -MF /home/ev1l0rd/CIAngel/build/main.d -g -Wall -O2 -mword-relocations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=hard -I/home/ev1l0rd/CIAngel/include -I/opt/devkitPro/libctru/../libhbkb/include -I/opt/devkitPro/libctru/include -I/home/ev1l0rd/CIAngel/build -DARM11 -D_3DS -fno-rtti -fno-exceptions -std=c++11 -c /home/ev1l0rd/CIAngel/source/main.cpp -o main.o 
/home/ev1l0rd/CIAngel/source/main.cpp: In function 'Result DownloadFile(std::__cxx11::string, std::ofstream&)':
/home/ev1l0rd/CIAngel/source/main.cpp:44:32: error: 'HTTPC_METHOD_GET' was not declared in this scope
     httpcOpenContext(&context, HTTPC_METHOD_GET, (char *)url.c_str(), 1);
                                ^
/home/ev1l0rd/CIAngel/source/main.cpp: In function 'int main()':
/home/ev1l0rd/CIAngel/source/main.cpp:312:16: error: too many arguments to function 'Result httpcInit()'
     httpcInit(0);
                ^
In file included from /opt/devkitPro/libctru/include/3ds.h:42:0,
                 from /opt/devkitPro/libctru/include/hbkb.h:71,
                 from /home/ev1l0rd/CIAngel/source/main.cpp:17:
/opt/devkitPro/libctru/include/3ds/services/httpc.h:23:8: note: declared here
 Result httpcInit(void);
        ^
/home/ev1l0rd/CIAngel/source/main.cpp:315:15: error: 'sslcInit' was not declared in this scope
     sslcInit(0);
               ^
/home/ev1l0rd/CIAngel/source/main.cpp:377:14: error: 'sslcExit' was not declared in this scope
     sslcExit();
              ^
/home/ev1l0rd/CIAngel/source/main.cpp:326:10: warning: unused variable 'refresh' [-Wunused-variable]
     bool refresh = true;
          ^
make[1]: *** [main.o] Error 1
make: *** [build] Error 2
DrakiaXYZ commented 8 years ago

Best guess is you're running an old version of libctru. I'd recommend grabbing/building the latest version: https://github.com/smealum/ctrulib/tree/master/libctru

That one should work properly with make install

noirscape commented 8 years ago

Now it works. The second thing was my fault, but the hbkb part should really be included in the README.

DrakiaXYZ commented 8 years ago

I only figured it out a few minutes before you, and am in the middle of working on another fix for stuff. Hopefully cearp or someone else gets around to fixing that up in the README.

alice157 commented 8 years ago

HBKB isn't anywhere on github, so do you guys think we should just bundle it with CIAngel and attribute it in the readme?

Edit: NVM, it is on github at github.com/giveup/HBKBLib

DrakiaXYZ commented 8 years ago

I would say get in touch with the original author, and start a new GitHub project for it (Fixing up any issues there). If it were to be added to the CIAngel source it makes any fixes made to it harder for other projects to integrate.

llakssz commented 8 years ago

Ok glad you compiled it. :dart: I'll add something about libraries in the readme a bit later.

DrakiaXYZ commented 8 years ago

I'm waiting to hear back from the original author of HBKB about whether I can just throw it up as a new project on GitHub, and put a proper license on it. Hopefully he gets back to me soon.

DrakiaXYZ commented 8 years ago

I've updated the README to have better instructions on compiling, hopefully it clears some things up.

PeggerWed commented 8 years ago

Just to add a little note to it, so Windows user do understand it more easily:

_Helreizer543 said: ↑ I wanted to add a little something for users that are trying to compile the library on windows.

  1. comment out the first 2 lines in the make file if your ctrulib is installed in the default location.
  2. In the download rename, the folder "Library Source" to just "Library". After that the library should compile.:_

Modify makefile in "\hbkb\Library Source\hbkb\":

to

Rename "\hbkb\Library Source\" to \hbkb\Library\"

Now open a commandline window and go to \hbkb\Library\hbkb\ and run make Now when it's done copy or move manually the needed files to ctrulib:

-> \hbkb\Library\hbkb_include_header\hbkb.h to -> c:\devkitPro\libctru\include\

-> \hbkb\Library\hbkb\lib\libhbkb.a to -> c:\devkitPro\libctru\lib\