Emerald Editor Discussion
April 23, 2017, 08:54:35 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: Compiling with VS C++ Express edition 2005  (Read 35332 times)
0 Members and 1 Guest are viewing this topic.
Pvt_Ryan
Master Jeweller
******
Posts: 422



WWW
« on: April 11, 2007, 11:35:54 am »

Moderator Edit: Attached files and link were removed as it violates section 3.b.i of the Visual Studio Professional EULA to distribute the MFC and ATL in source form. VS Standard Editions can be used to compile CE. They can be purchased at http://www.amazon.com/Microsoft-Visual-Studio-2008-Standard/dp/B000WM1Z46/.
End Mod Edit.

Steps:

1. checkout SVN repo svn://svn.emeraldeditor.com
2. Get MS VS 2005 C++ Express
3. Get the Platform SDK from the MS site or the link in the vs c++ front page..
Quote
Update the Visual C++ directories in the Projects and Solutions section in the Options dialog box.
Add the paths to the appropriate subsection:

Executable files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin
Include files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include
Library files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib
Note: Alternatively, you can update the Visual C++ Directories by modifying the VCProjectEngine.dll.express.config file located in the \vc\vcpackages subdirectory of the Visual C++ Express install location. Please make sure that you also delete the file "vccomponents.dat" located in the "%USERPROFILE%\Local Settings\Application Data\Microsoft\VCExpress\8.0" if it exists before restarting Visual C++ Express Edition.



Update the corewin_express.vsprops file.
One more step is needed to make the Win32 template work in Visual C++ Express. You need to edit the corewin_express.vsprops file (found in C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults) and

Change the string that reads:

AdditionalDependencies="kernel32.lib"

  to

AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"

4. Then extract the attached rar file to X:\Program Files\Microsoft Visual Studio 8\VC\include

get the following file <link removed> and extract that and add it to your Lib paths.
either
a new path for lib files or place files in archive (not folder) into X:\Program Files\Microsoft Visual Studio 8\VC\lib

« Last Edit: September 04, 2009, 09:31:28 pm by Phil » Logged
pn8830
Global Moderator
Jeweller
*****
Posts: 252



« Reply #1 on: April 12, 2007, 04:30:21 am »

Hi,

Thank you very much for this instructions, this was very useful for me. I tried to follow them but my build failed Sad and here is what I found

Code:
1>c:\program files\microsoft visual studio 8\vc\include\afxtempl.h(15) : fatal error C1083: Cannot open include file: 'afxplex_.h': No such file or directory

I tried searching for this file and found it in:
Code:
c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\mfc\

So I just ended up with adding the following directories to the Include Files, maybe it's just specific to my setup:

Code:
c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\mfc\
c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\atl\


After that it stopped complaining about missing header files but still I had three errors:

Code:
MainFrm.cpp
c:\documents and settings\hp_administrator\my documents\ee\svn.emeraldeditor.com\crimsoneditor\trunk\src\mainfrm.cpp(567) : error C2664: 'CWnd::OnActivateApp' : cannot convert parameter 2 from 'DWORD' to 'HTASK'
        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast


DocumentSummary.cpp
c:\documents and settings\hp_administrator\my documents\ee\svn.emeraldeditor.com\crimsoneditor\trunk\src\documentsummary.cpp(43) : error C2665: 'DDX_Text' : none of the 12 overloads could convert all the argument types
        c:\program files\microsoft platform sdk for windows server 2003 r2\include\mfc\afxdd_.h(20): could be 'void DDX_Text(CDataExchange *,int,BYTE &)'
        c:\program files\microsoft platform sdk for windows server 2003 r2\include\mfc\afxdd_.h(21): or 'void DDX_Text(CDataExchange *,int,short &)'
        c:\program files\microsoft platform sdk for windows server 2003 r2\include\mfc\afxdd_.h(22): or 'void DDX_Text(CDataExchange *,int,int &)'
        c:\program files\microsoft platform sdk for windows server 2003 r2\include\mfc\afxdd_.h(23): or 'void DDX_Text(CDataExchange *,int,UINT &)'
        c:\program files\microsoft platform sdk for windows server 2003 r2\include\mfc\afxdd_.h(24): or 'void DDX_Text(CDataExchange *,int,long &)'
        c:\program files\microsoft platform sdk for windows server 2003 r2\include\mfc\afxdd_.h(25): or 'void DDX_Text(CDataExchange *,int,DWORD &)'
        c:\program files\microsoft platform sdk for windows server 2003 r2\include\mfc\afxdd_.h(26): or 'void DDX_Text(CDataExchange *,int,CString &)'
        c:\program files\microsoft platform sdk for windows server 2003 r2\include\mfc\afxdd_.h(30): or 'void DDX_Text(CDataExchange *,int,float &)'
        c:\program files\microsoft platform sdk for windows server 2003 r2\include\mfc\afxdd_.h(31): or 'void DDX_Text(CDataExchange *,int,double &)'
        c:\program files\microsoft platform sdk for windows server 2003 r2\include\mfc\afxdd_.h(32): or 'void DDX_Text(CDataExchange *,int,COleCurrency &)'
        c:\program files\microsoft platform sdk for windows server 2003 r2\include\mfc\afxdd_.h(33): or 'void DDX_Text(CDataExchange *,int,COleDateTime &)'
        while trying to match the argument list '(CDataExchange *, int, ULONGLONG)'


HyperLink.cpp
c:\documents and settings\hp_administrator\my documents\ee\svn.emeraldeditor.com\crimsoneditor\trunk\src\hyperlink.cpp(64) : error C4867: 'CHyperLink::CtlColor': function call missing argument list; use '&CHyperLink::CtlColor' to create a pointer to member

Unfortunately at this moment I don't know how the approach to fixing of these errors. Maybe I'm missing something obvious here?

Regards,
PN.
Logged

Entities should not be multiplied beyond necessity
Pvt_Ryan
Master Jeweller
******
Posts: 422



WWW
« Reply #2 on: April 12, 2007, 08:44:54 am »

dont include that mfc folder it seems that that is using newer(?) files and functions are depricated.

for some reason the build worked for me then failed again later :?

I have attached my atlmfc includes from VS 2k5 pro, to the original post, try removing the 2 paths you added, and place these files in a folder and add it to your include path and see it that solves anything.

try using those first. failing that try and get the (remaining) afx files from http://www.cppdoc.com/example/mfc/classdoc/MFC/XXX.H.html (replace XXX with afx file name)


As to the final 3 errors i am not too sure..



« Last Edit: April 12, 2007, 08:48:02 am by Pvt_Ryan » Logged
pn8830
Global Moderator
Jeweller
*****
Posts: 252



« Reply #3 on: April 12, 2007, 03:33:56 pm »

I'll try do follow this recommendations.

for some reason the build worked for me then failed again later :?

What kind of errors did you get?
Logged

Entities should not be multiplied beyond necessity
Pvt_Ryan
Master Jeweller
******
Posts: 422



WWW
« Reply #4 on: April 12, 2007, 04:13:23 pm »

same as you..

but if you wipe / overwrite the previous includes i gave you with the new ones above that should get you as far as linking where it will fail..

I will track down the required libs tomorrow morning when i get into work..
Logged
Pvt_Ryan
Master Jeweller
******
Posts: 422



WWW
« Reply #5 on: April 12, 2007, 05:51:16 pm »

got a mate to send me the files one at a time..
Logged
Phil
Administrator
Master Jeweller
*****
Posts: 427


« Reply #6 on: April 13, 2007, 02:24:27 am »

That attachment contains files copyrighted by Microsoft. Is it ok to distribute those like that?

Phil
Logged
Pvt_Ryan
Master Jeweller
******
Posts: 422



WWW
« Reply #7 on: April 13, 2007, 09:04:56 am »

i dont know tbh as if you look here for eg
http://www.cppdoc.com/example/mfc/classdoc/MFC/AFX.H.html
there is the file in text format..

If its isnt ok, i can list all the file names that need to be found.. I only posted them to save people time..

All the files above are available through the platform SDK (a free download from MS) BUT the actual content of the files in the SDK is different. lines are missing / there are different types for some vars, and you cant compile, I have done my best to ONLY distribute the files required for compiling

Logged
Phil
Administrator
Master Jeweller
*****
Posts: 427


« Reply #8 on: April 13, 2007, 10:57:23 pm »

OK, I'm not sure either. If I find out it breaks the license I'll bring it up again.

Phil
Logged
rageboy
Jeweller
*****
Posts: 305

Ankit Singla


« Reply #9 on: April 16, 2007, 04:52:51 pm »

same as you..

but if you wipe / overwrite the previous includes i gave you with the new ones above that should get you as far as linking where it will fail..

I will track down the required libs tomorrow morning when i get into work..

I tried using the includes from the website. I couldn't find the atl include files so I copied those from the atl folder. I got the same three errors as PN posted, though. Any ideas?
Logged
Pvt_Ryan
Master Jeweller
******
Posts: 422



WWW
« Reply #10 on: April 16, 2007, 07:36:27 pm »

hmm you shouldnt need teh atl includes..

ill post the pro versions later but mine compiled fine with those i posted.
Logged
rageboy
Jeweller
*****
Posts: 305

Ankit Singla


« Reply #11 on: April 18, 2007, 03:58:44 pm »

Interesting. Well, before without the atl libs it would complain, but I just moved them and it seemed fine. (This is why I dislike Windows...it's not even consistent). At any rate, this is my build output without the atl libs:

------ Build started: Project: cedt, Configuration: Debug Win32 ------
Compiling...
MainFrm.cpp
c:\documents and settings\ankit singla\my documents\source files\crimson editor\src\mainfrm.cpp(567) : error C2664: 'CWnd::OnActivateApp' : cannot convert parameter 2 from 'DWORD' to 'HTASK'
        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
DocumentSummary.cpp
c:\documents and settings\ankit singla\my documents\source files\crimson editor\src\documentsummary.cpp(43) : error C2665: 'DDX_Text' : none of the 12 overloads could convert all the argument types
        c:\documents and settings\ankit singla\my documents\visual studio 2005\includes\afxdd_.h(20): could be 'void DDX_Text(CDataExchange *,int,BYTE &)'
        c:\documents and settings\ankit singla\my documents\visual studio 2005\includes\afxdd_.h(21): or 'void DDX_Text(CDataExchange *,int,short &)'
        c:\documents and settings\ankit singla\my documents\visual studio 2005\includes\afxdd_.h(22): or 'void DDX_Text(CDataExchange *,int,int &)'
        c:\documents and settings\ankit singla\my documents\visual studio 2005\includes\afxdd_.h(23): or 'void DDX_Text(CDataExchange *,int,UINT &)'
        c:\documents and settings\ankit singla\my documents\visual studio 2005\includes\afxdd_.h(24): or 'void DDX_Text(CDataExchange *,int,long &)'
        c:\documents and settings\ankit singla\my documents\visual studio 2005\includes\afxdd_.h(25): or 'void DDX_Text(CDataExchange *,int,DWORD &)'
        c:\documents and settings\ankit singla\my documents\visual studio 2005\includes\afxdd_.h(26): or 'void DDX_Text(CDataExchange *,int,CString &)'
        c:\documents and settings\ankit singla\my documents\visual studio 2005\includes\afxdd_.h(28): or 'void DDX_Text(CDataExchange *,int,float &)'
        c:\documents and settings\ankit singla\my documents\visual studio 2005\includes\afxdd_.h(29): or 'void DDX_Text(CDataExchange *,int,double &)'
        c:\documents and settings\ankit singla\my documents\visual studio 2005\includes\afxdd_.h(30): or 'void DDX_Text(CDataExchange *,int,COleCurrency &)'
        c:\documents and settings\ankit singla\my documents\visual studio 2005\includes\afxdd_.h(31): or 'void DDX_Text(CDataExchange *,int,COleDateTime &)'
        while trying to match the argument list '(CDataExchange *, int, ULONGLONG)'
HyperLink.cpp
c:\documents and settings\ankit singla\my documents\source files\crimson editor\src\hyperlink.cpp(64) : error C4867: 'CHyperLink::CtlColor': function call missing argument list; use '&CHyperLink::CtlColor' to create a pointer to member
Build log was saved at "file://c:\Documents and Settings\Ankit Singla\My Documents\Source Files\Crimson Editor\build\output\Debug\BuildLog.htm"
cedt - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


Also, when I start up VC++ and open the project, I get the following error. It doesn't seem to affect much but I'm not quite sure what it means:
"The application for project 'C:\Documents and Settings\Ankit Singla\My Documents\Source Files\Crimson Editor\installer\cedt_setup\cedt_setup.vdproj' is not installed. Make sure the application for the project type (.vdproj) is installed."
Logged
Pvt_Ryan
Master Jeweller
******
Posts: 422



WWW
« Reply #12 on: April 18, 2007, 04:44:11 pm »

I think you are maybe using the older includes i posted..

Redownload them (from my post) and overwrite the ones you have and try compiling again..
(before you overwrite you can try diffing them and you'll see what i mean below)

as you can see from the output its complaining about an afx header file..

This is the annoying thing and why i am not sure if my posting of the headers is legal..

The Platform SDK that MS allows for free download has the afx includes, i Diffed one from there and one from my VS 2k5 Pro install, the differences made me wonder if they were even related..
I think that the ones VS ships with has the older functions and newer ones for comapibility.. but the Platform SDK only has newer versions of the files with alot of older functions removed, after all CE was developed on VS6.

Let me know if the above works ok or if you are still getting the errors.
Logged
rageboy
Jeweller
*****
Posts: 305

Ankit Singla


« Reply #13 on: April 18, 2007, 11:32:45 pm »

K it got as far as linking and failed as you mentioned it would with the following log:

Linking...
LINK : fatal error LNK1104: cannot open file 'mfc42d.lib'
Build log was saved at "file://c:\Documents and Settings\Ankit Singla\My Documents\Source Files\Crimson Editor\build\output\Debug\BuildLog.htm"
cedt - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Not sure if you had found what was missing yet though. Also not sure if that "WINVER not defined" matters. If I try using the mfc42d's that exist in the SDK I downloaded, it says "module machine type '<IA64 or x64>' conflicts with target machine type 'X86'".
Logged
rageboy
Jeweller
*****
Posts: 305

Ankit Singla


« Reply #14 on: April 18, 2007, 11:54:26 pm »

hm. I just did a search for 'mfc42d x86' on google and found the following post:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1472411&SiteID=1

Stuff like this makes me not particularly like M$. I don't think I really want to pay for the SDK Undecided
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.141 seconds with 18 queries.