• Support
  • Articles
  • Resources
  • Products

build difficulty

Moderator: boris

8 postsPage 1 of 1

ddyer
Newbie

Posts:
5
Joined: Mon Dec 10, 2012 8:51 pm
by ddyer » Sun Oct 12, 2014 11:02 pm
teratermpro can't be built "out of the box" on windows, requiring significant sleuthing
to get the "oniguruma" component and get it compiled. It would simplify things greatly
if the appropriate version of oniguruma.h and the compiled libraries were included in the
distribution. In any case, it would be more correct to distribute a certified version
of the library, rather than depending on retrieving one that was of the appropriate vintage.

The supplied batch file to build oniguruma didn't work with the
sources I retrieved. (no "make clean" exists). And the library itself
didn't work because it lacked an entry point for onig_version(). Fortunately
for me, these glitches were resolvable, but it shouldn't have been necessary.
boris
Moderator, LogMeTT and TTLEditor developer

Posts:
1596
Joined: Sat Jan 08, 2005 2:52 pm
by boris » Sun Aug 14, 2016 6:41 am
Below are the steps required to compile Tera Term source under free Visual Studio 2015 Community edition. Figuring this out was rather long and "painful" process and I decided to describe it to help others. Please note that this is still work-in-progress procedure and more steps may be added later. Please reply to this post with your comments and suggestions.

UPDATE: New revision of this procedure will be published soon based on the feedback from Tera Term project lead posted here.

1) Download and install Microsoft Visual Studio 2015 Community edition. It is free.
2) Download and install TortoiseSVN.
3) Download Tera Term source files using SVN. Create new folder, right-click on it in file Explorer and choose SVN Checkout option. URL of Repository is http://svn.osdn.jp/svnroot/ttssh2/ You need to select HEAD revision option. Total size of downloaded files is about 1.2GB. In my case it took about 10 minutes. Obviously your download time will depend on your Internet connection speed.
4) Create another folder for Oniguruma package. Download it from https://github.com/kkos/oniguruma as a zip file and extract into newly created directory, or do SVN Checkout from URL https://github.com/kkos/oniguruma.git
5) Open <teraterm_checkout_dir>\trunk\teraterm\ttermpro.sln file in VS 2015. You will get couple of popups. Click OK and Yes buttons in them to continue.
6) The package will be migrated and migration report will show 57 warnings and 29 messages. Ignore them for now.
7) In VS 2015 in Solution Explorer select ttpcmn project and hit Alt-Enter to open its Properties.
8) Under Configuration Properties->Linker->Advanced change Image Has Safe Exception Handlers value from YES(SAFESEH) to No (/SAFESEH:NO) then click OK
9) In VS 2015 in Solution Explorer select ttermpro project and hit Alt-Enter to open its Properties.
10) Under Linker->Input add Nafxcwd.lib; Libcmtd.lib to Ignore Specific Default Libraries and Additional dependencies. Make sure Nafxcwd.lib appears before/above Libcmtd.lib. Click OK to apply the change and close project properties window.
11) In VS 2015 in Solution Explorer select ttmacro project and hit Alt-Enter to open its Properties.
12) Under Linker->Input add Nafxcwd.lib; Libcmtd.lib to Ignore Specific Default Libraries and Additional dependencies. Make sure Nafxcwd.lib appears before/above Libcmtd.lib. Under Configuration Properties->VC++ Directories add <path_to_Oniguruma>\src\ to Include Directories and Library Directories.
13) Click OK to apply the change and close project properties window.
14) In VS 2015 in Solution Explorer select ttpdlg project and hit Alt-Enter to open its Properties.
15) Under Configuration Properties->VC++ Directories add <path_to_Oniguruma>\src\ to Include Directories and Library Directories.
16) Click OK to apply the change and close project properties window.
17) Compile Oniguruma package. Open Command prompt window. Press Win-R then type cmd and hit Enter.
18) Set required environmental variables. From command prompt execute the file "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\vsvars32.bat". Double quotas are required if the path contains space(s).
19) Still in Command prompt window change directory to <path_to_Oniguruma>\ and execute make_win32.bat file.
20) Once Oniguruma is compiled make sure there are no errors and then close Command prompt window.
21) Open <path_to_Oniguruma>\src in file Explorer. Create copy of the file onig_s.lib and name it onig_sd.lib
22) Go back to VS 2015, in Solution Explorer select Solution 'ttermpro' (9 projects) and press Ctrl-Shift-B to build the solution.
23) in VS 2015 Save All files (Ctrl-Shift-S)
Thanks.
Best regards,
Boris
nan432
Newbie

Posts:
4
Joined: Mon Jan 02, 2017 8:30 am
by nan432 » Mon Jan 02, 2017 9:25 am
Hello,

Thank you very much for your post, I've got a headache of what to do since it is my first time using both tera term and oniguruma.
I could not check out Tera Term by using SVN, I've got some mismatch error, so I download the source code from this site: https://ttssh2.osdn.jp/index.html.en. I follow your steps, and I've got a lot of error like this one...
https://drive.google.com/file/d/0B2QU5In0ClP0aHpXOG9zR1BmUTg/view?usp=sharing

My windows is 64-bit. I tested with both 32 and 64 oniguruma library, and I've got the same error.

Could you help me to figure out what is the problem?

Thank you very much,

Best Regards,
Nana,
Odoth
Newbie

Posts:
3
Joined: Tue Dec 27, 2016 7:54 pm
by Odoth » Mon Jan 02, 2017 4:39 pm
Make sure to also install perl (ActivePerl is easiest).
Yutaka Hirata
TeraTerm Developer

Posts:
606
Joined: Wed Jan 12, 2005 2:35 pm
by Yutaka Hirata » Mon Jan 02, 2017 5:01 pm
Hi everyone,

Please refer to below document for building Tera Term.

http://ttssh2.osdn.jp/manual/en/reference/develop.txt

If you have any questions, please do not hesitate to contact me.
Thanks.
Best regards, Yutaka Hirata
(yutakakn at gmail.com)
http://hp.vector.co.jp/authors/VA013320/
nan432
Newbie

Posts:
4
Joined: Mon Jan 02, 2017 8:30 am
by nan432 » Tue Jan 03, 2017 5:38 am
Hello Yutaka Hirata,

Thank you very much for your guidance, I haven't figured that I also have to build the other library.

I followed exactly your steps for the libraries, except Oniguruma does not work:
1. PuTTY (used by TTSSH)
(1) Extract putty source into libs/putty directory.

3. OpenSSL (used by TTSSH)
(1) Extract openssl source into libs/openssl directory.
(2) When the libs/openssl/Makefile.bak file exists on the OpenSSL 1.0.0e or later, delete the file only once
(3) Launch 'Visual Studio 2005 Command Prompt' batch file from start menu.
(4) Move 'libs' directory on the command prompt. And run buildopenssl.bat.

4. Zlib (used by TTSSH)
(1) Extract zlib source into libs/zlib directory.
(2) Launch 'Visual Studio 2005 Command Prompt' batch file from start menu.
(3) Move 'libs' directory on the command prompt. And run buildzlib.bat.


I built Oniguruma using their guidance, I double click make_win32.bat and it does the rest. I make a copy onig_sd.lib from onig_s.lib

As the result, I've got the same error as yesterday:

Warning 1 warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/SAFESEH' specification D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\svnrev\svnrev.obj svnrev
Error 2 error LNK2019: unresolved external symbol _onig_version referenced in function _AboutDlg@16 D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpdlg\ttdlg.obj ttpdlg
Error 3 error LNK1120: 1 unresolved externals D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\Debug\ttpdlg.dll ttpdlg
Error 4 error LNK2019: unresolved external symbol _onig_error_code_to_str referenced in function _TTLSprintf D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 5 error LNK2001: unresolved external symbol _onig_error_code_to_str D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttmdde.obj ttpmacro
Error 6 error LNK2019: unresolved external symbol _onig_new referenced in function _TTLSprintf D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 7 error LNK2001: unresolved external symbol _onig_new D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttmdde.obj ttpmacro
Error 8 error LNK2019: unresolved external symbol _onig_free referenced in function _TTLSprintf D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 9 error LNK2001: unresolved external symbol _onig_free D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttmdde.obj ttpmacro
Error 10 error LNK2019: unresolved external symbol _onig_search referenced in function _TTLSprintf D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 11 error LNK2001: unresolved external symbol _onig_search D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttmdde.obj ttpmacro
Error 12 error LNK2019: unresolved external symbol _onig_region_new referenced in function _TTLSprintf D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 13 error LNK2001: unresolved external symbol _onig_region_new D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttmdde.obj ttpmacro
Error 14 error LNK2019: unresolved external symbol _onig_region_free referenced in function _TTLSprintf D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 15 error LNK2001: unresolved external symbol _onig_region_free D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttmdde.obj ttpmacro
Error 16 error LNK2019: unresolved external symbol _onig_end referenced in function _TTLSprintf D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 17 error LNK2001: unresolved external symbol _onig_end D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttmdde.obj ttpmacro
Error 18 error LNK2001: unresolved external symbol _OnigEncodingASCII D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 19 error LNK2001: unresolved external symbol _OnigEncodingASCII D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttmdde.obj ttpmacro
Error 20 error LNK2001: unresolved external symbol _OnigEncodingISO_8859_1 D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 21 error LNK2001: unresolved external symbol _OnigEncodingISO_8859_2 D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 22 error LNK2001: unresolved external symbol _OnigEncodingISO_8859_3 D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 23 error LNK2001: unresolved external symbol _OnigEncodingISO_8859_4 D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 24 error LNK2001: unresolved external symbol _OnigEncodingISO_8859_5 D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 25 error LNK2001: unresolved external symbol _OnigEncodingISO_8859_6 D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 26 error LNK2001: unresolved external symbol _OnigEncodingISO_8859_7 D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 27 error LNK2001: unresolved external symbol _OnigEncodingISO_8859_8 D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 28 error LNK2001: unresolved external symbol _OnigEncodingISO_8859_9 D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 29 error LNK2001: unresolved external symbol _OnigEncodingISO_8859_10 D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 30 error LNK2001: unresolved external symbol _OnigEncodingISO_8859_11 D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 31 error LNK2001: unresolved external symbol _OnigEncodingISO_8859_13 D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 32 error LNK2001: unresolved external symbol _OnigEncodingISO_8859_14 D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 33 error LNK2001: unresolved external symbol _OnigEncodingISO_8859_15 D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 34 error LNK2001: unresolved external symbol _OnigEncodingISO_8859_16 D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 35 error LNK2001: unresolved external symbol _OnigEncodingUTF8 D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 36 error LNK2001: unresolved external symbol _OnigEncodingUTF16_BE D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 37 error LNK2001: unresolved external symbol _OnigEncodingUTF16_LE D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 38 error LNK2001: unresolved external symbol _OnigEncodingUTF32_BE D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 39 error LNK2001: unresolved external symbol _OnigEncodingUTF32_LE D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 40 error LNK2001: unresolved external symbol _OnigEncodingEUC_JP D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 41 error LNK2001: unresolved external symbol _OnigEncodingEUC_TW D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 42 error LNK2001: unresolved external symbol _OnigEncodingEUC_KR D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 43 error LNK2001: unresolved external symbol _OnigEncodingEUC_CN D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 44 error LNK2001: unresolved external symbol _OnigEncodingSJIS D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 45 error LNK2001: unresolved external symbol _OnigEncodingKOI8_R D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 46 error LNK2001: unresolved external symbol _OnigEncodingCP1251 D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 47 error LNK2001: unresolved external symbol _OnigEncodingBIG5 D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 48 error LNK2001: unresolved external symbol _OnigEncodingGB18030 D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 49 error LNK2001: unresolved external symbol _OnigSyntaxASIS D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 50 error LNK2001: unresolved external symbol _OnigSyntaxPosixBasic D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 51 error LNK2001: unresolved external symbol _OnigSyntaxPosixExtended D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 52 error LNK2001: unresolved external symbol _OnigSyntaxEmacs D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 53 error LNK2001: unresolved external symbol _OnigSyntaxGrep D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 54 error LNK2001: unresolved external symbol _OnigSyntaxGnuRegex D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 55 error LNK2001: unresolved external symbol _OnigSyntaxJava D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 56 error LNK2001: unresolved external symbol _OnigSyntaxPerl D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 57 error LNK2001: unresolved external symbol _OnigSyntaxPerl_NG D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 58 error LNK2001: unresolved external symbol _OnigSyntaxRuby D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 59 error LNK2001: unresolved external symbol _OnigSyntaxRuby D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttmdde.obj ttpmacro
Error 60 error LNK2001: unresolved external symbol _OnigDefaultSyntax D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\ttpmacro\ttl.obj ttpmacro
Error 61 error LNK1120: 48 unresolved externals D:\Demo\ttssh2-trunk-r6554\trunk\teraterm\Debug\ttpmacro.exe ttpmacro


Does it have anything related to Oniguruma, and what did I do wrong?

I use windows 10 64-bit, visual studio 2013 community.

I am looking forward for your reply.

Best Regards,
Nana,
Yutaka Hirata
TeraTerm Developer

Posts:
606
Joined: Wed Jan 12, 2005 2:35 pm
by Yutaka Hirata » Tue Jan 03, 2017 9:31 am
Hi nan432,

Thank you for your feedback.
So, I found the project file of VS2013 was mistaken. I have been fixed
the problem into the SVN#6555. Please refer to below commit.

https://ja.osdn.net/projects/ttssh2/scm ... mmits/6555

Also, you must use the buildoniguruma6.bat file instead of buildoniguruma.bat
for building Oniguruma library. However, the description of develop.txt is mistaken.
I fixed the miss.

To tell the truth, I have confirmed that Tera Term could be built with
Visual Studio 2013 Community Edition. I put own archive at below site.

http://ttssh2.osdn.jp/snapshot/snapshot ... vs2013.zip

I am sorry to cause you inconvenience.
Best regards, Yutaka Hirata
(yutakakn at gmail.com)
http://hp.vector.co.jp/authors/VA013320/
nan432
Newbie

Posts:
4
Joined: Mon Jan 02, 2017 8:30 am
by nan432 » Wed Jan 04, 2017 12:24 am
Hi Yutaka Hirata,

Thank you very much for your support. It takes me two days to figure out what is wrong ^^.
Your code works perfectly, it is my wrong to make that error. I build Oniguruma library using x64 Native Tools Command Prompt, because I thought my computer is 64 bit. I should build it with x86. Now I could build it correctly and I could run it.

Again, thank you very much for your support.

Best Regards,
Nana,
Display posts from previous:
Sort by:

8 postsPage 1 of 1

Users browsing this forum: No registered users
cron