Jump to content

Photo

Errors building using MSVC 2019 and cmake

development

  • Please log in to reply
7 replies to this topic

#1 lucas92

lucas92

    Defender

  • Members

Posted 06 December 2020 - 07:07 PM

I'm trying to build Zelda Classic from the github repository with cmake and MSVC 2019 (without bison), and I get some errors:

Severity Code Description Project File Line Suppression State
Error C1083 Cannot open include file: 'metadata/sigs/devsig.h.sig': No such file or directory zelda C:\Users\lucas\OneDrive\Documents\ZeldaClassic\src\zelda.cpp 33 
Error C1083 Cannot open include file: 'metadata/sigs/devsig.h.sig': No such file or directory zelda C:\Users\lucas\OneDrive\Documents\ZeldaClassic\src\qst.cpp 25 
Error C1083 Cannot open include file: 'metadata/sigs/devsig.h.sig': No such file or directory zquest C:\Users\lucas\OneDrive\Documents\ZeldaClassic\src\qst.cpp 25 
Error C1083 Cannot open include file: 'metadata/sigs/devsig.h.sig': No such file or directory zquest C:\Users\lucas\OneDrive\Documents\ZeldaClassic\src\zq_class.cpp 26 
Error C1083 Cannot open include file: 'metadata/sigs/devsig.h.sig': No such file or directory zquest C:\Users\lucas\OneDrive\Documents\ZeldaClassic\src\zq_misc.cpp 26 
Error C2143 syntax error: missing ';' before '*' zquest C:\Users\lucas\OneDrive\Documents\ZeldaClassic\src\parser\NoScriptParser.cpp 5 
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int zquest C:\Users\lucas\OneDrive\Documents\ZeldaClassic\src\parser\NoScriptParser.cpp 5 
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int zquest C:\Users\lucas\OneDrive\Documents\ZeldaClassic\src\parser\NoScriptParser.cpp 6 
Error C2059 syntax error: '{' zquest C:\Users\lucas\OneDrive\Documents\ZeldaClassic\src\parser\NoScriptParser.cpp 6 
Error C2143 syntax error: missing ';' before '{' zquest C:\Users\lucas\OneDrive\Documents\ZeldaClassic\src\parser\NoScriptParser.cpp 6 
Error C2447 '{': missing function header (old-style formal list?) zquest C:\Users\lucas\OneDrive\Documents\ZeldaClassic\src\parser\NoScriptParser.cpp 6 
Error LNK1117 syntax error in option 'LARGEADDRESSAWARE:YES' romview C:\Users\lucas\OneDrive\Documents\ZeldaClassic\build\LINK 1 
I've tried to switch the compiler to MSVC 2015 but without success. Anyway, it's not working as straightforward as indicated on the github page. Any help?


#2 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 06 December 2020 - 07:13 PM

2 things:

Building without bison has not been an option for quite a while. It is required.

 

'devsig.h.sig' is a user-specific file, which is not committed to the repository. You should be able to find a template for it in 'src/metadata', which you need to copy (and alter to reflect your information) to 'src/metadata/sigs'.



#3 lucas92

lucas92

    Defender

  • Members

Posted 06 December 2020 - 07:27 PM

Thanks venrob for the help.

 

I've installed win-flex and added it to the PATH and I've changed compilersig.h.sig to this:

 

/** Compiler Metadata for Header v4
* 
* ZQ Metadata for the Compiler used to build ZQ/ZC.
* 
* !! DO NOT COMMIT CHANGES TO THIS FILE TO GITHUB
*/


#define V_ZC_COMPILERSIG 1
//COMPILER SIGS
// MSVC  1
// G++   2
//      CLANG 3
//      INTEL 4


#define COMPILER_V_FIRST 0
#define COMPILER_V_SECOND 0
#define COMPILER_V_THIRD 0
#define COMPILER_V_FOURTH 0




#define COMPILER_NAME "MSVC"
#define COMPILER_VERSION "v142, 2019"

Copied both compilersig.h.sig and devsig.h.sig in src/metadata/sigs.

 

I'm now getting those errors:

 

Severity Code Description Project File Line Suppression State
Error MSB8066 Custom build for 'C:\Users\lucas\OneDrive\Documents\ZeldaClassic\build\CMakeFiles\c0f264be863784ce394a9f655fdd85f7\y.tab.cpp.rule;C:\Users\lucas\OneDrive\Documents\ZeldaClassic\build\CMakeFiles\c0f264be863784ce394a9f655fdd85f7\lex.yy.cpp.rule' exited with code 1. zquest C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets 238 
Error LNK1117 syntax error in option 'LARGEADDRESSAWARE:YES' romview C:\Users\lucas\OneDrive\Documents\ZeldaClassic\build\LINK 1 
Error RC1015 cannot open include file 'afxres.h'. zelda C:\Users\lucas\OneDrive\Documents\ZeldaClassic\zc_icon.rc 10 


#4 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 07 December 2020 - 12:30 AM

No clue on that; gonna need to ask Zoria.



#5 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 07 December 2020 - 10:23 AM

 

Thanks venrob for the help.

 

I've installed win-flex and added it to the PATH and I've changed compilersig.h.sig to this:

 

/** Compiler Metadata for Header v4
* 
* ZQ Metadata for the Compiler used to build ZQ/ZC.
* 
* !! DO NOT COMMIT CHANGES TO THIS FILE TO GITHUB
*/


#define V_ZC_COMPILERSIG 1
//COMPILER SIGS
// MSVC  1
// G++   2
//      CLANG 3
//      INTEL 4


#define COMPILER_V_FIRST 0
#define COMPILER_V_SECOND 0
#define COMPILER_V_THIRD 0
#define COMPILER_V_FOURTH 0




#define COMPILER_NAME "MSVC"
#define COMPILER_VERSION "v142, 2019"

Copied both compilersig.h.sig and devsig.h.sig in src/metadata/sigs.

 

I'm now getting those errors:

 

Severity Code Description Project File Line Suppression State
Error MSB8066 Custom build for 'C:\Users\lucas\OneDrive\Documents\ZeldaClassic\build\CMakeFiles\c0f264be863784ce394a9f655fdd85f7\y.tab.cpp.rule;C:\Users\lucas\OneDrive\Documents\ZeldaClassic\build\CMakeFiles\c0f264be863784ce394a9f655fdd85f7\lex.yy.cpp.rule' exited with code 1. zquest C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets 238 
Error LNK1117 syntax error in option 'LARGEADDRESSAWARE:YES' romview C:\Users\lucas\OneDrive\Documents\ZeldaClassic\build\LINK 1 
Error RC1015 cannot open include file 'afxres.h'. zelda C:\Users\lucas\OneDrive\Documents\ZeldaClassic\zc_icon.rc 10 

 

 

Did you install the winflex and bison versions from the repo (./other/winflex) and add them to your path?

 

Also: You must not be using MSVC08: I see that you are using MSVC2019. LARGEADDRESSAWARE:YES must be my error. In your linker options, command line, change /LARGEADDRESSAWARE:YES to /LARGEADDRESSAWARE. I will fix the cmake files. Please inform me of what MSVC version you are using. 

 

I pushed a fix for the cmake file. If you are using git (you want to do this), then do git pull <remote> 2.55.

 

afxres.h should be part of your MSVC install, and is used to generate the software icoons and icon data; but as of MSVC17, it may not be. Here is some more information on how to resolve it

 

 


In the newest version of Visual Studio 2017 this seems to have been separated into two components that needs to be installed.

  1. Visual C++ ATL for x86 and x64
  2. Visual C++ MFC for x86 and x64

Tools -> Get Tools and Features... will list what components are installed and allow for adding and removing of components.

 

 

See ./src/metadata/readme.txt for the devsig info. 



#6 lucas92

lucas92

    Defender

  • Members

Posted 07 December 2020 - 06:16 PM

Hi ZoriaRPG,

 

I'm using MSVC2019 with cmake. I've installed winflex for the sourceforge website, I'll try with the one you provided in the other/winflex folder. I'll install ATL and the MFC components and try again see if it solves the problem.

 

EDIT - Solved. Thanks for the help.


Edited by lucas92, 07 December 2020 - 07:41 PM.


#7 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 07 December 2020 - 06:57 PM

That's flex/bison related in some way....



#8 lucas92

lucas92

    Defender

  • Members

Posted 07 December 2020 - 07:42 PM

Yep, solved it, it used the old flex/bison path.





Also tagged with one or more of these keywords: development

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users