[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

Post by 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: 1614
Joined: 2015-09-26 11:50
Location: Germany
Contact:

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

Post by 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/w ... ws-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/ ... st/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/librar ... s.85).aspx and hMailServer Networkcode depends
haevy on the BOOST Framework ASIO Netowking lib http://www.boost.org/doc/libs/1_61_0/do ... _asio.html

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

Post by 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

Post by 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: 1614
Joined: 2015-09-26 11:50
Location: Germany
Contact:

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

Post by 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

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

Post by 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: 20554
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

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

Post by 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

Post by 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: 1614
Joined: 2015-09-26 11:50
Location: Germany
Contact:

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

Post by 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

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

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

Post by 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

Post by 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

Post by 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: 1614
Joined: 2015-09-26 11:50
Location: Germany
Contact:

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

Post by 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.

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

Post by 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: 1614
Joined: 2015-09-26 11:50
Location: Germany
Contact:

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

Post by 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

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

Post by 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: 1614
Joined: 2015-09-26 11:50
Location: Germany
Contact:

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

Post by 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_fi ... loadid=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.

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

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

Post by 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: 1614
Joined: 2015-09-26 11:50
Location: Germany
Contact:

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

Post by 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.

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

Post by 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_fi ... loadid=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: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

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

Post by 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: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

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

Post by 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: 1614
Joined: 2015-09-26 11:50
Location: Germany
Contact:

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

Post by 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.

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

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

Post by 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

Post by 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

Post by 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: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

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

Post by 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

Post by mylove1289 » 2016-07-13 16:50

Dear Martin,
thanks for your infomation,
Best regards,

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

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

Post by 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.

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

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

Post by 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: 20554
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

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

Post by 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
Normal user
Normal user
Posts: 33
Joined: 2016-04-09 23:28

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

Post by 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: 20554
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

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

Post by 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: 1614
Joined: 2015-09-26 11:50
Location: Germany
Contact:

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

Post by 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...

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

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

Post by 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: 3328
Joined: 2006-08-21 15:38
Location: Denmark

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

Post by 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.

“With age comes wisdom, but sometimes age comes alone.”
- Oscar Wilde

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

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

Post by 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: 1614
Joined: 2015-09-26 11:50
Location: Germany
Contact:

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

Post by Dravion » 2017-04-14 21:20

Use boost 1.57.0 and no higher Version as Visual Studio 2013 + Updates

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

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

Post by 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

Post by 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: 1614
Joined: 2015-09-26 11:50
Location: Germany
Contact:

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

Post by 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.

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

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

Post by 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

Post by 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: 1614
Joined: 2015-09-26 11:50
Location: Germany
Contact:

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

Post by Dravion » 2017-04-24 01:39

Check.your build targets and compile the minidump target. Make sure its the release version

aulutas
New user
New user
Posts: 5
Joined: 2019-12-30 23:50

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

Post by aulutas » 2019-12-31 00:00

Hello. I downloaded all files on github and made setups on VS for building project which you discussed before, but i got these errors. Please help me for this issue.

Thanks by now.

***On my machine VS 2013 Ultimate Edition is installed, mapped to solution openssl-1.1.1d, boost_1_57_0 (even boost_1_61_0 version i got same errors.)

Error 1 error C1083: Cannot open include file: 'StdAfx.h': No such file or directory E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\Util\MiniDumpInput.cpp 4 1 hMailServer.Minidump
Error 2 error C1083: Cannot open include file: 'boost/interprocess/windows_shared_memory.hpp': No such file or directory E:\Projects\Hmail\hmailserver\hmailserver\source\Server\hMailServer.Minidump\hMailServer.Minidump.cpp 9 1 hMailServer.Minidump
Error 3 error C2146: syntax error : missing ';' before identifier 'GetPrependSubjectText' e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 54 1 hMailServer
Error 4 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 54 1 hMailServer
Warning 5 warning C4183: 'GetPrependSubjectText': missing return type; assumed to be a member function returning 'int' e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 54 1 hMailServer
Error 6 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 55 1 hMailServer
Error 7 error C2143: syntax error : missing ',' before '&' e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 55 1 hMailServer
Error 8 error C2146: syntax error : missing ';' before identifier 'GetSpamAssassinHost' e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 85 1 hMailServer
Error 9 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 85 1 hMailServer
Warning 10 warning C4183: 'GetSpamAssassinHost': missing return type; assumed to be a member function returning 'int' e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 85 1 hMailServer
Error 11 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 86 1 hMailServer
Error 12 error C2143: syntax error : missing ',' before '&' e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 86 1 hMailServer
Error 13 error C2061: syntax error : identifier 'XNode' e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 108 1 hMailServer
Error 14 error C2061: syntax error : identifier 'XNode' e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 109 1 hMailServer
Error 15 error C2039: 'shared_ptr' : is not a member of 'std' e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 111 1 hMailServer
Error 16 error C2143: syntax error : missing ';' before '<' e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 111 1 hMailServer
Error 17 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 111 1 hMailServer
Error 18 error C2238: unexpected token(s) preceding ';' e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 111 1 hMailServer
Error 19 error C2039: 'shared_ptr' : is not a member of 'std' e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 112 1 hMailServer
Error 20 error C2143: syntax error : missing ';' before '<' e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 112 1 hMailServer
Error 21 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 112 1 hMailServer
Error 22 error C2238: unexpected token(s) preceding ';' e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 112 1 hMailServer
Error 23 error C2039: 'shared_ptr' : is not a member of 'std' e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 113 1 hMailServer
Error 24 error C2143: syntax error : missing ';' before '<' e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 113 1 hMailServer
Error 25 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 113 1 hMailServer
Error 26 error C2334: unexpected token(s) preceding '{'; skipping apparent function body e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 113 1 hMailServer
Error 27 error C2039: 'shared_ptr' : is not a member of 'std' e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 114 1 hMailServer
Error 28 error C2143: syntax error : missing ';' before '<' e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 114 1 hMailServer
Error 29 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 114 1 hMailServer
Error 30 error C2334: unexpected token(s) preceding '{'; skipping apparent function body e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 114 1 hMailServer
Error 31 error C2039: 'shared_ptr' : is not a member of 'std' e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 118 1 hMailServer
Error 32 error C2143: syntax error : missing ';' before '<' e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 118 1 hMailServer
Error 33 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 118 1 hMailServer
Error 34 error C2238: unexpected token(s) preceding ';' e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 118 1 hMailServer
Error 35 error C2039: 'shared_ptr' : is not a member of 'std' e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 122 1 hMailServer
Error 36 error C2143: syntax error : missing ';' before '<' e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 122 1 hMailServer
Error 37 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 122 1 hMailServer
Error 38 error C2238: unexpected token(s) preceding ';' e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 122 1 hMailServer
Error 39 error C2039: 'shared_ptr' : is not a member of 'std' e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 123 1 hMailServer
Error 40 error C2143: syntax error : missing ';' before '<' e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 123 1 hMailServer
Error 41 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 123 1 hMailServer
Error 42 error C2238: unexpected token(s) preceding ';' e:\projects\hmail\hmailserver\hmailserver\source\server\common\antispam\AntiSpamConfiguration.h 123 1 hMailServer
Error 43 error C2061: syntax error : identifier 'shared_ptr' e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 18 1 hMailServer
Error 44 error C2061: syntax error : identifier 'XNode' e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 23 1 hMailServer
Error 45 error C2061: syntax error : identifier 'XNode' e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 24 1 hMailServer
Error 46 error C2143: syntax error : missing ';' before '<' e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 26 1 hMailServer
Error 47 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 26 1 hMailServer
Error 48 error C2238: unexpected token(s) preceding ';' e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 26 1 hMailServer
Error 49 error C2143: syntax error : missing ';' before '<' e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 27 1 hMailServer
Error 50 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 27 1 hMailServer
Error 51 error C2238: unexpected token(s) preceding ';' e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 27 1 hMailServer
Error 52 error C2143: syntax error : missing ';' before '<' e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 28 1 hMailServer
Error 53 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 28 1 hMailServer
Error 54 error C2238: unexpected token(s) preceding ';' e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 28 1 hMailServer
Error 55 error C2143: syntax error : missing ';' before '<' e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 29 1 hMailServer
Error 56 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 29 1 hMailServer
Error 57 error C2238: unexpected token(s) preceding ';' e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 29 1 hMailServer
Error 58 error C2143: syntax error : missing ';' before '<' e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 35 1 hMailServer
Error 59 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 35 1 hMailServer
Error 60 error C2334: unexpected token(s) preceding '{'; skipping apparent function body e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 35 1 hMailServer
Error 61 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 36 1 hMailServer
Error 62 error C2143: syntax error : missing ';' before '<' e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 36 1 hMailServer
Error 63 error C2334: unexpected token(s) preceding '{'; skipping apparent function body e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 36 1 hMailServer
Error 64 error C2146: syntax error : missing ';' before identifier 'GetCollectionName' e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 43 1 hMailServer
Error 65 error C2433: 'HM::Collection<T,P>::String' : 'virtual' not permitted on data declarations e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 43 1 hMailServer
Error 66 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 43 1 hMailServer
Warning 67 warning C4183: 'GetCollectionName': missing return type; assumed to be a member function returning 'int' e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 43 1 hMailServer
Error 68 error C2061: syntax error : identifier 'shared_ptr' e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 46 1 hMailServer
Error 69 error C2061: syntax error : identifier 'shared_ptr' e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 49 1 hMailServer
Error 70 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 51 1 hMailServer
Error 71 error C2143: syntax error : missing ',' before '&' e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 51 1 hMailServer
Error 72 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 52 1 hMailServer
Error 73 error C2143: syntax error : missing ',' before '&' e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 52 1 hMailServer
Error 74 error C2535: 'bool HM::Collection<T,P>::DBLoad_(const int)' : member function already defined or declared e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 52 1 hMailServer
Error 75 error C2653: 'boost' : is not a class or namespace name e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 54 1 hMailServer
Error 76 error C2146: syntax error : missing ';' before identifier '_mutex' e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 54 1 hMailServer
Error 77 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 54 1 hMailServer
Error 78 error C2327: 'HM::Collection<T,P>::vector' : is not a type name, static, or enumerator e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 56 1 hMailServer
Error 79 error C2143: syntax error : missing ';' before '<' e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 56 1 hMailServer
Error 80 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 56 1 hMailServer
Error 81 error C2238: unexpected token(s) preceding ';' e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 56 1 hMailServer
Error 82 error C2065: 'XNode' : undeclared identifier e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 61 1 hMailServer
Error 83 error C2065: 'pParentNode' : undeclared identifier e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 61 1 hMailServer
Error 84 error C2062: type 'int' unexpected e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 61 1 hMailServer
Error 85 error C2649: 'typename' : is not a 'class' e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\Collection.h 84 1 hMailServer
Error 86 error C2143: syntax error : missing ';' before '{' e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\SURBLServer.h 7 1 hMailServer
Error 87 error C2447: '{' : missing function header (old-style formal list?) e:\projects\hmail\hmailserver\hmailserver\source\server\common\bo\SURBLServer.h 7 1 hMailServer
Error 88 error C2888: 'HM::AntiSpamConfiguration::AntiSpamConfiguration(void)' : symbol cannot be defined within namespace 'HM' E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 20 1 hMailServer
Error 89 error C2888: 'HM::AntiSpamConfiguration::~AntiSpamConfiguration(void)' : symbol cannot be defined within namespace 'HM' E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 27 1 hMailServer
Error 90 error C2888: 'bool HM::AntiSpamConfiguration::Load(void)' : symbol cannot be defined within namespace 'HM' E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 33 1 hMailServer
Error 91 error C2065: 'dnsBlackLists_' : undeclared identifier E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 34 1 hMailServer
Error 92 error C2039: 'shared_ptr' : is not a member of 'std' E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 34 1 hMailServer
Error 93 error C2065: 'shared_ptr' : undeclared identifier E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 34 1 hMailServer
Error 94 error C2955: 'HM::HM::DNSBlackLists' : use of class template requires template argument list E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 34 1 hMailServer
Error 95 error C2065: 'dnsBlackLists_' : undeclared identifier E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 35 1 hMailServer
Error 96 error C2065: 'surblServers_' : undeclared identifier E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 37 1 hMailServer
Error 97 error C2039: 'shared_ptr' : is not a member of 'std' E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 37 1 hMailServer
Error 98 error C2065: 'shared_ptr' : undeclared identifier E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 37 1 hMailServer
Error 99 error C2955: 'HM::HM::SURBLServers' : use of class template requires template argument list E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 37 1 hMailServer
Error 100 error C2065: 'surblServers_' : undeclared identifier E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 38 1 hMailServer
Error 101 error C2039: 'shared_ptr' : is not a member of 'std' E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 43 1 hMailServer
Error 102 error C2143: syntax error : missing ';' before '<' E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 43 1 hMailServer
Error 103 error C2039: 'GetSettings_' : is not a member of 'HM::AntiSpamConfiguration' E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 44 1 hMailServer
Error 104 error C2143: syntax error : missing ';' before '{' E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 45 1 hMailServer
Error 105 error C2447: '{' : missing function header (old-style formal list?) E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 45 1 hMailServer
Error 106 error C2888: 'void HM::AntiSpamConfiguration::SetCheckHostInHelo(bool)' : symbol cannot be defined within namespace 'HM' E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 52 1 hMailServer
Error 107 error C2065: 'PROPERTY_AS_CHECKHOSTINHELO' : undeclared identifier E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 53 1 hMailServer
Error 108 error C3861: 'GetSettings_': identifier not found E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 53 1 hMailServer
Error 109 error C2888: 'bool HM::AntiSpamConfiguration::GetCheckHostInHelo(void)' : symbol cannot be defined within namespace 'HM' E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 58 1 hMailServer
Error 110 error C2065: 'PROPERTY_AS_CHECKHOSTINHELO' : undeclared identifier E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 59 1 hMailServer
Error 111 error C3861: 'GetSettings_': identifier not found E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 59 1 hMailServer
Error 112 error C2888: 'void HM::AntiSpamConfiguration::SetCheckHostInHeloScore(int)' : symbol cannot be defined within namespace 'HM' E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 64 1 hMailServer
Error 113 error C2065: 'PROPERTY_AS_CHECKHOSTINHELOSCORE' : undeclared identifier E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 65 1 hMailServer
Error 114 error C3861: 'GetSettings_': identifier not found E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 65 1 hMailServer
Error 115 error C2888: 'int HM::AntiSpamConfiguration::GetCheckHostInHeloScore(void)' : symbol cannot be defined within namespace 'HM' E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 70 1 hMailServer
Error 116 error C2065: 'PROPERTY_AS_CHECKHOSTINHELOSCORE' : undeclared identifier E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 71 1 hMailServer
Error 117 error C3861: 'GetSettings_': identifier not found E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 71 1 hMailServer
Error 118 error C2888: 'void HM::AntiSpamConfiguration::SetUseGreyListing(bool)' : symbol cannot be defined within namespace 'HM' E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 77 1 hMailServer
Error 119 error C2065: 'PROPERTY_USEGREYLISTING' : undeclared identifier E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 78 1 hMailServer
Error 120 error C3861: 'GetSettings_': identifier not found E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 78 1 hMailServer
Error 121 error C2888: 'bool HM::AntiSpamConfiguration::GetUseGreyListing(void)' : symbol cannot be defined within namespace 'HM' E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 83 1 hMailServer
Error 122 error C2065: 'PROPERTY_USEGREYLISTING' : undeclared identifier E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 84 1 hMailServer
Error 123 error C3861: 'GetSettings_': identifier not found E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 84 1 hMailServer
Error 124 error C2888: 'int HM::AntiSpamConfiguration::GetGreyListingInitialDelay(void)' : symbol cannot be defined within namespace 'HM' E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 89 1 hMailServer
Error 125 error C2065: 'PROPERTY_GL_INITIALDELAY' : undeclared identifier E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 90 1 hMailServer
Error 126 error C3861: 'GetSettings_': identifier not found E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 90 1 hMailServer
Error 127 error C2888: 'void HM::AntiSpamConfiguration::SetGreyListingInitialDelay(int)' : symbol cannot be defined within namespace 'HM' E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 95 1 hMailServer
Error 128 error C2065: 'PROPERTY_GL_INITIALDELAY' : undeclared identifier E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 96 1 hMailServer
Error 129 error C1003: error count exceeds 100; stopping compilation E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\AntiSpamConfiguration.cpp 96 1 hMailServer
Error 130 error C1083: Cannot open include file: 'StdAfx.h': No such file or directory E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\DKIM\Canonicalization.cpp 4 1 hMailServer
Error 131 error C1083: Cannot open include file: 'StdAfx.h': No such file or directory E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\DKIM\DKIM.cpp 4 1 hMailServer
Error 132 error C1083: Cannot open include file: 'StdAfx.h': No such file or directory E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\DKIM\DKIMParameters.cpp 4 1 hMailServer
Error 133 error C1083: Cannot open include file: 'StdAfx.h': No such file or directory E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\DKIM\DKIMSigner.cpp 4 1 hMailServer
Error 134 error C1083: Cannot open include file: 'StdAfx.h': No such file or directory E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\DKIM\SpamTestDKIM.cpp 4 1 hMailServer
Error 135 error C1083: Cannot open include file: 'StdAfx.h': No such file or directory E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\SpamAssassin\SpamAssassinClient.cpp 4 1 hMailServer
Error 136 error C1083: Cannot open include file: 'StdAfx.h': No such file or directory E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\SpamAssassin\SpamAssassinTestConnect.cpp 4 1 hMailServer
Error 137 error C1083: Cannot open include file: 'StdAfx.h': No such file or directory E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\SpamProtection.cpp 4 1 hMailServer
Error 138 error C1083: Cannot open include file: 'StdAfx.h': No such file or directory E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\SpamTest.cpp 4 1 hMailServer
Error 139 error C1083: Cannot open include file: 'StdAfx.h': No such file or directory E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\SpamTestData.cpp 4 1 hMailServer
Error 140 error C1083: Cannot open include file: 'StdAfx.h': No such file or directory E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\SpamTestDNSBlackLists.cpp 4 1 hMailServer
Error 141 error C1083: Cannot open include file: 'StdAfx.h': No such file or directory E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\SpamTestHeloHost.cpp 4 1 hMailServer
Error 142 error C1083: Cannot open include file: 'StdAfx.h': No such file or directory E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\SpamTestMXRecords.cpp 4 1 hMailServer
Error 143 error C1083: Cannot open include file: 'StdAfx.h': No such file or directory E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\SpamTestResult.cpp 4 1 hMailServer
Error 144 error C1083: Cannot open include file: 'StdAfx.h': No such file or directory E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\SpamTestRunner.cpp 4 1 hMailServer
Error 145 error C1083: Cannot open include file: 'StdAfx.h': No such file or directory E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\SpamTestSpamAssassin.cpp 4 1 hMailServer
Error 146 error C1083: Cannot open include file: 'StdAfx.h': No such file or directory E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\SpamTestSPF.cpp 4 1 hMailServer
Error 147 error C1083: Cannot open include file: 'StdAfx.h': No such file or directory E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\SpamTestSURBL.cpp 4 1 hMailServer
Error 148 error C1083: Cannot open include file: 'StdAfx.h': No such file or directory E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\SURBL.cpp 4 1 hMailServer
Error 149 error C1083: Cannot open include file: 'StdAfx.h': No such file or directory E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiSpam\WhiteListCache.cpp 4 1 hMailServer
Error 150 error C1083: Cannot open include file: 'stdafx.h': No such file or directory E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiVirus\AntiVirusConfiguration.cpp 4 1 hMailServer
Error 151 error C1083: Cannot open include file: 'StdAfx.h': No such file or directory E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiVirus\ClamAVVirusScanner.cpp 4 1 hMailServer
Error 152 error C1083: Cannot open include file: 'stdafx.h': No such file or directory E:\Projects\Hmail\hmailserver\hmailserver\source\Server\Common\AntiVirus\ClamWinVirusScanner.cpp 4 1 hMailServer
*
*
*
*
*
*
*
*

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

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

Post by Dravion » 2019-12-31 01:07

Looks like you didn't added the required hMailServer Environment variable as mentioned in the build instructions.

if cd %hmailserverlibs% doesnt work, something is wrong.

Read the build instructions very carefully.

The next thing is, we switched from OpenSSL 1.0.2.x
Series (which is now out of support and never will get any security fixes at all) to current OpenSSL 1.1.x which
breaks code. Only the hMailServer 5.7.0 code branch on Github compiles fine with it, all earlier code versions will fail (hMailServer Github code 5.6.7 / 5.6.8 ect.)

Use hMailServer current stable branch and OpenSSL 1.1.1
and latest BOOST 1.72. and start from scratch.

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

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

Post by SorenR » 2019-12-31 03:06

You can fix this problem by adding "$(ProjectDir)" (or wherever the stdafx.h is) to list of directories under Project->Properties->Configuration Properties->C/C++->General->Additional Include Directories.
SørenR.

“With age comes wisdom, but sometimes age comes alone.”
- Oscar Wilde

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

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

Post by Dravion » 2019-12-31 03:23

Sure and something like this will magically disappear
with your method as well..

Error 2 error C1083: Cannot open include file: 'boost/interprocess/windows_shared_memory.hpp': No such file or directory

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

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

Post by SorenR » 2019-12-31 04:25

Dravion wrote:
2019-12-31 03:23
Sure and something like this will magically disappear
with your method as well..

Error 2 error C1083: Cannot open include file: 'boost/interprocess/windows_shared_memory.hpp': No such file or directory
No but it would fix 150 of 152 errors.
SørenR.

“With age comes wisdom, but sometimes age comes alone.”
- Oscar Wilde

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

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

Post by Dravion » 2019-12-31 04:37

SorenR wrote:
2019-12-31 04:25
Dravion wrote:
2019-12-31 03:23
Sure and something like this will magically disappear
with your method as well..

Error 2 error C1083: Cannot open include file: 'boost/interprocess/windows_shared_memory.hpp': No such file or directory
No but it would fix 150 of 152 errors.
No.
StdAfx.h and Stdafx.cpp are in correct position and doesn't
needs to be included. The only purpose of it is to compile precompiled Headers to reduce built times.

The Errors you see has nothing todo with Stdafx.h but anything with the included BOOST Framework Headers the prrcompiler cannot find.

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

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

Post by SorenR » 2019-12-31 04:53

Dravion wrote:
2019-12-31 04:37
SorenR wrote:
2019-12-31 04:25
Dravion wrote:
2019-12-31 03:23
Sure and something like this will magically disappear
with your method as well..

Error 2 error C1083: Cannot open include file: 'boost/interprocess/windows_shared_memory.hpp': No such file or directory
No but it would fix 150 of 152 errors.
No.
StdAfx.h and Stdafx.cpp are in correct position and doesn't
needs to be included. The only purpose of it is to compile precompiled Headers to reduce built times.

The Errors you see has nothing todo with Stdafx.h but anything with the included BOOST Framework Headers the prrcompiler cannot find.
Well... All I can say is that it fixed my problems with Stdafx.h and IntelliSense.
The error(s) only showed itself if I had a/any .cpp file open while building a new version. If I closed the .cpp file before building a new version I got NO errors.

It fixed my problem - regardless of what you may say about it and I had NO errors listing the BOOST directories.
SørenR.

“With age comes wisdom, but sometimes age comes alone.”
- Oscar Wilde

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

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

Post by Dravion » 2019-12-31 17:38

This has something to do how Precompiled Headers are working.

StdAfx.h (Microsoft way of Precompiled Headers) is used to reference all possible Include Header files for the whole C/C++ Project (in the best case) and StdAfx.cpp includes only StdAfx.h, the main Include reference point for the whole project. The more Headers *.h files you include in StdAfx.h, the faster will recompilation work later on, thats why Precompiled Headers are invented in the first place, they function as Compiler cache.

Generally spoken *.h and *.hpp Header include files are merged together behind the curtain by the C/C++ Compiler Preprocessor but its more convenient for us Humans to have logically units. In fact, some fool could implement its whole C/C++ code inside a *.h or a single *.cpp file but this would be very ugly and uncool.

Precompiled headers details:
The header include files are NOT compiled and cached every time. They are only recompiled if something has changed.
But if the Cache change detection goes wrong, the Compiler cache is out of sync and you will get lots of Compilation and IntelliSense Errors,
because the cache is not longer valid.

However:
The simplest method to enforce a new Precompiled Cache is to add some line of of code or text in StdAfx.h or StdAfx cpp (even if its just a little
comment like: // Micky Mouse or change a directory order (as you did). This will trigger a new compiler cache generation and in most cases
all errors are solved.

aulutas
New user
New user
Posts: 5
Joined: 2019-12-30 23:50

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

Post by aulutas » 2020-01-04 21:19

Dravion wrote:
2019-12-31 01:07
Looks like you didn't added the required hMailServer Environment variable as mentioned in the build instructions.

if cd %hmailserverlibs% doesnt work, something is wrong.

Read the build instructions very carefully.

The next thing is, we switched from OpenSSL 1.0.2.x
Series (which is now out of support and never will get any security fixes at all) to current OpenSSL 1.1.x which
breaks code. Only the hMailServer 5.7.0 code branch on Github compiles fine with it, all earlier code versions will fail (hMailServer Github code 5.6.7 / 5.6.8 ect.)

Use hMailServer current stable branch and OpenSSL 1.1.1
and latest BOOST 1.72. and start from scratch.
This is not working for me "if cd %hmailserverlibs% doesnt work, something is wrong."
I created a folder under my C:\ as C:\Dev\hMailLibs which has boost_1_72_0 and openssl-1.1.1d folders.
I read the build instructions very carefully many times and only realized that i did not map correctly openssl-1.1.1d folder on VS 2013 since openssl-1.1.1d does not have inc32 folder.
When i started to read again Building OpenSSL section on Github i could not build it since following code does not work on command prompt.

"nmake clean
Perl Configure no-asm VC-WIN64A --prefix=%cd%\out64 --openssldir=%cd%\out64 -D_WIN32_WINNT=0x501
nmake install_sw"

C:\Dev\hMailLibs\openssl-1.1.1d>nmake clean

Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.

NMAKE : fatal error U1073: don't know how to make 'clean'
Stop.

C:\Dev\hMailLibs\openssl-1.1.1d>

I really need help guys thank you so much.

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

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

Post by Dravion » 2020-01-04 23:00

You need the hMailServer Environment variable because it is referenced and expected from within Visual Studio.

1) Goto Windows System Control panel
2) Add a System Environment Variabe
3) The Variable name must be HMAILSERVERLIBS
4) Let it point to your folder where BOOST and OpenSSL is located.

forget nmake clean
Just run the perl command and after it nmake
and let it compile.

aulutas
New user
New user
Posts: 5
Joined: 2019-12-30 23:50

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

Post by aulutas » 2020-01-06 21:51

Dravion wrote:
2020-01-04 23:00
You need the hMailServer Environment variable because it is referenced and expected from within Visual Studio.

1) Goto Windows System Control panel
2) Add a System Environment Variabe
3) The Variable name must be HMAILSERVERLIBS
4) Let it point to your folder where BOOST and OpenSSL is located.

forget nmake clean
Just run the perl command and after it nmake
and let it compile.
Thank you Dravion for your all answers.. When i try to compile OpenSSL on cmd (VS2013 x64 Native Tools Command Prompt) after i installed Perl version 5.28.1 i got below message on cmd.

*******************
Configuring OpenSSL version 1.1.1d (0x1010104fL) for VC-WIN64A
Using os-specific seed configuration
Can't locate Win32/Console.pm in @INC (you may need to install the Win32::Console module) (@INC contains: C:/Dev/hMailLibs/openssl-1.1.1d/util/perl C:/Perl64/site/lib C:/Perl64/lib) at C:/Perl64/site/lib/ActivePerl/Config.pm line 400.
Compilation failed in require at C:/Perl64/site/lib/ExtUtils/MakeMaker.pm line 9.
BEGIN failed--compilation aborted at C:/Perl64/site/lib/ExtUtils/MakeMaker.pm line 9.
Compilation failed in require at C:/Perl64/lib/IPC/Cmd.pm line 235.
*******************

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

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

Post by Dravion » 2020-01-06 22:05

aulutas wrote:
2020-01-06 21:51
Dravion wrote:
2020-01-04 23:00
You need the hMailServer Environment variable because it is referenced and expected from within Visual Studio.

1) Goto Windows System Control panel
2) Add a System Environment Variabe
3) The Variable name must be HMAILSERVERLIBS
4) Let it point to your folder where BOOST and OpenSSL is located.

forget nmake clean
Just run the perl command and after it nmake
and let it compile.
Thank you Dravion for your all answers.. When i try to compile OpenSSL on cmd (VS2013 x64 Native Tools Command Prompt) after i installed Perl version 5.28.1 i got below message on cmd.

*******************
Configuring OpenSSL version 1.1.1d (0x1010104fL) for VC-WIN64A
Using os-specific seed configuration
Can't locate Win32/Console.pm in @INC (you may need to install the Win32::Console module) (@INC contains: C:/Dev/hMailLibs/openssl-1.1.1d/util/perl C:/Perl64/site/lib C:/Perl64/lib) at C:/Perl64/site/lib/ActivePerl/Config.pm line 400.
Compilation failed in require at C:/Perl64/site/lib/ExtUtils/MakeMaker.pm line 9.
BEGIN failed--compilation aborted at C:/Perl64/site/lib/ExtUtils/MakeMaker.pm line 9.
Compilation failed in require at C:/Perl64/lib/IPC/Cmd.pm line 235.
*******************

There is a Perl Submodule which wasn't installed by your Perl version.
I use Strawberry Perl and it has antything needed

http://strawberryperl.com/

Make sure you have not installed two Perl versions on the same system.

aulutas
New user
New user
Posts: 5
Joined: 2019-12-30 23:50

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

Post by aulutas » 2020-01-06 23:24

Dravion wrote:
2020-01-06 22:05
aulutas wrote:
2020-01-06 21:51
Dravion wrote:
2020-01-04 23:00
You need the hMailServer Environment variable because it is referenced and expected from within Visual Studio.

1) Goto Windows System Control panel
2) Add a System Environment Variabe
3) The Variable name must be HMAILSERVERLIBS
4) Let it point to your folder where BOOST and OpenSSL is located.

forget nmake clean
Just run the perl command and after it nmake
and let it compile.
Thank you Dravion for your all answers.. When i try to compile OpenSSL on cmd (VS2013 x64 Native Tools Command Prompt) after i installed Perl version 5.28.1 i got below message on cmd.

*******************
Configuring OpenSSL version 1.1.1d (0x1010104fL) for VC-WIN64A
Using os-specific seed configuration
Can't locate Win32/Console.pm in @INC (you may need to install the Win32::Console module) (@INC contains: C:/Dev/hMailLibs/openssl-1.1.1d/util/perl C:/Perl64/site/lib C:/Perl64/lib) at C:/Perl64/site/lib/ActivePerl/Config.pm line 400.
Compilation failed in require at C:/Perl64/site/lib/ExtUtils/MakeMaker.pm line 9.
BEGIN failed--compilation aborted at C:/Perl64/site/lib/ExtUtils/MakeMaker.pm line 9.
Compilation failed in require at C:/Perl64/lib/IPC/Cmd.pm line 235.
*******************

There is a Perl Submodule which wasn't installed by your Perl version.
I use Strawberry Perl and it has antything needed

http://strawberryperl.com/

Make sure you have not installed two Perl versions on the same system.
It worked thank you. When i try to build Boost v1.72.0, i got below message.

***************************************************
C:\Dev\hMailLibs\boost_1_72_0>bootstrap.bat vc12
Building Boost.Build engine
The system cannot find the batch label specified - Config_VC12

Failed to build Boost.Build engine.
Please consult bootstrap.log for further diagnostics.
***************************************************

I checked log file. Even it is written there vc12 is supported, system does not let me to build it.

###
### "Unknown toolset: vc12"
###
### You can specify the toolset as the argument, i.e.:
### .\build.bat msvc
###
### Toolsets supported by this script are: borland, como, gcc,
### gcc-nocygwin, intel-win32, metrowerks, mingw,
### vc11, vc12, vc14, vc141, vc142
###
### If you have Visual Studio 2017 installed you will need to either update
### the Visual Studio 2017 installer or run from VS 2017 Command Prompt
### as we where unable to detect your toolset installation.

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

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

Post by Dravion » 2020-01-06 23:39

This instruction is a bit faulty.
It's okay if you are in the Visual Studio 2012 Native x64 Command prompt to just run
bootstrap
AND after it:
b2

This will take some time. If it stops, check if there was any Error message at the end, if not it should be fine.

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

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

Post by SorenR » 2020-01-06 23:54

aulutas wrote:
2020-01-06 23:24
It worked thank you. When i try to build Boost v1.72.0, i got below message.

***************************************************
C:\Dev\hMailLibs\boost_1_72_0>bootstrap.bat vc12
Building Boost.Build engine
The system cannot find the batch label specified - Config_VC12

Failed to build Boost.Build engine.
Please consult bootstrap.log for further diagnostics.
***************************************************
Save bat file(s) as DOS (with CRLF's), it is currently saved as Unix (with LF's). Took the most of two days to figure that one out. Could not believe DOS (Windows) really is that stupid!

https://metacpan.org/pod/unix2dos

https://serverfault.com/questions/42959 ... ne-endings
SørenR.

“With age comes wisdom, but sometimes age comes alone.”
- Oscar Wilde

aulutas
New user
New user
Posts: 5
Joined: 2019-12-30 23:50

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

Post by aulutas » 2020-01-13 21:19

Dravion wrote:
2020-01-06 23:39
This instruction is a bit faulty.
It's okay if you are in the Visual Studio 2012 Native x64 Command prompt to just run
bootstrap
AND after it:
b2

This will take some time. If it stops, check if there was any Error message at the end, if not it should be fine.
I use Visual Studio 2013 Native x64 Command prompt. Is it possible to do that with 2013 version?

Post Reply