07-c-language : Build failed #1

Closed
opened 2025-12-31 16:28:04 +01:00 by adam · 2 comments
Owner

Originally created by @alexwang3322 on GitHub (Mar 9, 2016).

When I run command "gradle mainExecutable" at folder "07-c-language" , a problem occurs:

  • What went wrong:
    A problem occurred evaluating root project '07-c-language'.

    Could not find method main() for arguments [build_boktgcsy0nabp9jw2aso8xe1k$_run_closure1_closure3@70aaa836] on root project '07-c-language'.

  • Try:
    Run with --info or --debug option to get more log output.

  • Exception is:
    org.gradle.api.GradleScriptException: A problem occurred evaluating root project '07-c-language'.
    at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:93)
    at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl$1.run(DefaultScriptPluginFactory.java:148)

I can't understand what 's the problem,plz give a sign or solve, thanks much :)

Originally created by @alexwang3322 on GitHub (Mar 9, 2016). When I run command "gradle mainExecutable" at folder "07-c-language" , a problem occurs: - What went wrong: A problem occurred evaluating root project '07-c-language'. > Could not find method main() for arguments [build_boktgcsy0nabp9jw2aso8xe1k$_run_closure1_closure3@70aaa836] on root project '07-c-language'. - Try: Run with --info or --debug option to get more log output. - Exception is: org.gradle.api.GradleScriptException: A problem occurred evaluating root project '07-c-language'. at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:93) at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl$1.run(DefaultScriptPluginFactory.java:148) I can't understand what 's the problem,plz give a sign or solve, thanks much :)
adam closed this issue 2025-12-31 16:28:04 +01:00
Author
Owner

@georgik commented on GitHub (Mar 9, 2016):

Hi Alex.

New version of Gradle has different syntax form C/C++ plugins.
Here is sample: http://stackoverflow.com/questions/29134071/building-c-program-with-gradle

Pull latest version, I made correction there.

@georgik commented on GitHub (Mar 9, 2016): Hi Alex. New version of Gradle has different syntax form C/C++ plugins. Here is sample: http://stackoverflow.com/questions/29134071/building-c-program-with-gradle Pull latest version, I made correction there.
Author
Owner

@georgik commented on GitHub (Mar 9, 2016):

Fixed also example 08.
Thank you for pointing out the issue.

@georgik commented on GitHub (Mar 9, 2016): Fixed also example 08. Thank you for pointing out the issue.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-mirrors/gradle-training#1