Trouble compiling projects - VS 2015

Discussion in '3DS - Homebrew Development and Emulators' started by Quantumcat, Jan 31, 2016.

  1. Quantumcat
    OP

    Quantumcat Dead and alive

    Member
    9,846
    5,146
    Nov 23, 2014
    Australia
    Canberra, Australia
    Hi guys,

    I am trying to compile some simple homebrew so I can play around with it and learn (I downloaded the source from the author's github). I fixed the first set of errors I got - didn't have the right libraries so I downloaded them and put them in the devkitPro folder (just to keep them all in the same place). Then I had to hardcode the directory that the library .h file was in (#include "C:\devkitPro\..."). Now I have current problem which I haven't solved yet:

    Code:
    1>------ Build started: Project: Graphing Calculator, Configuration: Debug Win32 ------
    1>  linking GraphCalc3DS-master.elf
    1>  c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/5.3.0/../../../../arm-none-eabi/bin/ld.exe: cannot find -lsftd
    1>  c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/5.3.0/../../../../arm-none-eabi/bin/ld.exe: cannot find -lfreetype
    1>  c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/5.3.0/../../../../arm-none-eabi/bin/ld.exe: cannot find -lpng
    1>  c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/5.3.0/../../../../arm-none-eabi/bin/ld.exe: cannot find -lz
    1>  c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/5.3.0/../../../../arm-none-eabi/bin/ld.exe: cannot find -lsf2d
    1>collect2.exe : error : ld returned 1 exit status
    1>  make[1]: *** [/c/Users/thequ_000/Desktop/3DS_Homebrew/GraphCalc3DS-master/GraphCalc3DS-master.elf] Error 1
    1>  make: *** [build] Error 2
    1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(37,5): error MSB3073: The command "make" exited with code 2.
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    Putting the library folders in the same folder as the solution file didn't help. I also realised I probably had to build the libraries, so I built one (and got a .sdf file) and put that in the same directory as the solution file but that didn't help either. Does anyone have any ideas? I followed wiki.gbatemp.net/wiki/3DS_Homebrew_Development to set up my environment (in Visual Studio Professional 2015).

    Thanks!!
     
  2. Quantumcat
    OP

    Quantumcat Dead and alive

    Member
    9,846
    5,146
    Nov 23, 2014
    Australia
    Canberra, Australia
    Sorry I posted this in the wrong forum, can a mod please move it for me?
     
  3. Quantumcat
    OP

    Quantumcat Dead and alive

    Member
    9,846
    5,146
    Nov 23, 2014
    Australia
    Canberra, Australia
    Anyone? :-(
     
  4. Gocario

    Gocario GBAFail'd

    Member
    640
    560
    Sep 5, 2015
    France
    Bourg Palette
    Code:
    cannot find -lsftd
    cannot find -lfreetype
    cannot find -lpng
    cannot find -lz
    cannot find -lsf2d
    You are missing portlibs and sf2dlib and sftdlib.
     
    Last edited by Gocario, Jan 31, 2016 - Reason: I wrote i n French... :o
  5. Quantumcat
    OP

    Quantumcat Dead and alive

    Member
    9,846
    5,146
    Nov 23, 2014
    Australia
    Canberra, Australia
    I do have sf2dlib and sftdlib though. I downloaded them and put them in the devkitPro folder, and the includes all point to the right headers. I tried building sf2dlib and put the built file with the .sln file but it didn't make a difference. Can you tell me where I need to put the files?
     
  6. Gocario

    Gocario GBAFail'd

    Member
    640
    560
    Sep 5, 2015
    France
    Bourg Palette
    I do not use VS. :/
    Using devkitPro, you only have to do `make install` for each lib.
     
  7. Quantumcat
    OP

    Quantumcat Dead and alive

    Member
    9,846
    5,146
    Nov 23, 2014
    Australia
    Canberra, Australia
    What does that mean? Can you look at a project of yours and tells where you put your library files???
     
  8. Gocario

    Gocario GBAFail'd

    Member
    640
    560
    Sep 5, 2015
    France
    Bourg Palette
    My sf2d files are, after doing make install, within:
    • 'devkitPro/libctru/lib' for the libsf2d.a
    • 'devkitPro/libctru/include' for the sf2d.h
     
  9. Quantumcat
    OP

    Quantumcat Dead and alive

    Member
    9,846
    5,146
    Nov 23, 2014
    Australia
    Canberra, Australia
    How do you do make install? From the command line? Eg would I have the libsf2d folder (source code) in devkitPro, cd to it in the command line, and say make install?

    — Posts automatically merged - Please don't double post! —

    By the way a million thanks for helping I really appreciate it.

    — Posts automatically merged - Please don't double post! —

    I just tried that and it said make: no rule to make target 'install'. Stop. :-(
     
  10. Ridge

    Ridge The Queen Anemone

    Member
    369
    289
    Sep 10, 2015
    Norway
    Lunatea
    I'm not very good at this either, but I think it might work better with Windows PowerShell.
     
  11. Gocario

    Gocario GBAFail'd

    Member
    640
    560
    Sep 5, 2015
    France
    Bourg Palette
    1. Clone the sf2dlib repo or download it as archive (and decompress it).
    2. Launch the cmd in the libsf2d folder (Makefile file and source folder are present next to)
    3. Do `make install`
    4. Wait...
    5. sf2d shall be installed now.
     
    Last edited by Gocario, Jan 31, 2016
  12. Quantumcat
    OP

    Quantumcat Dead and alive

    Member
    9,846
    5,146
    Nov 23, 2014
    Australia
    Canberra, Australia
    Oh thanks! I did the make on the wrong folder (the real one was inside) and it put a .a folder where you said it would. I'll test the program now.

    — Posts automatically merged - Please don't double post! —

    Success - it didn't complain about -lsf2d this time. Now to do it to the others :-))))