How to work with clustalw source code?
0
0
Entering edit mode
7.8 years ago
TJay • 0

Hi,

I'm trying to do some changes with the clustalw source code.I'm using Windows 8.1 and i installed MinGW with MSYS. But i was not able to run the main.cpp as there were some errors from that file. I tried from visual studio too. Same thing happen to me. So can some one explain the way to run this source code?

clustalw source-code • 2.8k views
ADD COMMENT
0
Entering edit mode

How did you try to compile that, your error report is not precise enough either.

ADD REPLY
0
Entering edit mode

In command prompt, the command and the error is as follows.

D:\clustalw-2.1\clustalw-2.1\src>g++ -o m main.cpp

In file included from interface/InteractiveMenu.h:15:0, from main.cpp:17: interface/../Clustal.h:15:22: fatal error: clustalw.h: No such file or directory #include "clustalw.h" ^ compilation terminated.

ADD REPLY
2
Entering edit mode

this is is the right way to run g++/gcc , but for VERY simple programs.

For complex program you need to add the path to the include files, the multiple source, preprocessing directives, some linking directives, etc... I suppose clustal comes with a Makefile. You'd better use this instead of trying to compile this by yourself.

ADD REPLY
1
Entering edit mode

Yep, use the makefile, also you need Cygwin, is it installed?

ADD REPLY
0
Entering edit mode

Yes.I installed Cygwin and run ./configure and then make command. After run make command i got some errors as,

./general/Stats.cpp: In member function 'void clustalw::Stats::logInputSeqStats(clustalw::Alignment*)': ./general/Stats.cpp:269:25: error: 'time' was not declared in this scope time_t t = time(NULL); ^ ./general/Stats.cpp:270:25: error: 'localtime' was not declared in this scope tm s = *localtime(&t); ^ ./general/Stats.cpp:281:90: error: 'asctime' was not declared in this scope fprintf(fp, "logging job: %s on %s", userParameters->getSeqName().c_str(), asctime(&s)); ^

make[3]: * [Stats.o] Error 1

make[3]: Leaving directory `/d/clustalw-2.1/clustalw-2.1/src'

make[2]: * [all-recursive] Error 1

make[2]: Leaving directory `/d/clustalw-2.1/clustalw-2.1/src'

make[1]: * [all] Error 2

make[1]: Leaving directory `/d/clustalw-2.1/clustalw-2.1/src'

make: * [all-recursive] Error 1

I attached a snapshot of Cygwin window.

ADD REPLY
1
Entering edit mode

in Stats.cpp include the following line at the top of the file:

#include <ctime>

ADD REPLY
0
Entering edit mode

That's the problem. Thank you so much..

ADD REPLY

Login before adding your answer.

Traffic: 2188 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6