21
Help / Re: set the proportion to 0 will cause codeblocks crash
« Last post by Miguel Gimenez on September 19, 2023, 06:54:40 pm »Created ticket 1415.
As usual while waiting for the next release - don't forget to check the nightly builds in the forum.
compiler.o:compiler.cpp:(.rdata$_ZTV8Compiler[_ZTV8Compiler]+0x230)||undefined reference to `Compiler::CheckForWarningsAndErrors(wxString const&, long&, wxString&)'|
||error: ld returned 1 exit status|
error: ld returned 1 exit status
/*
CallMemberFunction - define and invoke a function
that a member of the class Student
*/
#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
class Student
{
public:
// add a completed course to the record
double addCourse(int hours, double grade)
{
// calculate the sum of all courses times
// the average grade
double weightedGPA;
weightedGPA = semesterHours * gpa;
// now add in the new course
semesterHours += hours;
weightedGPA += grade * hours;
gpa = weightedGPA / semesterHours;
// return the new gpa
return gpa;
}
int semesterHours;
double gpa;
};
int main(int nNumberofArgs, char* pszArgs[])
{
// create a Student object and initialize it
Student s;
s.semesterHours = 3;
s.gpa = 3.0;
// the values before the call
cout << "Before: s = (" << s.semesterHours
<< ", " << s.gpa << ")" << endl;
// the following subjects the data members of the s
// object to the member function addCourse()
cout << "Adding 3 hours with a grade of 4.0" << endl;
s.addCourse(3, 4.0); // call the member function
// the values are now changed
cout << "After: s = (" << s.semesterHours
<< ", " << s.gpa << ")" << endl;
// wait until user is ready before terminating program
// to allow the user to see program results
cout << "Press Enter to continue...." << endl;
cin.ignore(10,'\n');
cin.get();
return 0;
}
||=== Build: Debug in CallMemberFunction (compiler: GNU GCC Compiler) ===|
||error: ld returned 1 exit status|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
Then, should the Run button be disabled always for Command only targets?
@echo off
set "current_path=%~dp0"
set "new_path1=%current_path%lib"
set PATH=%new_path1%;%PATH%
start "" /wait "C:\Program Files (x86)\AAAAA\ABC.exe"
cmd /c AAA.cmd
The commits in that ticket are related to the Run button enabled state, not to execution. See my reply in the ticket.