שגיאת קומפילציה בויזואל סטודיו - תכנות - HWzone פורומים
עבור לתוכן
  • צור חשבון

שגיאת קומפילציה בויזואל סטודיו


netalish

Recommended Posts

היי,

אני כותבת תוכנית ממש פשוטה בC בויזואל ואני כל הזמן מקבלת שגיאה לא מובנת.

לפעמים כשאני מכבה את המחשב ומדליקה שוב זה מסתדר ואז חוזר שוב, לא נראה לי שזה קשור לקוד בכלל

זו השגיאה:

Error 2 error MSB6003: The specified task executable "link.exe" could not be run. The requested operation cannot be performed on a file with a user-mapped section open. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets 392 6 trg

והינה הקוד:

# include <stdio.h>
typedef int boolean;
# define TRUE 1
# define FALSE 0
int posStringInStr(char str[], char string[]);


void main()
{
char str[] = "abcdacba", string[] = "cb";
printf("%d\n", posStringInStr(str, string));
}
int posStringInStr(char str[], char string[])
{
char *pStr = str, *pString = string;
boolean found = FALSE;
int pos = 0;
int i = 0;


while( pStr != '\0' && pStr != pString)
{
if(pStr == pString)
{
found = TRUE;
while(pString != '\0' && found == TRUE)
{
if(pStr == pString)
{
pStr++;
i++;
pString += i;
}
else
{
found = FALSE;
i = 0;
}
}
}
else
{
pStr++;
pos++;
}
}
return pos;
}[/pre]

קישור לתוכן
שתף באתרים אחרים

הבעיה אכן לא בתכנית שלך - השגיאה אומרת שVS לא הצליח להריץ את link.exe, שזה הלינקר (שלב כלשהו בקומפילציה).

נסי להתקין מחדש את ה-Visual Studio.

אם זה לא עובד, נסי לחפש בגוגל את הודעת השגיאה ותראי איזה פתרונות מציעים לך.

קישור לתוכן
שתף באתרים אחרים

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

×
  • צור חדש...