[Help] How to compile hMailServer using Visual Studio 2013

Use this forum if you want to discuss a problem or ask a question related to a hMailServer beta release.
mylove1289
New user
New user
Posts: 17
Joined: 2016-06-22 11:34
Location: Ha Noi, Viet Nam

[Help] How to compile hMailServer using Visual Studio 2013

Postby mylove1289 » 2016-06-22 12:05

Hi All,

I downloaded sourcode of hMailServer on GitHub.
Now, I want to compile it using Visual Studio 2013 to customize and extend functionality.
I have read "README.md" file on GitHub at link: https://github.com/hmailserver/hmailserver , but i still have not run.

Error when debug
error_debug.jpg


Please, Anyone can help me with detailed intruction.
Thanks for everything.

User avatar
Dravion
Senior user
Senior user
Posts: 704
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby Dravion » 2016-06-22 14:15

1)
If you only have Visual Studio 2013 Express Edition, you need at least Windows SDK
to be able to compile hMailServer core Server (not the GUI Clienttools
https://developer.microsoft.com/de-de/windows/downloads/windows-8-1-sdk

2)
To build the Clienttools (hMailServerAdmin) you need at least Visual C# 2013 Commumity edition

3)
You need to compile the BOOST Crossplatform Framework first. https://sourceforge.net/projects/boost/files/boost/1.61.0/

4)
You need to compile the Lib OpenSSL for SSL/TLS encryption https://www.openssl.org/source/openssl-1.0.2h.tar.gz (As part of this, you need to install Perl for Windows first: http://www.activestate.com/activeperl/downloads )

5)
You need to fix the hardcoded path in Visual Studio 2013 and register the hMailServerlibs
Environment variables and copy the needed boost and openssl binaries to it.

6)
For Setups you need the InnoDB Installer Kit:
http://www.jrsoftware.org/download.php/is.exe

7)
For regressiontests you need NUnit:
http://www.nunit.org/index.php?p=download

Its all in the readme
https://github.com/hmailserver/hmailserver

Tips:
Read and try to understand how COM/DCOM works (InProcessServers / OutOfProcess Servers)
(hMailServer is an OutOfProcess server if it comes to COM. https://msdn.microsoft.com/de-de/library/windows/desktop/ms683835(v=vs.85).aspx and hMailServer Networkcode depends
haevy on the BOOST Framework ASIO Netowking lib http://www.boost.org/doc/libs/1_61_0/doc/html/boost_asio.html
My experimental builds of hMailserver 32/64-Bit+Unicode
https://github.com/Dravion/hmailserver/releases

HMSInfo 32/64-Bit
https://github.com/Dravion/HMSInfo/releases

mylove1289
New user
New user
Posts: 17
Joined: 2016-06-22 11:34
Location: Ha Noi, Viet Nam

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby mylove1289 » 2016-06-24 10:00

Dear Mr. Dravion,

Thanks for your support.
I'm setting step by step following your intruction.
I will ask you to help if I get any problems

Best regard,

mylove1289
New user
New user
Posts: 17
Joined: 2016-06-22 11:34
Location: Ha Noi, Viet Nam

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby mylove1289 » 2016-07-02 15:34

Dravion wrote:5)
You need to fix the hardcoded path in Visual Studio 2013 and register the hMailServerlibs
Environment variables and copy the needed boost and openssl binaries to it.

6)
For Setups you need the InnoDB Installer Kit:
http://www.jrsoftware.org/download.php/is.exe



Dear Dravion,

I'm using Visual studio ultimate 2013 to compile sourcecode hMailServer.
Follow your instructions, I have completed the steps 1,2,3,4, and is stopped at step # 5

I tried but could not compile sourcecode in visual studio. please help me in detail the implementation steps 5 and 6.

Thank you very much for your support.
Best regards,

User avatar
Dravion
Senior user
Senior user
Posts: 704
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby Dravion » 2016-07-02 21:08

Build Tips for hMailServer
hMailServer source release: 5.6.5
Lib BOOST source release: 1_61_0
Lib OpenSSL source release: 1.0.2h

## Open Visual Stuidio 2013 (right click) "As Administrator"##
ATTENTION: Any previous hMailServer Registry configuration will be deleted! (but not your data)

1)
*In Visual Studio 2013 right click "hMailServer" in Solution Explorer
*Expand: "Configuration Properties">"C/C++">All Options:
Hint: Make Sure Configuration Dropdown is "Debug" Plaform: "Win32"

Edit the following entries in "Additional incude Directories"
from: $(hMailServerLibs)\boost_1_57_0
to..: $(hMailServerLibs)\boost_1_61_0
from: $(hMailServerLibs)\openssl-1.0.1t\inc32
to..: $(hMailServerLibs)\openssl-1.0.2h\inc32

Click OK

1.a)
Open "stdafx.h" and insert at the end of file
//update cache - click "Save all", remove //update cache and "Save all" again.
This will force recompilation of the cached, precompiled headers.

2)
*In Visual Studio 2013 right click "hMailServer" in Solution Explorer
*Expand: "Configuration Properties">"Linker">All Options:
Hint: Make Sure Configuration Dropdown is "Debug" Plaform: "Win32"

Edit the following entries in "Additional Library Dependencies"
from: $(hMailServerLibs)\boost_1_57_0
to..: $(hMailServerLibs)\boost_1_61_0
from: $(hMailServerLibs)\openssl-1.0.1t\inc32
to..: $(hMailServerLibs)\openssl-1.0.2h\inc32

Click OK

3)
*In Visual Studio 2013 right click "hMailServer" in Solution Explorer
*Expand: Configuration Properties>Build events>Post-Build Event>Post-Build Event
Hint: Make Sure Configuration Dropdown is set to "Debug" Plaform: "Win32"

Change the following entries in "Command Line"

FROM:
xcopy /F /Y $(hMailServerLibs)\openssl-1.0.1t\out32\libeay32.dll $(OutDir)
xcopy /F /Y $(hMailServerLibs)\openssl-1.0.1t\out32\ssleay32.dll $(OutDir)
"$(TargetPath)" /Register

TO:
xcopy /F /Y $(hMailServerLibs)\openssl-1.0.2h\out32\libeay32.dll $(configuration)
xcopy /F /Y $(hMailServerLibs)\openssl-1.0.2h\out32\ssleay32.dll $(configuration)
$(TargetPath) /Register

Click OK.

Now you are ready to build hMailServer Click Build->Build Solution to begin
the buildprocess (this will take a while)

ps:
If something goes wrong, please report back with a screenshot. If anything goes well,
your output should look like this :)
Untitled.png
My experimental builds of hMailserver 32/64-Bit+Unicode
https://github.com/Dravion/hmailserver/releases

HMSInfo 32/64-Bit
https://github.com/Dravion/HMSInfo/releases

mylove1289
New user
New user
Posts: 17
Joined: 2016-06-22 11:34
Location: Ha Noi, Viet Nam

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby mylove1289 » 2016-07-04 12:00

Dear Dravion,

I downloaded and used versions:
- hMailServer: download "Branch:master" version on github: https://github.com/hmailserver/hmailserver
- Lib Boost source release: 1_57_0
- Lib OpenSSL source release: 1.0.2a

According to your instructions in previous post, I have built successfully.
I'm really grateful to you, my output look like screenshot:
build_success_desktop.jpg

Now, when I'm running sourcecode on debug mode, I have received a error as screenshot:
error_debug.jpg

I think that hMailServer need to connect database or need to configure anything so that hMailServer program can run properly.
My purpose is to develop deduplication feature in hMailServer (example: when an email is sent from someone to a group (distribution list), it will only save a copy of messages on server storage and everyone in the group pointing to archived file).

Therefore, I look forward to your help the next steps that I have to do before I focus on the edit sourcecode, such as:
- connect hMailServer sourcecode to database (using MsSQL or MySQL,...)
- how to build setup program using InnoSetup
- some other things that I don't know,...

I hope to continue to receive your help, I really thank you very much.
Best regards,

User avatar
mattg
Moderator
Moderator
Posts: 17596
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby mattg » 2016-07-04 12:07

You could probably just do that with a script rather than a re-write of the source
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

mylove1289
New user
New user
Posts: 17
Joined: 2016-06-22 11:34
Location: Ha Noi, Viet Nam

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby mylove1289 » 2016-07-04 12:17

mattg wrote:You could probably just do that with a script rather than a re-write of the source


Hi mattg,

thanks for your comments, which can be a good idea for me
you did this problem yet, please guide or give me some suggestions

thank you very much.
Regards,

User avatar
Dravion
Senior user
Senior user
Posts: 704
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby Dravion » 2016-07-04 13:03

mylove1289 wrote:Dear Dravion,

I downloaded and used versions:
- hMailServer: download "Branch:master" version on github: https://github.com/hmailserver/hmailserver
- Lib Boost source release: 1_57_0
- Lib OpenSSL source release: 1.0.2a


Thats no problem. I try to use allways the latest BOOST Framework and OpenSSL Version, but your versions will do the job.

According to your instructions in previous post, I have built successfully.
I'm really grateful to you, my output look like screenshot:


Yes, it can be a little bit tricky but iam glad it works now for your :wink:

Now, when I'm running sourcecode on debug mode, I have received a error as screenshot:

This is not an Error and hMailServer.exe just runs fine as expected (notice the return code 0 (0x0) which
means the pogram (the hMailServer Service Exe) was successfully started, running and ended without
any error.

If you take a close look you see the "Errors" is reflectig missing Debug Symbol files of the Windows
Operating System itself. To get rid of the PDB Error messages do the following steps:

In Visul Studio 2013 goto the Debug Menue
1) Debug->Options and Settings
2) Expand "Debugg" and select "Symbols"


Check [x] Microsoft Symbol Servers
Set "Cache symbols in this Directory" to something like this: C:\dev\hmailserver\symcache or somthing.
symcache.png


After new build/rerun you will notice Visual Studio loads a lot of PDB files from Microsoft Debug Symbol
servers, this can take a few seconds or minutes, depending on your connection speed.

Debugging Tips:
hMailServer.exe is a Windows Service which means it runs in the Background without a Userinterface
(even not a Console interface). So the normal behavior is to run silent in the Background. Obviously this
is not verry developer friendly and just for this Martin (the Inventor of hMailServer) implemented a
"/Debug" switch to make sure hMailServer doesnt simply quit if started from Visual Studio in a Debugging
Session. To make sure hMailServer.exe runs in a console Window and stays open do the following steps

1) Rightclick the hMailServer Project in Visual Studio Solution Explorer and click properties
2) Expand Configuration and Properties > Debugging
3) Insert /Debug in the field Command Arguments and click ok
4) Rerun your Debug session
Attachments
hmsdebug.jpg
My experimental builds of hMailserver 32/64-Bit+Unicode
https://github.com/Dravion/hmailserver/releases

HMSInfo 32/64-Bit
https://github.com/Dravion/HMSInfo/releases

User avatar
mattg
Moderator
Moderator
Posts: 17596
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby mattg » 2016-07-04 14:05

mylove1289 wrote:
mattg wrote:You could probably just do that with a script rather than a re-write of the source


Hi mattg,

thanks for your comments, which can be a good idea for me
you did this problem yet, please guide or give me some suggestions

thank you very much.
Regards,

Not exactly the same, but close.

This user saved attachments to a networked drive, and replaced the attachment with a link embedded into the email.
viewtopic.php?t=21325

I'm guessing that all recipients in the distribution list are LOCAL users
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

mylove1289
New user
New user
Posts: 17
Joined: 2016-06-22 11:34
Location: Ha Noi, Viet Nam

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby mylove1289 » 2016-07-05 10:58

If you take a close look you see the "Errors" is reflectig missing Debug Symbol files of the Windows
Operating System itself. To get rid of the PDB Error messages do the following steps:

In Visul Studio 2013 goto the Debug Menue
1) Debug->Options and Settings
2) Expand "Debugg" and select "Symbols"


Check [x] Microsoft Symbol Servers
Set "Cache symbols in this Directory" to something like this: C:\dev\hmailserver\symcache or somthing.
symcache.png

After new build/rerun you will notice Visual Studio loads a lot of PDB files from Microsoft Debug Symbol
servers, this can take a few seconds or minutes, depending on your connection speed.

Debugging Tips:
hMailServer.exe is a Windows Service which means it runs in the Background without a Userinterface
(even not a Console interface). So the normal behavior is to run silent in the Background. Obviously this
is not verry developer friendly and just for this Martin (the Inventor of hMailServer) implemented a
"/Debug" switch to make sure hMailServer doesnt simply quit if started from Visual Studio in a Debugging
Session. To make sure hMailServer.exe runs in a console Window and stays open do the following steps

1) Rightclick the hMailServer Project in Visual Studio Solution Explorer and click properties
2) Expand Configuration and Properties > Debugging
3) Insert /Debug in the field Command Arguments and click ok
4) Rerun your Debug session


Dear Dravion,

thanks for your tips, it works fine for me.
after I have completed the steps above, I run hMailServer at bebug mode is get results (as the console window like you said)
debug_console.jpg

Now, I am very confused about the next steps. Before I can edit something with sourcecode, I think I will have to complete two tasks as guide on GitHub:
- Compile the solution hmailserver\source\Tools\hMailServer Tools.sln. This will build hMailServer related tools, such as hMailServer Administrator and hMailServer DB Setup.
- Compile hmailserver\installation\hMailServer.iss (using InnoSetup) This will build the hMailServer installation program.

when i debug hMailServer Administrator tool, i received error as below:
debug_administrator_tool.jpg

with the task of building deduplication feature as I said in the previous post, please help me the next steps I have to do.
thanks for your great support.
Best regards,

mylove1289
New user
New user
Posts: 17
Joined: 2016-06-22 11:34
Location: Ha Noi, Viet Nam

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby mylove1289 » 2016-07-05 11:01

mattg wrote:Not exactly the same, but close.

This user saved attachments to a networked drive, and replaced the attachment with a link embedded into the email.
viewtopic.php?t=21325

I'm guessing that all recipients in the distribution list are LOCAL users

thanks for your sharing,
as you said, this topic not exactly the same but similar to my purpose

I will learn more and try your way...
Best regards,

User avatar
Dravion
Senior user
Senior user
Posts: 704
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby Dravion » 2016-07-05 14:16

The Errors you receive is because the Tools Solution is set to x64 bit and therefore needs a x64
hMailServer buildrun.

However:
The easiest steps to solve the problem is to change config of the Tools Solution Workspace to x86 and
not x64, then the hMailServer tools will compile just fine.
My experimental builds of hMailserver 32/64-Bit+Unicode
https://github.com/Dravion/hmailserver/releases

HMSInfo 32/64-Bit
https://github.com/Dravion/HMSInfo/releases

mylove1289
New user
New user
Posts: 17
Joined: 2016-06-22 11:34
Location: Ha Noi, Viet Nam

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby mylove1289 » 2016-07-05 18:21

Dravion wrote:The Errors you receive is because the Tools Solution is set to x64 bit and therefore needs a x64
hMailServer buildrun.

However:
The easiest steps to solve the problem is to change config of the Tools Solution Workspace to x86 and
not x64, then the hMailServer tools will compile just fine.

Wonderful, hMailServer is build successful after your guide,
when i run Administrator project in debug mode, program requires a database connection.
error_connect_database.jpg

after that, I switched to run BDSetup project in debug mode and configure a database connection.
I'm using Microsoft SQL Server 2008 R2 Express and choose database service as service dependency for hMailServer
I seen that the program has created a database but not create tables (as screenshot)
error_create_database.jpg

please help me...

User avatar
Dravion
Senior user
Senior user
Posts: 704
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby Dravion » 2016-07-05 19:18

Hmm i think you getting this error because you running the DBSetup Program from Visual Studio but
in the real world it will be invoked by Setup and if hMailServer is allready installed. I think it detects
the current Working directory which points to a wrong location.

From here you have multiple Options:


1) Locate the need SQL-Script
(in my case it can be found under this path)
C:\dev\VS2013\hmailserver\source\DBScripts\CreateTablesMSSQL.sql

2)
Start SQL-Server Management Studio
"C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\Ssms.exe"
Switch to the allready (by DBSetup) created hMailServer database.

3)
Open C:\dev\VS2013\hmailserver\source\DBScripts\CreateTablesMSSQL.sql in SQLServer Management
studio and just execute the SQL script, all tables should be created as needed.

4)
Try reconnect / restart of hMailServer.exe from within Visual Studio and lookout for errors.

Second Option:
1)
Just download hMailServer production release hMailServer-5.6.5-B2367.exe
https://www.hmailserver.com/download_fi ... loadid=254 and do a full install for MSSQL-Server
and start the Server the normal way.

2)
Login via hMailServerAdmin, setup settings ect. Logout and stop the hMailServer Windows service.
Go back into Visual Studio and restart hMailServerAdmin from Tools project Workspace.
If anything is fine and dandy, hMailServer service should be automatically launched and connected
to MSSQL and hMailServerAdmin should ask for a password to login :wink:

Good luck
My experimental builds of hMailserver 32/64-Bit+Unicode
https://github.com/Dravion/hmailserver/releases

HMSInfo 32/64-Bit
https://github.com/Dravion/HMSInfo/releases

mylove1289
New user
New user
Posts: 17
Joined: 2016-06-22 11:34
Location: Ha Noi, Viet Nam

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby mylove1289 » 2016-07-07 06:50

Dravion wrote:Second Option:
1)
Just download hMailServer production release hMailServer-5.6.5-B2367.exe
https://www.hmailserver.com/download_fi ... loadid=254 and do a full install for MSSQL-Server
and start the Server the normal way.

2)
Login via hMailServerAdmin, setup settings ect. Logout and stop the hMailServer Windows service.
Go back into Visual Studio and restart hMailServerAdmin from Tools project Workspace.
If anything is fine and dandy, hMailServer service should be automatically launched and connected
to MSSQL and hMailServerAdmin should ask for a password to login :wink:

Good luck

following your guide, i have created database and insert all tables (as screenshot)
create_database.jpg

but when i run Administrator Tools on debug mode, I still don't connect to MSSQL
no_connect_database.jpg

I think that I must edit code to connect between Administrator Tools and MSSQL, but I still don't know how to do it. please help me...

Another question I want to ask you:
- solution hmailserver\source\Server\hMailServer\hMailServer.sln will build the hMailServer server-part (hMailServer.exe)
- solution hmailserver\source\Tools\hMailServer Tools.sln will build hMailServer Administrator (which is encapsulated into installations)
Therefore, when editing the source code of the hMailServer solution, it affects how to build hMailServer Administrator Tools.

User avatar
Dravion
Senior user
Senior user
Posts: 704
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby Dravion » 2016-07-07 11:41

You running in this problems because you need some registry settings and a valid hMailServer.ini config file.
To make this work the simples way is to just install a ordinary hMailServer Setup

Just download and install hMailServer
https://www.hmailserver.com/download_file?downloadid=254

After this, goto Windows Computer Management and stop hMailServer, go back to Visual Studio and build/restart hMailServer with the password of your former hMailServer setup. Info: hMailServer from visual Studio will override the needed registry settings automatically and redirects all calls to your compiled hMailServer.exe in your development directory
(DONT TRY TO RUN AND BUILD HMAILSERVER from Visual Studio ON A PRODUCTION SYSTEM)!.
This is only needed to get started. Later, if you build the Installer, all registry settings for your build will setup correctly,
so there is no need to mess arround for customers - this is just needed for your Visual Studio Environment.
My experimental builds of hMailserver 32/64-Bit+Unicode
https://github.com/Dravion/hmailserver/releases

HMSInfo 32/64-Bit
https://github.com/Dravion/HMSInfo/releases

User avatar
martin
Developer
Developer
Posts: 6774
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby martin » 2016-07-08 09:58

Is there any error in the instructions on how to compile hMailServer?

https://github.com/hmailserver/hmailser ... /README.md

Slightly confused by reading this thread. The version of OpenSSL pointed out earlier in this thread is not the one used by hMailServer. If you just pick another version, hMailServer might not work and you'll run into extra work such as doing manual tweaks to the configuration file. Nor should you have to set up the "Additional include directories" if you follow the instructions.
Martin Knafve
martin@hmailserver.com
https://twitter.com/knafve

User avatar
Dravion
Senior user
Senior user
Posts: 704
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby Dravion » 2016-07-08 11:28

@Martin

There is indeed a plenty of things wrong or missleading.

*Hardcoded file and path entries (i allready created an issue on GitHub, do you remember?)
*On a fresh Visual Studio Installation all BOOST and OpenSSL path leading to nowhere because of PCH
*I tested the source on Visual Studio 2015 Enterprise x86 and i got over 120 errors on source level!!
*The Tools Workspace is set to x64 machines and will produce erros on first build without further infos.
*You didnt explain while you get 1 Million errors after successfull compilation (PDB symcache)
*In Innosetup there are also hardcoded path issues and i had to uncomment some lines to get a setup
*The NUnit regression test isnt documented in any shape or form.
Last edited by Dravion on 2016-07-08 11:43, edited 1 time in total.
My experimental builds of hMailserver 32/64-Bit+Unicode
https://github.com/Dravion/hmailserver/releases

HMSInfo 32/64-Bit
https://github.com/Dravion/HMSInfo/releases

mylove1289
New user
New user
Posts: 17
Joined: 2016-06-22 11:34
Location: Ha Noi, Viet Nam

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby mylove1289 » 2016-07-08 11:37

Dravion wrote:You running in this problems because you need some registry settings and a valid hMailServer.ini config file.
To make this work the simples way is to just install a ordinary hMailServer Setup

Just download and install hMailServer
https://www.hmailserver.com/download_file?downloadid=254

After this, goto Windows Computer Management and stop hMailServer, go back to Visual Studio and build/restart hMailServer with the password of your former hMailServer setup. Info: hMailServer from visual Studio will override the needed registry settings automatically and redirects all calls to your compiled hMailServer.exe in your development directory
(DONT TRY TO RUN AND BUILD HMAILSERVER from Visual Studio ON A PRODUCTION SYSTEM)!.
This is only needed to get started. Later, if you build the Installer, all registry settings for your build will setup correctly,
so there is no need to mess arround for customers - this is just needed for your Visual Studio Environment.


thank Dravion,
I follow your steps and when running "hMailServer Solution Tools", I get a message:
error_connect_database_Branch_master.jpg

Next, i run DBUpdater.exe in the installation directory (exp: C:\Program Files (x86)\hMailServer\Bin), i get a error
error_DBUpdater.jpg

Please help me, many thanks to you.

User avatar
martin
Developer
Developer
Posts: 6774
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby martin » 2016-07-08 12:04

Hardcoded file and path entries (i allready created an issue on GitHub, do you remember?)


Actually not. Care to link it? The only issue created by "Dravion" is the request for an alternative access protocol.

I tested the source on Visual Studio 2015 Enterprise x86 and i got over 120 errors on source level!!


But the instructions tells you to use VS2013. So not sure why you would try with another version.

Reading your other comments, I get the feeling that some essential part of the instructions is missing. Because these binaries are built on several machines with different paths set up without getting the issue you are getting.

Do you happen to have a link to the hardcoded file path issue? That seems like a good starting point to understand the issue.
Martin Knafve
martin@hmailserver.com
https://twitter.com/knafve

User avatar
martin
Developer
Developer
Posts: 6774
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby martin » 2016-07-08 12:07

mylove1289 wrote:thank Dravion,
I follow your steps and when running "hMailServer Solution Tools", I get a message:
error_connect_database_Branch_master.jpg
Next, i run DBUpdater.exe in the installation directory (exp: C:\Program Files (x86)\hMailServer\Bin), i get a error
error_DBUpdater.jpg
Please help me, many thanks to you.


1) Uninstall hMailServer
2) Delete the entire hMailServer directory
3) Install hMailServer 5.7 from the build server https://build.hmailserver.com/viewLog.h ... =artifacts

You're using the source code for version 5.7, and the database version must match that one. But you installed an older version of hMailServer, so in your case the source code is not compatible with the database version. Installing the right version of the binaries will solve that.
Martin Knafve
martin@hmailserver.com
https://twitter.com/knafve

User avatar
Dravion
Senior user
Senior user
Posts: 704
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby Dravion » 2016-07-09 01:58

martin wrote:
Hardcoded file and path entries (i allready created an issue on GitHub, do you remember?)


Actually not. Care to link it? The only issue created by "Dravion" is the request for an alternative access protocol.

I tested the source on Visual Studio 2015 Enterprise x86 and i got over 120 errors on source level!!


But the instructions tells you to use VS2013. So not sure why you would try with another version.

Sure, but VS2015 is now out there quite some time and had some Servicepacks and 2016 is on the way.
You need to migrate the source in some point in time. I played a bit arround with it, degrading some Warning level to /w2 and supress/disable some Warnings but without effect, i think there is code in the
repo which isnt supported any longer by VS2015 and newer. Sure this isnt priority right now.

Reading your other comments, I get the feeling that some essential part of the instructions is missing. Because these binaries are built on several machines with different paths set up without getting the issue you are getting.


This is no suprise. If you build it periodically on diffrent systems without reinstalling VS and the SDK
it will work, until you install a new Version of VS. Precompiled Headers are a Major problem and can
easy lead to a Visual Studio Setup which cannot compile the source regardles if you step up every step
in your readme or not.

Do you happen to have a link to the hardcoded file path issue? That seems like a good starting point to understand the issue.


Take out the Version numbers! This will break the Soluation Workspace on every little change and is a permant source of trouble!

$(hMailServerLibs)\boost_1_57_0

Your settings:
xcopy /F /Y $(hMailServerLibs)\openssl-1.0.1t\out32\libeay32.dll $(OutDir)
xcopy /F /Y $(hMailServerLibs)\openssl-1.0.1t\out32\ssleay32.dll $(OutDir)
"$(TargetPath)" /Register

Other people settings:
xcopy /F /Y $(hMailServerLibs)\openssl-1.0.2h\out32\libeay32.dll $(configuration)
xcopy /F /Y $(hMailServerLibs)\openssl-1.0.2h\out32\ssleay32.dll $(configuration)
$(TargetPath) /Register


I had to change the output dir to $(configuration) because on a VS 2013 Ultimate Setup
it fail and you need to modidy path settings before you can enter the debugger.

ps:
I would be very cool if you precompile your used BOOST and OpenSSL DLL's so thirdparty developer doesnt need to build them. I have no problem to get it done but others do.
My experimental builds of hMailserver 32/64-Bit+Unicode
https://github.com/Dravion/hmailserver/releases

HMSInfo 32/64-Bit
https://github.com/Dravion/HMSInfo/releases

User avatar
martin
Developer
Developer
Posts: 6774
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby martin » 2016-07-11 14:47

I'm trying to understand what is incorrect in the instructions on github. The instruction tells you to set up an environment variable calling hMailServerLibs and place boost_1_57_0 in it so that the hMailServerLibs points at for example C:\Dev\hMailLibs and Boost then is under C:\Dev\hMailLibs\boost_1_57_0. Have you done this? Why would the version numbers cause a problem - are you trying to use other unsupported versions of the 3rd party libraries for some reason?
Martin Knafve
martin@hmailserver.com
https://twitter.com/knafve

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby percepts » 2016-07-11 23:15

I haven't been following this specific topic but I can tell you that when I compiled with VS2013 Express Desktop as per instructions on github I had problems until I installed VS2013 express Web.
Matt had same problem which installing VS2013 express Web resolved for him too.

We never did work out what was missing in VS2013 Express Desktop that stopped compile from working.

I note that the version of VS2013 Express now available from microsoft is only valid for one month I think. They seem to be pushing towards VS2015 which has the very big benefit of having everything for IOS and Android compiles built in which I think many people will want. (Yes I know its nothing to do with hmail but if you want a compiler which compiles for IOS and Android Apps then its much easier if you only need the one).

So moving to VS2015 Community version would be cool :wink:

As to OPs problem, you might want to try installing VS2013 Express Web and see if that resolves your problem. I'm not sure if its relevant for this problem or not.

And are there differencess between VS2013 and VS2013 Express Desktop? I think so and they need to be identified.

mylove1289
New user
New user
Posts: 17
Joined: 2016-06-22 11:34
Location: Ha Noi, Viet Nam

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby mylove1289 » 2016-07-13 08:33

martin wrote:1) Uninstall hMailServer
2) Delete the entire hMailServer directory
3) Install hMailServer 5.7 from the build server https://build.hmailserver.com/viewLog.h ... =artifacts

You're using the source code for version 5.7, and the database version must match that one. But you installed an older version of hMailServer, so in your case the source code is not compatible with the database version. Installing the right version of the binaries will solve that.


thank Martin, it works fine for me.

P/s: I have used hMailServer recently. When I build hMailServer, I've followed the instructions on github but if without the guidance of Dravion, I can not build success. So I think that should be some detailed instructions on Github.

Best regards,

User avatar
martin
Developer
Developer
Posts: 6774
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby martin » 2016-07-13 16:08

Yes I understand. It seems your issue related to compilation was just because you had placed Boost in the wrong place in relation to the hMailServerLibs system variable. So the solution to your problem would be to fix that, to make sure that the correct version of Boost is placed in the correct place in relation to the system variable. That should take a few minutes at most. The instructions Dravion gave you to solve that problem was incorrect - he told you to use another incorrect version of both Boost and OpenSSL and then manually tweak the hMailServer project file to use those incorrect version instead, which is a lot more work than just using the right version. That solution may get everything to compile, but the software binaries may not work properly at all. hMailServer is not tested with those versions of the 3rd party libraries and I know for a fact that there was some kind of issue when using the 1.0.2-branch of OpenSSL.
Martin Knafve
martin@hmailserver.com
https://twitter.com/knafve

mylove1289
New user
New user
Posts: 17
Joined: 2016-06-22 11:34
Location: Ha Noi, Viet Nam

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby mylove1289 » 2016-07-13 16:50

Dear Martin,
thanks for your infomation,
Best regards,

User avatar
Dravion
Senior user
Senior user
Posts: 704
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby Dravion » 2016-07-13 16:58

Martin, you wrong.

If you carefully read Myloves posts you will find out he didnt change the settings as i recommended.
And its untrue thadt the source doesnt work with updto OpenSSL and Boost libs, i compiled the sources
myself and it works as expected.

Your guide lacks about howto correctly setup the Visual Studio working environment correctly,
howto rebuilt the procompiled headers, howto setup the vs debug symcache, howto set the Debug
mode correctly ect.
My experimental builds of hMailserver 32/64-Bit+Unicode
https://github.com/Dravion/hmailserver/releases

HMSInfo 32/64-Bit
https://github.com/Dravion/HMSInfo/releases

User avatar
martin
Developer
Developer
Posts: 6774
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby martin » 2016-07-13 17:34

Dravion, my point is that you don't have to change the settings if you follow the instructions and use the actual versions of OpenSSL and Boost which hMailServer use. If you try to use other unsupported versions of 3rd party libraries than manual work is required, but that's really not recommended and not necessary. If you know some setting which must be changed then please let me know which one and I'll fix it in the instructions.

> And its untrue thadt the source doesnt work with updto OpenSSL and Boost libs, i compiled the sources myself and it works as expected.

The OpenSSL issue I saw seemed to happen specifically on Vista and Windows Server 2008. The issue was that roughly 1 time out of 100, the connection was dropped incorrectly. Did you test that scenario on Vista?

> howto rebuilt the procompiled headers

This is done automatically by Visual Studio. Precompiled headers are built when you build the solution. Sometimes Visual Studio doesn't understand that the PCH needs rebuilding and then a clean/build is needed. But that's more of "common Visual Studio debugging knowledge" which I don't think should be covered in every documentation on how to build software.

> howto setup the vs debug symcache

This is not necessary to debug hMailServer. I don't have this set up myself.
Martin Knafve
martin@hmailserver.com
https://twitter.com/knafve

User avatar
mattg
Moderator
Moderator
Posts: 17596
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby mattg » 2016-07-30 03:36

martin wrote:3) Install hMailServer 5.7 from the build server https://build.hmailserver.com/viewLog.h ... =artifacts

This link should be on the github main hmailserver page, in environment setup section please.
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

tester02
New user
New user
Posts: 24
Joined: 2016-04-09 23:28

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby tester02 » 2016-07-31 20:58

https://build.hmailserver.com/viewType. ... ilServer57

Please juse the link above, because you can see the changes AND download the appropriate version AND it contains all recent build ids.

User avatar
mattg
Moderator
Moderator
Posts: 17596
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby mattg » 2016-08-06 02:27

mattg wrote:
martin wrote:3) Install hMailServer 5.7 from the build server https://build.hmailserver.com/viewLog.h ... =artifacts

This link should be on the github main hmailserver page, in environment setup section please.


Doing this step, I didn't get asked for an installation directory like I have in previous versions.
It automatically installed in C:/Program Files/hMailserver/

I suspect that this will problematic with Windows default permissions for anything in that c:/Program Files/ name space. (Windows Server 2012 or Windows 8.x or higher)
Data and logs especially are going to be trouble stored there... They should be in c:/ProgramData/hMailserver/ or similar by windows default naming convention

I normally install to C:/hMailsevrer/ for better permissions control

This is a NEW Windows 10 Pro VM.
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
Dravion
Senior user
Senior user
Posts: 704
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby Dravion » 2016-08-06 05:37

It should not be an problem because hMailServer.exe is running with permissions of localmachine user (which is an alias of the NT SYSTEM user) which has the highest permisdions possible on a Windows NT series Operating System (its like the root user on linux/unix).
This user doesnt care about User Account Control or any restrictions at all.

But, you are right. Its bad design/practice to write
in c:\program files (x86)\namespace and
c:\program files\namespace even as windows service instead of c:\programdata\namespace and running with the highest user permission user on the internet.

If some one finds a bufferoverflow in hmailserver.exe tcp code and injects malicious shell code your entire machine with all data is doomed or under foreign control...
My experimental builds of hMailserver 32/64-Bit+Unicode
https://github.com/Dravion/hmailserver/releases

HMSInfo 32/64-Bit
https://github.com/Dravion/HMSInfo/releases

User avatar
RvdH
Senior user
Senior user
Posts: 458
Joined: 2008-06-27 14:42
Location: Netherlands

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby RvdH » 2016-08-10 14:48

I can confirm Martin's directions in the readme on how to compile hMailserver (5.6.x) work perfectly with 3th party libraries used by hmailserver (eg: without updating boost/openssl)
CIDR to RegEx: d-fault.nl/CIDRtoRegEx
DNS Lookup: d-fault.nl/DNSTools
DNSBL Lookup: d-fault.nl/DNSBLLookup
GEOIP Lookup: d-fault.nl/GeoipLookup

User avatar
SorenR
Senior user
Senior user
Posts: 2327
Joined: 2006-08-21 15:38
Location: Denmark

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby SorenR » 2016-08-10 15:18

RvdH wrote:I can confirm Martin's directions in the readme on how to compile hMailserver (5.6.x) work perfectly with 3th party libraries used by hmailserver (eg: without updating boost/openssl)

+1

Except I had the same problem as Matt... Had to install VS2013 Express for Web on top of VS2013 Express for Desktop to make everything compile...

Now running VS2013 Express Update 5 on Windows 10 "Anniversary Update" on a Dell D610 laptop, 2GB RAM, 1.6MHz Pentium M.

Yeah... Takes minimum 20 minutes to compile :roll:
SørenR.

The quantum rule of insecurity which states that the act of observing how vulnerable a host or service is changes the insecurity level of the service.

ivanaT94
New user
New user
Posts: 7
Joined: 2017-04-14 20:07

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby ivanaT94 » 2017-04-14 20:14

Hello everyone,
I am trying to compile hmailserver and i was following the instructions from the read me file and also the instructions that Dravion provided but i got bunch of errors. So if you can take a look at my errors and suggest what should i do to get it right. Thank you. These are the errors i get when i try to build the solution:

1.
Error 1 error C1083: Cannot open include file: 'boost/interprocess/windows_shared_memory.hpp': No such file or directory E:\diplomska\hmailserver-master\hmailserver\source\Server\hMailServer.Minidump\hMailServer.Minidump.cpp 9 1 hMailServer.Minidump
Error 2 error C1001: An internal error has occurred in the compiler. C:\hMailServerLibs\boost_1_63_0\boost\type_traits\common_type.hpp 43 1 hMailServer
3 IntelliSense: cannot open source file "boost/interprocess/windows_shared_memory.hpp" e:\diplomska\hmailserver-master\hmailserver\source\Server\hMailServer.Minidump\hMailServer.Minidump.cpp 9 1 hMailServer.Minidump
4 IntelliSense: cannot open source file "boost/interprocess/mapped_region.hpp" e:\diplomska\hmailserver-master\hmailserver\source\Server\hMailServer.Minidump\hMailServer.Minidump.cpp 10 1 hMailServer.Minidump
5 IntelliSense: name followed by '::' must be a class or namespace name e:\diplomska\hmailserver-master\hmailserver\source\Server\hMailServer.Minidump\hMailServer.Minidump.cpp 14 17 hMailServer.Minidump
6 IntelliSense: identifier "windows_shared_memory" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\hMailServer.Minidump\hMailServer.Minidump.cpp 107 7 hMailServer.Minidump
7 IntelliSense: identifier "open_only" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\hMailServer.Minidump\hMailServer.Minidump.cpp 107 34 hMailServer.Minidump
8 IntelliSense: expected a ')' e:\diplomska\hmailserver-master\hmailserver\source\Server\hMailServer.Minidump\hMailServer.Minidump.cpp 107 43 hMailServer.Minidump
9 IntelliSense: identifier "mapped_region" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\hMailServer.Minidump\hMailServer.Minidump.cpp 109 7 hMailServer.Minidump
10 IntelliSense: expected a ')' e:\diplomska\hmailserver-master\hmailserver\source\Server\hMailServer.Minidump\hMailServer.Minidump.cpp 109 31 hMailServer.Minidump
11 IntelliSense: name followed by '::' must be a class or namespace name e:\diplomska\hmailserver-master\hmailserver\source\Server\hMailServer.Minidump\hMailServer.Minidump.cpp 119 11 hMailServer.Minidump
2.
Error 1 error C1083: Cannot open include file: 'boost/interprocess/windows_shared_memory.hpp': No such file or directory E:\diplomska\hmailserver-master\hmailserver\source\Server\hMailServer.Minidump\hMailServer.Minidump.cpp 9 1 hMailServer.Minidump
Error 2 error C1001: An internal error has occurred in the compiler. C:\hMailServerLibs\boost_1_63_0\boost\type_traits\common_type.hpp 43 1 hMailServer
3 IntelliSense: incomplete type is not allowed e:\diplomska\hmailserver-master\hmailserver\source\Server\COM\InterfaceMessageIndexing.h 18 21 hMailServer
4 IntelliSense: expected a ';' e:\diplomska\hmailserver-master\hmailserver\source\Server\COM\InterfaceMessageIndexing.h 18 46 hMailServer
5 IntelliSense: invalid specifier outside a class declaration e:\diplomska\hmailserver-master\hmailserver\source\Server\COM\InterfaceMessageIndexing.h 52 4 hMailServer
6 IntelliSense: invalid specifier outside a class declaration e:\diplomska\hmailserver-master\hmailserver\source\Server\COM\InterfaceMessageIndexing.h 53 4 hMailServer
7 IntelliSense: invalid specifier outside a class declaration e:\diplomska\hmailserver-master\hmailserver\source\Server\COM\InterfaceMessageIndexing.h 55 4 hMailServer
8 IntelliSense: invalid specifier outside a class declaration e:\diplomska\hmailserver-master\hmailserver\source\Server\COM\InterfaceMessageIndexing.h 56 4 hMailServer
9 IntelliSense: invalid specifier outside a class declaration e:\diplomska\hmailserver-master\hmailserver\source\Server\COM\InterfaceMessageIndexing.h 58 4 hMailServer
10 IntelliSense: invalid specifier outside a class declaration e:\diplomska\hmailserver-master\hmailserver\source\Server\COM\InterfaceMessageIndexing.h 59 4 hMailServer
11 IntelliSense: expected a declaration e:\diplomska\hmailserver-master\hmailserver\source\Server\COM\InterfaceMessageIndexing.h 60 1 hMailServer
12 IntelliSense: expected a declaration e:\diplomska\hmailserver-master\hmailserver\source\Server\COM\InterfaceMessageIndexing.h 63 1 hMailServer
13 IntelliSense: this declaration has no storage class or type specifier e:\diplomska\hmailserver-master\hmailserver\source\Server\COM\InterfaceMessageIndexing.h 65 1 hMailServer
14 IntelliSense: expected a ')' e:\diplomska\hmailserver-master\hmailserver\source\Server\COM\InterfaceMessageIndexing.h 65 44 hMailServer
15 IntelliSense: expected a ';' e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 6 1 hMailServer
16 IntelliSense: namespace "std" has no member "shared_ptr" e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 29 19 hMailServer
17 IntelliSense: expected a ';' e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 29 29 hMailServer
18 IntelliSense: namespace "std" has no member "shared_ptr" e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 30 19 hMailServer
19 IntelliSense: expected a ';' e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 30 29 hMailServer
20 IntelliSense: declaration is incompatible with "BOOL __stdcall DeleteObject(HGDIOBJ ho)" (declared at line 3323 of "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\include\wingdi.h") e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 32 19 hMailServer
21 IntelliSense: namespace "std" has no member "shared_ptr" e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 32 37 hMailServer
22 IntelliSense: type name is not allowed e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 32 48 hMailServer
23 IntelliSense: identifier "pMessage" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 32 57 hMailServer
24 IntelliSense: namespace "std" has no member "shared_ptr" e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 33 35 hMailServer
25 IntelliSense: type name is not allowed e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 33 46 hMailServer
26 IntelliSense: identifier "pMessage" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 33 55 hMailServer
27 IntelliSense: namespace "std" has no member "shared_ptr" e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 34 35 hMailServer
28 IntelliSense: type name is not allowed e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 34 46 hMailServer
29 IntelliSense: identifier "pMessage" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 34 55 hMailServer
30 IntelliSense: expected a ')' e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 34 63 hMailServer
31 IntelliSense: explicit type is missing ('int' assumed) e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 35 35 hMailServer
32 IntelliSense: expected a ')' e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 35 50 hMailServer
33 IntelliSense: declaration is incompatible with "bool LockObject(long long ObjectID)" (declared at line 36) e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 37 19 hMailServer
34 IntelliSense: namespace "std" has no member "shared_ptr" e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 37 35 hMailServer
35 IntelliSense: type name is not allowed e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 37 46 hMailServer
36 IntelliSense: identifier "pMessage" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 37 55 hMailServer
37 IntelliSense: namespace "std" has no member "shared_ptr" e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 38 37 hMailServer
38 IntelliSense: type name is not allowed e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 38 48 hMailServer
39 IntelliSense: identifier "pMessage" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 38 57 hMailServer
40 IntelliSense: declaration is incompatible with "BOOL __stdcall DeleteFileW(LPCWSTR lpFileName)" (declared at line 9529 of "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\include\winbase.h") e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 40 19 hMailServer
41 IntelliSense: namespace "std" has no member "shared_ptr" e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 40 35 hMailServer
42 IntelliSense: type name is not allowed e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 40 46 hMailServer
43 IntelliSense: identifier "account" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 40 61 hMailServer
44 IntelliSense: expected a ')' e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 40 68 hMailServer
45 IntelliSense: identifier "String" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 42 38 hMailServer
46 IntelliSense: namespace "std" has no member "shared_ptr" e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 43 35 hMailServer
47 IntelliSense: identifier "DALRecordset" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 43 46 hMailServer
48 IntelliSense: identifier "pRS" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 43 60 hMailServer
49 IntelliSense: expected a ')' e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 43 63 hMailServer
50 IntelliSense: namespace "std" has no member "shared_ptr" e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 44 35 hMailServer
51 IntelliSense: type name is not allowed e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 44 46 hMailServer
52 IntelliSense: identifier "pMessage" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 44 55 hMailServer
53 IntelliSense: expected a ')' e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 44 63 hMailServer
54 IntelliSense: namespace "std" has no member "shared_ptr" e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 45 35 hMailServer
55 IntelliSense: type name is not allowed e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 45 46 hMailServer
56 IntelliSense: identifier "pMessage" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 45 55 hMailServer
57 IntelliSense: expected a ')' e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 45 63 hMailServer
58 IntelliSense: incomplete type is not allowed e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 48 19 hMailServer
59 IntelliSense: namespace "std" has no member "shared_ptr" e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 48 44 hMailServer
60 IntelliSense: type name is not allowed e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 48 55 hMailServer
61 IntelliSense: identifier "account" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 48 70 hMailServer
62 IntelliSense: expected a ')' e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 48 77 hMailServer
63 IntelliSense: identifier "String" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 50 48 hMailServer
64 IntelliSense: namespace "std" has no member "shared_ptr" e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 50 77 hMailServer
65 IntelliSense: expected a ')' e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 50 87 hMailServer
66 IntelliSense: identifier "String" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 51 46 hMailServer
67 IntelliSense: namespace "std" has no member "shared_ptr" e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 51 75 hMailServer
68 IntelliSense: expected a ')' e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 51 85 hMailServer
69 IntelliSense: identifier "AnsiString" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 61 14 hMailServer
70 IntelliSense: identifier "String" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 61 42 hMailServer
71 IntelliSense: identifier "AnsiString" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 62 14 hMailServer
72 IntelliSense: identifier "String" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 62 42 hMailServer
73 IntelliSense: identifier "AnsiString" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 63 14 hMailServer
74 IntelliSense: identifier "String" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 63 40 hMailServer
75 IntelliSense: identifier "String" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 65 14 hMailServer
76 IntelliSense: namespace "std" has no member "shared_ptr" e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 65 38 hMailServer
77 IntelliSense: type name is not allowed e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 65 49 hMailServer
78 IntelliSense: identifier "message" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 65 64 hMailServer
79 IntelliSense: identifier "String" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 66 14 hMailServer
80 IntelliSense: namespace "std" has no member "shared_ptr" e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 66 38 hMailServer
81 IntelliSense: type name is not allowed e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 66 49 hMailServer
82 IntelliSense: identifier "message" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 66 64 hMailServer
83 IntelliSense: expected a ')' e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 66 71 hMailServer
84 IntelliSense: identifier "String" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 67 14 hMailServer
85 IntelliSense: namespace "std" has no member "shared_ptr" e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 67 38 hMailServer
86 IntelliSense: type name is not allowed e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 67 49 hMailServer
87 IntelliSense: identifier "account" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 67 64 hMailServer
88 IntelliSense: expected a ')' e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 67 71 hMailServer
89 IntelliSense: identifier "String" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 68 14 hMailServer
90 IntelliSense: namespace "std" has no member "shared_ptr" e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 68 38 hMailServer
91 IntelliSense: type name is not allowed e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 68 49 hMailServer
92 IntelliSense: identifier "account" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 68 64 hMailServer
93 IntelliSense: expected a ')' e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 68 71 hMailServer
94 IntelliSense: identifier "String" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 69 14 hMailServer
95 IntelliSense: declaration is incompatible with "<error-type> GetFileName" (declared at line 65) e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 69 21 hMailServer
96 IntelliSense: identifier "String" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 69 39 hMailServer
97 IntelliSense: namespace "std" has no member "shared_ptr" e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 69 68 hMailServer
98 IntelliSense: expected a ')' e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 69 78 hMailServer
99 IntelliSense: identifier "String" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 70 14 hMailServer
100 IntelliSense: identifier "String" is undefined e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 70 39 hMailServer
101 IntelliSense: namespace "std" has no member "shared_ptr" e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 70 68 hMailServer
102 IntelliSense: expected a ')' e:\diplomska\hmailserver-master\hmailserver\source\Server\Common\Persistence\PersistentMessage.h 70 78 hMailServer

User avatar
Dravion
Senior user
Senior user
Posts: 704
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby Dravion » 2017-04-14 21:20

Use boost 1.57.0 and no higher Version as Visual Studio 2013 + Updates
My experimental builds of hMailserver 32/64-Bit+Unicode
https://github.com/Dravion/hmailserver/releases

HMSInfo 32/64-Bit
https://github.com/Dravion/HMSInfo/releases

ivanaT94
New user
New user
Posts: 7
Joined: 2017-04-14 20:07

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby ivanaT94 » 2017-04-19 20:33

Hi again,
Thank you for your advise Dravion i used boost_1_57_0 now i don't get the previous errors, but now i get this other error and i assume it has something to do with the configuration of the linker but i added the path C:\hMailServerLibs\openssl-1.0.2k\inc32 to the linker in Additional Library Directories so i don't know what is the problem. Do you have any suggestions? Thank you again
error.png

ivanaT94
New user
New user
Posts: 7
Joined: 2017-04-14 20:07

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby ivanaT94 » 2017-04-19 21:02

Ok so i added additional directories where those files are but now i get all of this warnings that i don't know what they mean
er.png


And also i would like to ask about this step:
TO:
xcopy /F /Y $(hMailServerLibs)\openssl-1.0.2h\out32\libeay32.dll $(configuration)
xcopy /F /Y $(hMailServerLibs)\openssl-1.0.2h\out32\ssleay32.dll $(configuration)
$(TargetPath) /Register

wht paths should i add at $(configuration) and $(TargetPath)

Thank you

User avatar
Dravion
Senior user
Senior user
Posts: 704
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby Dravion » 2017-04-19 23:01

You need to %hMailServerLibs% as explained in the build guidelines. Dont edit this, some other things are linked to it.
My experimental builds of hMailserver 32/64-Bit+Unicode
https://github.com/Dravion/hmailserver/releases

HMSInfo 32/64-Bit
https://github.com/Dravion/HMSInfo/releases

ivanaT94
New user
New user
Posts: 7
Joined: 2017-04-14 20:07

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby ivanaT94 » 2017-04-20 11:29

I'm sorry but I don't quite understand what you are referring to.

ivanaT94
New user
New user
Posts: 7
Joined: 2017-04-14 20:07

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby ivanaT94 » 2017-04-23 20:41

Hello,
I am at the point where I have to compile hMailServer.iss using Inno Setup. The file hMailServer.Minidump.exe is needed but i can't locate it. Could someone tell me at what location should I find this file or maybe i don't have it?
Thank you.

User avatar
Dravion
Senior user
Senior user
Posts: 704
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: [Help] How to compile hMailServer using Visual Studio 2013

Postby Dravion » 2017-04-24 01:39

Check.your build targets and compile the minidump target. Make sure its the release version
My experimental builds of hMailserver 32/64-Bit+Unicode
https://github.com/Dravion/hmailserver/releases

HMSInfo 32/64-Bit
https://github.com/Dravion/HMSInfo/releases


Return to “Development & alpha discussions”



Who is online

Users browsing this forum: No registered users and 4 guests