error:expected unqualified-id before string con

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vikram77
    New Member
    • Jan 2021
    • 1

    #1

    error:expected unqualified-id before string con

    this is my code:
    I am getting an error:expected unqualified-id before string constant

    Code:
    #include<iostream>
    #include<string>
    
    "version":1
    "name":"Example project"
    "build_commands": {
    	"CompileC++" : {
    		"action":"compile"
    		"args":["-fms-extensions", "-fms-compatibility", "-x", "c++", "-std=c++14", "-w"]
    		"sys_include_dir":["C:/include/ucrt", "C:/include/msvc"]
    		"include_dir":[""]
    		"comment":"The empty string in include_dir has the effect of adding the project folder to non-system header search path. For the record, any field not-interpreted by DevMax can be used to add comment like this."
    	}
    	"MakeExe" : {
    		"action":"link",
    		"args":["/defaultlib:msvcrt.lib", "/subsystem:Console"],
    		"sys_lib_dir":["C:/lib/msvc", "C:/lib/winsdk"]
    	}
    },
    "build_definitions": [
    	{
    		"name":"Build program",
    		"build_steps": [
    			{
    				"command":"CompileC++",
    				"inputs":["src/Source.cpp"]
    			},
    			{
    				"command":"MakeExe",
    				"inputs":["src/Source.o"],
    				"output":"Source.exe"
    			}
    		]
    	},
    	{
    		"name":"Inline/anonymous build command",
    		"build_steps": [
    			{
    				"action":"compile",
    				"args":["-fms-extensions", "-fms-compatibility", "-x", "c++", "-std=c++14", "-w"],
    				"sys_include_dir":["C:/include/ucrt", "C:/include/msvc"],
    				"include_dir":[""],
    				"inputs":["src/Source.cpp"]
    			}
    can somebody help me please.

    I am getting an error:expected unqualified-id before string constant
    Last edited by Niheel; Jan 19 '21, 02:58 AM.
  • dev7060
    Recognized Expert Contributor
    • Mar 2017
    • 656

    #2
    Where's the code?   ⠀⠀⠀⠀               ⠀⠀⠀⠀             

    Comment

    • Banfa
      Recognized Expert Expert
      • Feb 2006
      • 9067

      #3
      Are you trying to compile a JSON file as C code?

      Comment

      Working...