Eclipse can't find index libraries of GCC or G++
Solution 1
I had a similar problem with the HelloWorld example. "namespace Std" and "cout" gave a "not resolved" error. I fixed this by simply restarting eclipse. Seems it does not recognize all include paths after a fresh installation / project creation.
Solution 2
Try restart eclipse, clean all, and recompile every target.
Solution 3
I managed to get rid of the unresolved inclusion error, under the project properties C/C++ General -> Paths and Symbols, includes tab add a new a directory and choose /usr/include/c++/4.6.1
Now I don't have the unresolved warning but have all the Symbol could not resolved Ex:
#include <iostream> //
#include <stack> //these 3 lines are ok
using namespace std; //
list<int> newList; //get Symbol 'list' could not be resolved
cout<<"message"<<endl; //the same for 'cout' and 'endl'
It can build and debug just fine, but what is the point of having and IDE if it won't give you any help while coding
chie
Updated on September 18, 2022Comments
-
chie almost 2 years
I have the following code which works well.
The code is to display all the data from the database in input text field format. User is able to edit and update the details by clicking the update button at the end of each row to update the specific row.
Instead of clicking the update buttons one by one (if user wants to edit and update more than one row), now I would like to create a hyperlink which will update ALL the data at once.
The problem now is I dunno how to pass the value of $_post to the "update.php" since I already have
<form name="form1" action="submitAction.php" method="post">
I am not sure is it possible to do so. Or are there any other alternative ways?
<html> <script language="javascript" > <!-- hide function submitRequest(id) { document.forms[id].submit(); } // end hide --> </script> <!-- The Javasript (Onclick) to Remove the Readonly Attribute--> <script language="JavaScript"> function removeAlignment(id){ document.getElementById("ProjectName_"+id).removeAttribute("readonly",0); document.getElementById("DeviceType_"+id).removeAttribute("readonly",0); } </script> <body> <?php $counter=1; //Connecting and Accessing the Database $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("Project", $con); $result = mysql_query("SELECT * FROM Project where status='Ongoing'"); ?> <p><h2 align="center">ADC Project Funnel</h2></p> <table border="1" bordercolor="lavender" cellspacing="0" cellpadding="0"> <tr> <td width="20" bgcolor="steelblue" height="15" style="font-size: 11" align="center"><b><font face="Arial">No</font></b></td> <td width="78" bgcolor="steelblue" height="15" style="font-size: 11" align="center"><b><font face="Arial">Project Name</font></b></td> <td width="72" bgcolor="steelblue" height="15" style="font-size: 11" align="center"><b><font face="Arial">Device Type</font></b></td> <td width="67" bgcolor="steelblue" height="15" style="font-size: 11" align="center"><b><font face="Arial">Status</font></b></td> <td width="67" bgcolor="steelblue" height="15" style="font-size: 11" align="center"><b><font face="Arial"></font></b></td> </tr> <tr> <td colspan="15" height="15" bgcolor="#AFEEEE"><font face="Arial" size="1.9">Current Project Assignment</font></td> </tr> <!-- Records from the database (Current Project Assignment) --> <?php $i = 0; while ($row=mysql_fetch_array($result)){ ?> <tr> <form name="form1" action="submitAction.php" method="post"> <td height="5" width="20" align="center" style="font-size: 13" valign="middle"><?php echo $counter; ?></td> <td height="5" width="72" ><input type="text" autocomplete=off readonly="readonly" id="ProjectName_<?php echo $i; ?>" name="ProjectName<?php echo $row['No'];?>" value="<?php echo $row['ProjectName'];?>" size="20" style="font-size: 10"></font></td> <td height="5" width="72" ><input type="text" autocomplete=off readonly="readonly" id="DeviceType_<?php echo $i; ?>" name="DeviceType<?php echo $row['No'];?>" value="<?php echo $row['DeviceType'];?>" size="15" style="font-size: 10"></font></td> <td height="5" width="67" style="font-size: 13"> <select name="action" onchange="submitRequest(<?php echo $i; ?>);"> <option value=>Ongoing </option> <option value="<?php echo $row['ProjectName'];?>">Complete</option> <option value="<?php echo $row['Flag2'];?>">Future</option> <option value="<?php echo $row['Flag1'];?>">Cancel</option> <option value="<?php echo $row['No'];?>">Update</option> <option value="<?php echo $row['Flag3'];?>">Delete</option> </select> </td> <td height="5" width="64" ><input type="button" style="width:100%" value="Edit" onclick="removeAlignment(<?php echo $i; ?>);"></td> </tr> </form> <?php ?> <?php $i++; $counter++; } ?> <tr> <td colspan="16" bgcolor="#AFEEEE"><font face="Arial" size="1.9">Add New Project Assignment</font></td> </tr> <!-- Add New Records --> <tr> <form action="project_insert.php" method="post"> <td width="20" ></td> <td width="78" ><input type="text" autocomplete=off name="ProjectName" size="40" style="font-size: 10"></font></td> <td width="72" ><input type="text" autocomplete=off name="DeviceType" size="15" style="font-size: 10"></font> <td width="80" style="font-size: 13"> <select name="Status" style="width:100%"> <option value=Future>Future</option> <option value=Ongoing>Ongoing</option> </select> </td> <td> <input type="Submit" style="width:100%"value="Add"> </td> </form> </tr> </table> <br/> <table border="0" align="center" cellpadding="0" cellspacing="10"> <tr> <td valign="middle"><a href="http://localhost/Project/update.php">update</a></td> </tr> </table> <br/> </body> </html>
-
Admin over 12 yearsIt would help to change the language of messages gcc LC_MESSAGES=C gcc
-
Navid Golforoushan about 11 yearsyou can try to install g++ youtu.be/wl75o1Yc218 sometimes it happen based on compiler issue.
-
-
Ikke almost 13 yearsThat is not a smart thing to do. Search engines for example tend to visit every url on a page, which will result it to update everything when it visits this page.
-
Awea almost 13 yearsYes, but in a back office or in a logged page it's not a problem
-
Ikke almost 13 yearsIt's still a hack, and not where
GET
requests are meant for. It is asking for all sorts of problems. UsePOST
requests for actions that have consequences. -
Awea almost 13 yearsW3C rules ! ^^ so the solution for his problem could be a form with hidden input ?