1

I am trying to add a few C ++ files to Swift to make a bioinformatic tool prototype as part of my bachelor's thesis.

I am not a programmer and my studies are focused on biotechnology so this area is new to me, I have learned a lot but in this point I am completely stuck with the project, so I am looking for some help.

The error I am seeing is this:

Undefined symbols for architecture x86_64:
  "Aline_Wrapper::Aline_seq()", referenced from:
      -[Aline_W Aline_Full] in Aline_W.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

The information I have read and tried to use to correct the error is here.

I haven't been able to solve my problem using this information.

The project files that I have so far can be found here.

Gene Z. Ragan
  • 2,643
  • 2
  • 31
  • 41

1 Answers1

0

I have taken a look at your code and there are few things you need to fix.

In MyMain.h, remove this line:

#import "MyMain.cpp"

You don't want to import a cpp file from a header file.

Add this line to MyMain.cpp. You can add it after the #define, like this:

#define HERE std::cout << "At line " << __LINE__ << std::endl;

#import "MyMain.hpp"

You will now be able to build.

¡Buena suerte!

Gene Z. Ragan
  • 2,643
  • 2
  • 31
  • 41
  • Thank you But when making the corrections the same error still appears, will there be any configuration that is the difference? The computer I use is borrowed so it takes more than a week to be able to review the corrections you mentioned in the code. – AZAEL FLORS Nov 14 '19 at 17:20
  • I'll submit a pull request with the changes I made to your project. Hopefully this will work for you. – Gene Z. Ragan Nov 14 '19 at 17:42
  • I created a new git repo with the fixes. You can can find it here: https://github.com/CogMachines/Align-sequences-in-Swift – Gene Z. Ragan Nov 14 '19 at 17:53
  • 1
    Thank you very much for your help, sorry for not thanking you before, I have been very busy with the project, but this helped me too much. – AZAEL FLORS Nov 24 '19 at 23:32