unbekannter fehler
-
Mist, mal wieder ein fehler:
[RC Fehler] xstddef(63): Expecting resource name or resource type nameka, wo der herkommt. Die xstddef sieht so aus.
// xstddef standard header #ifndef _XSTDDEF_ #define _XSTDDEF_ #ifndef _YVALS #include <yvals.h> #endif /* _YVALS */ #include <cstddef> _STD_BEGIN // EXCEPTION MACROS #if _HAS_EXCEPTIONS #define _TRY_BEGIN try { #define _CATCH(x) } catch (x) { #define _CATCH_ALL } catch (...) { #define _CATCH_END } #define _RAISE(x) throw (x) #define _RERAISE throw #define _THROW0() throw () #define _THROW1(x) throw (x) #define _THROW(x, y) throw x(y) #else /* _HAS_EXCEPTIONS */ #define _TRY_BEGIN {{ #define _CATCH(x) } if (0) { #define _CATCH_ALL } if (0) { #define _CATCH_END }} #if __GNUC__ < 3 && !defined(__APPLE__) && !defined(__MINGW32__) #define _RAISE(x) _XSTD _Throw(x) #else /* __GNUC__ < 3 && !defined(__APPLE__) && !defined(__MINGW32__) */ #define _RAISE(x) ::std:: _Throw(x) #endif /* __GNUC__ < 3 && !defined(__APPLE__) && !defined(__MINGW32__) */ #define _RERAISE #define _THROW0() #define _THROW1(x) #define _THROW(x, y) x(y)._Raise() #endif /* _HAS_EXCEPTIONS */ // typename KEYWORD /* #define _TEMPLATE template<> */ #ifndef _TEMPLATE_STAT /* #define _TEMPLATE_STAT template<> */ #endif /* */ #ifndef _TEMPLATE_MEMBER /* #define _TEMPLATE_MEMBER template */ #endif /* _TEMPLATE_MEMBER */ // BITMASK MACROS #define _BITMASK(Enum, Ty) typedef Enum Ty #define _BITMASK_OPS(Ty) \ inline Ty& operator&=(Ty& _Left, Ty _Right) \ { /* return _Left &= _Right */ \ _Left = (Ty)((int)_Left & (int)_Right); return _Left; \ //das ist die zeile 63, in der der fehler sein soll, obwohl ich an dieser datei nix verändert habe... } \ \ inline Ty& operator|=(Ty& _Left, Ty _Right) \ { /* return _Left |= _Right */ \ _Left = (Ty)((int)_Left | (int)_Right); return _Left; \ } \ \ inline Ty& operator^=(Ty& _Left, Ty _Right) \ { /* return _Left &= _Right */ \ _Left = (Ty)((int)_Left ^ (int)_Right); return _Left; \ } \ \ inline Ty operator&(Ty _Left, Ty _Right) \ { /* return _Left & _Right */ \ return ((Ty)((int)_Left & (int)_Right)); \ } \ \ inline Ty operator|(Ty _Left, Ty _Right) \ { /* return _Left | _Right */ \ return ((Ty)((int)_Left | (int)_Right)); \ } \ \ inline Ty operator^(Ty _Left, Ty _Right) \ { /* return _Left ^ _Right */ \ return ((Ty)((int)_Left ^ (int)_Right)); \ } \ \ inline Ty operator~(Ty _Left) \ { /* return ~_Left */ \ return ((Ty)~(int)_Left); \ } // MISCELLANEOUS MACROS #define _DESTRUCTOR(ty, ptr) (ptr)->~ty() #define _MESG(str) str #define _PROTECTED protected #define _TDEF(x) = x #define _TDEF2(x, y) = x, y #define _STCONS(ty, name, val) static const ty name = (ty)(val) #ifndef _XSTD #define _X_STD_BEGIN _STD_BEGIN #define _X_STD_END _STD_END #define _XSTD _STD /* LEAVE SPACE */ #endif /* _XSTD */ // TYPE DEFINITIONS enum _Uninitialized { // tag for suppressing initialization _Noinit}; _STD_END #endif /* _XSTDDEF_ */ /* * Copyright (c) 1992-2003 by P.J. Plauger. ALL RIGHTS RESERVED. * Consult your license regarding permissions and restrictions. V4.02:1422 */main.cpp
#include"Main.h" App Program; LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); App::App() //Konstruktorfunktion { strcpy(szClassName, "Vokabeltrainer"); } App::~App() //Destruktorfunktion { } HWND hWnd; // Window Handle MSG message; //Messages WNDCLASSEX wc; //Window class HMENU menu; // Menu Handle App::Vokabeldatei_erstellen() { return 0; } int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLine, int iCmdShow) { wc.hInstance = hInstance; wc.lpszClassName = Program.szClassName; wc.lpfnWndProc = WndProc; wc.style = CS_HREDRAW | CS_VREDRAW; wc.cbSize = sizeof(WNDCLASSEX); wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); wc.hIconSm = LoadIcon(NULL, IDI_APPLICATION); wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.lpszMenuName = NULL; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hbrBackground = (HBRUSH) COLOR_BACKGROUND; if(!RegisterClassEx(&wc)) { return 0; } hWnd = CreateWindowEx( WS_EX_CLIENTEDGE, Program.szClassName, "Vokabeltrainer", WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX, CW_USEDEFAULT, CW_USEDEFAULT, 600, 400, NULL, NULL, hInstance, NULL); ShowWindow(hWnd, iCmdShow); menu = LoadMenu(hInstance, MAKEINTRESOURCE(ID_MENU)); SetMenu(hWnd, menu); //UpdateWindow(hWnd); while (GetMessage (&message, NULL, 0, 0)) { TranslateMessage(&message); DispatchMessage(&message); } return message.wParam; } LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { static HBRUSH hBrush; //Brush für den schrifthintergrund static RECT rect; //Fenstergröße const char szUeberschrift1[] = "Englische Vokabel:"; // Überschrift für das eingabefelde der englischen vokabel const char szUeberschrift2[] = "Deutsche Vokabel:"; // Das selbe für die deutsche Vokabel const char szUeberschrift3[] = "Inhalt der Vokabeldatei:"; // jo, nomal für das dritte editfeld const char szUeberschrift4[] = "Bereits abgefragte Vokabeln:"; // <- Program.optionen[0] = FALSE; //Program.optionen[1] = FALSE; DWORD d; switch (message) { case WM_SIZE: { rect.left = 0; rect.top = 0; rect.right = LOWORD(lParam); rect.bottom = HIWORD(lParam); return 0; } case WM_COMMAND: { switch (LOWORD(wParam)) { case IDM_NEWVOK: { Program.Vokabeldatei_erstellen(); break; } case IDM_OPENVOK: case IDM_SAVEVOK: case IDM_PRACTICEVOK: case IDM_HELP: { MessageBox(hWnd, TEXT("Funktion noch nicht implementiert"), TEXT("Vokabeltrainer"), MB_OK | MB_ICONWARNING); } break; case IDM_\1: { MessageBox(NULL, TEXT("Vokabeltrainer\nCopyright bei Martin 'Arathorns Sohn' Alsfasser\nDark Grass Software"), TEXT("Über das Programm"), MB_OK | MB_ICONINFORMATION); } break; case IDM_EXIT: { PostQuitMessage(0); } break; } if (lParam == (LPARAM)GetDlgItem(hWnd, IDC_BTN_INSERT)) { if (HIWORD(wParam) == BN_CLICKED) { MessageBox(NULL, TEXT("Funktion noch nicht implementiert"), TEXT("Vokabeltrainer"), MB_ICONWARNING | MB_OK); } } } break; case WM_CTLCOLORSTATIC: { if ((HWND) lParam == GetDlgItem(hWnd, IDC_EDIT_1)) { SetBkColor((HDC)wParam, RGB(255, 255, 255)); return (LRESULT)hBrush; } SetBkMode((HDC)wParam, GetSysColor(COLOR_WINDOW)); SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); return 0; }break; case WM_CTLCOLOREDIT: { if((HWND)lParam == GetDlgItem(hWnd, IDC_EDIT_2)) { SetBkColor((HDC)wParam, RGB(255, 255, 255)); return (LRESULT)hBrush; } if((HWND)lParam == GetDlgItem(hWnd, IDC_EDIT_3)) { SetBkColor((HDC)wParam, RGB(255, 255, 255)); return(LRESULT)hBrush; } }break; case WM_CREATE: { hBrush = CreateSolidBrush(RGB(255, 255, 255)); if(CreateWindowEx( WS_EX_CLIENTEDGE, TEXT("edit"), NULL, WS_CHILD | WS_VISIBLE | ES_READONLY | WS_VSCROLL | ES_AUTOVSCROLL | ES_MULTILINE, 310, 30, 270, 310, hWnd, (HMENU)IDC_EDIT_1, ((LPCREATESTRUCT)lParam)->hInstance, NULL) == NULL || CreateWindowEx( WS_EX_CLIENTEDGE, TEXT("edit"), NULL, WS_CHILD | WS_VISIBLE, 40, 70, 230, 22, hWnd, (HMENU)IDC_EDIT_2, ((LPCREATESTRUCT)lParam)->hInstance, NULL) == NULL || CreateWindowEx( WS_EX_CLIENTEDGE, TEXT("edit"), NULL, WS_CHILD | WS_VISIBLE, 40, 120, 230, 22, hWnd, (HMENU)IDC_EDIT_3, ((LPCREATESTRUCT)lParam)->hInstance, NULL) == NULL || CreateWindowEx( 0, TEXT("button"), TEXT("Eintragen"), WS_CHILD | WS_VISIBLE, 70, 150, 160, 22, hWnd, (HMENU)IDC_BTN_INSERT, ((LPCREATESTRUCT)lParam)->hInstance, NULL) == NULL) { return -1; } UpdateWindow(hWnd); }break; case WM_PAINT: { HDC hDC; PAINTSTRUCT ps; hDC = BeginPaint(hWnd, &ps); { SetBkMode(hDC, TRANSPARENT); TextOut(hDC, 40, 50, szUeberschrift1, sizeof(szUeberschrift1) - 1); TextOut(hDC, 40, 100, szUeberschrift2, sizeof(szUeberschrift2) - 1); if (Program.optionen[0] == TRUE) { TextOut(hDC, 310, 10, szUeberschrift4, sizeof(szUeberschrift4) - 1); } else if(Program.optionen[0] == FALSE) { TextOut(hDC, 310, 10, szUeberschrift3, sizeof(szUeberschrift3) - 1); } } EndPaint(hWnd, &ps); }break; case WM_DESTROY: { if (hBrush) { DeleteObject(hBrush); } PostQuitMessage (0); break; } } return DefWindowProc(hWnd, message, wParam, lParam); }main.h
#include<windows.h> #include<map.h> #include<string> using namespace std; #define ID_MENU 501 #define IDM_NEWVOK 200 #define IDM_OPENVOK 201 #define IDM_PRACTICEVOK 202 #define IDM_EXIT 203 #define IDM_HELP 204 #define IDM_ABOUT 205 #define IDM_SAVEVOK 206 #define IDC_EDIT_1 1001 #define IDC_EDIT_2 1002 #define IDC_EDIT_3 1003 #define IDC_BTN_INSERT 1004 class App //Programm Klasse { public: App(); //Konstruktor ~App(); //Destruktor char szClassName[]; //Klassenname int Vokabeldatei_erstellen(); //Funktion zum erstellen einer Vokabeldatei int Vokabeldatei_oeffnen(); //Funktion zum erweitern einer Vokabeldatei int Vokabel_eintragen(); //Funktion um Vokabeln in eine datei einzutragen int Vokabeln_abfragen(); //Funktion zum abfragen von Vokabeln aus einer Vokabeldatei unsigned long Error; bool optionen[10]; //0 = Vokabeln abfragen? 1 = speichern?, 2, 3, 4, 5, 6, 7, 8, 9, 10 = unbelegt private: multimap<char, char> vokabular; multimap<char, char>::iterator it; char *buffer1[0]; //Buffer Englische Vokabel int iLength1; //Länge Englische Vokabel char *buffer2[0]; //Buffer deutsche Vokabel int iLength2; //Länge deutsche Vokabel char tmp1[100], tmp2[100]; };rsrc.rc
#include "Main.h" 501 MENU BEGIN POPUP "&Aufgaben" BEGIN MENUITEM "&Neue Vokabeldatei anlegen", IDM_NEWVOK MENUITEM "&Vokabeldatei bearbeiten", IDM_OPENVOK MENUITEM "&Vokabeldatei speichern", IDM_SAVEVOK MENUITEM SEPARATOR MENUITEM "&Vokabeln abfragen", IDM_PRACTICEVOK MENUITEM SEPARATOR MENUITEM "&Programm beenden", IDM_EXIT END POPUP "&Hilfe" BEGIN MENUITEM "&Hilfe", IDM_HELP MENUITEM "&Über das Programm", IDM_ABOUT END ENDwenn ihr die ganze projektdatei braucht, sagt bitte beschied.
Den fehler bekomme ich, wenn ich das programm miter Borland ide kompilieren will.
habs auch mal mit wx-devcpp versucht, aber der meint:
20 C:\Dokumente und Einstellungen\Martin\Desktop\Vokabeltrainer2.0\new2\Main.cpp ISO C++ forbids declaration of `Vokabeldatei_speichern' with no typecode ist der von oben, hab nur die funktion vokabeldatei_erstellen nach Vokabeldatei_speichern umbenannt.
-
Der erste Fehler kommt wohl daher, daß der Ressourcen-Compiler keinen vollwertigen C(++) Präprozessor verwendet (oder benötigt) - du solltest deine Ressourcen-#define's besser in einen eigenen Header auslagern, der sowohl von der main.h als auch von der rsrc.rc eingebunden wird (MSVC verwaltet den automatisch).
Der zweite Fehler ist Dummheit - am Anfang der Zeile 20 fehlt die Angabe des Rückgabetyps "int".
-
THX, das erste versuch ichmal, zum zweiten: wenn ich das versuche bekomme ich beim Linken ne ganze reihe fehler:
Compiler: Default GCC compiler
Building Makefile: "C:\Dokumente und Einstellungen\Martin\Desktop\Vokabeltrainer2.0\new2\Makefile.win"
Führt make... aus
mingw32-make.exe -f "C:\Dokumente und Einstellungen\Martin\Desktop\Vokabeltrainer2.0\new2\Makefile.win" all
g++.exe -c Main.cpp -o Objects/MingW/Main.o -I"D:/Programme/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"D:/Programme/Dev-Cpp/include/c++/3.4.2/backward" -I"D:/Programme/Dev-Cpp/include/c++/3.4.2/mingw32" -I"D:/Programme/Dev-Cpp/include/c++/3.4.2" -I"D:/Programme/Dev-Cpp/include" -I"D:/Programme/Dev-Cpp/" -I"D:/Programme/Dev-Cpp/include/common/wx/msw" -I"D:/Programme/Dev-Cpp/include/common/wx/generic" -I"D:/Programme/Dev-Cpp/include/common/wx/fl" -I"D:/Programme/Dev-Cpp/include/common/wx/gizmos" -I"D:/Programme/Dev-Cpp/include/common/wx/html" -I"D:/Programme/Dev-Cpp/include/common/wx/mmedia" -I"D:/Programme/Dev-Cpp/include/common/wx/net" -I"D:/Programme/Dev-Cpp/include/common/wx/ogl" -I"D:/Programme/Dev-Cpp/include/common/wx/plot" -I"D:/Programme/Dev-Cpp/include/common/wx/protocol" -I"D:/Programme/Dev-Cpp/include/common/wx/stc" -I"D:/Programme/Dev-Cpp/include/common/wx/svg" -I"D:/Programme/Dev-Cpp/include/common/wx/xml" -I"D:/Programme/Dev-Cpp/include/common/wx/xrc" -I"D:/Programme/Dev-Cpp/include/common/wx" -I"D:/Programme/Dev-Cpp/include/common"windres.exe --input-format=rc -o Objects/MingW/Projekt1_private.res --include-dir "D:/PROGRA~1/Dev-Cpp/include/common" Objects/MingW/PROJEK~1.RC -O coff
In file included from Objects/MingW/../../Rsrc.rc:2,
from Objects/MingW/PROJEK~1.RC:3:
Objects/MingW/../../Main.h:2:14: map: No such file or directory
Objects/MingW/../../Main.h:3:17: string: No such file or directoryg++.exe Objects/MingW/Main.o Objects/MingW/Projekt1_private.res -o "Output\MingW\Projekt1.exe" -L"D:/Programme/Dev-Cpp/Lib"
Objects/MingW/Main.o:Main.cpp:(.text+0x682): undefined reference to
SetBkColor@8' Objects/MingW/Main.o:Main.cpp:(.text+0x6b3): undefined reference toSetBkMode@8'
Objects/MingW/Main.o:Main.cpp:(.text+0x6d4): undefined reference toSetBkColor@8' Objects/MingW/Main.o:Main.cpp:(.text+0x714): undefined reference toSetBkColor@8'
Objects/MingW/Main.o:Main.cpp:(.text+0x759): undefined reference toSetBkColor@8' Objects/MingW/Main.o:Main.cpp:(.text+0x778): undefined reference toCreateSolidBrush@4'
Objects/MingW/Main.o:Main.cpp:(.text+0x98e): undefined reference toSetBkMode@8' Objects/MingW/Main.o:Main.cpp:(.text+0x9be): undefined reference toTextOutA@20'
Objects/MingW/Main.o:Main.cpp:(.text+0x9ee): undefined reference toTextOutA@20' Objects/MingW/Main.o:Main.cpp:(.text+0xa2d): undefined reference toTextOutA@20'
Objects/MingW/Main.o:Main.cpp:(.text+0xa68): undefined reference toTextOutA@20' Objects/MingW/Main.o:Main.cpp:(.text+0xa9b): undefined reference toDeleteObject@4'
collect2: ld returned 1 exit statusmingw32-make.exe: *** [Output/MingW/Projekt1.exe] Error 1
Ausführung beendet
-
Objects/MingW/../../Main.h:2:14: map: No such file or directory
Objects/MingW/../../Main.h:3:17: string: No such file or directoryschaut mir fast so aus als ob der mit den includes von <map> und <string> nicht klarkommt
undefined reference weist immer drauf hin das du eventuell eine methode zwar deklariert aber nciht definiert ist oder der zeiger auf deine DLL irgendwie nicht klappt ... ... .. sry fall ich mich mit dem deklariert und definiert wieder vertan hab? ich verwechsel die immer
-
wat soll ich da machen?
-
Hab den Eindruck, Du versuchst ein nicht von Dir selbstgeschriebener Quellcode auf Deinem System zum Laufen zu bringen. Und bist dann bei den ganzen Compiler- und Linker-Warnungen erstmal erschlagen?
In diesem Fall von mir eine Hilfe zur Selbsthilfe auf zweierlei Art und Weise:
a) Betrachte erstmal immer nur die erste Fehlermeldung. Und versuche die Ursache für diese erste Fehlermeldung zu ergründen. Diese Ursache beseitigen, neuer Compiler- und Linker-Lauf. Und dann knöpfst Du Dir die (neue bzw. verbleibende) erste Fehlermeldung ab. Solange nacheinander bis Du keine Fehlermeldungen mehr hast.Oder:
b) Reduziere den ganzen Quellcode erstmal auf den allernötigsten Rumpf. D.h. erstmal nur noch WinMain() aber ohne ohne Inhalt. Sind da noch Fehlermeldungen?
Nachdem die Fehlermeldungen beseitigt sind, baust Du schrittweise die Funktionen in WinMain() wieder ein. usw. und so fort. Irgendwann hast Du wieder den kompletten Quellcode aber diesmal ohne die Compiler- und Linker Fehlermeldungen!Beispiel:
Objects/MingW/../../Main.h:2:14: map: No such file or directory
Objects/MingW/../../Main.h:3:17: string: No such file or directoryAlleine diese beiden Fehlermeldungen deuten darauf hin daß eher der Pfad (also "Objects/MingW/../../") und nicht der Dateiname stimmt -> also den Pfad korrigieren.
Zu diesem speziellen Thema meine persönliche Vermutung: Ein Vorhandensein von relativen Rückwärts-Pfadangaben wie "../" deutet eher auf ein großes bis riesengroßes Projekt hin! -> d.h. Du mußt wissen was Du tust und was Dein Projekt an Files und Modulen so alles braucht!!!
Martin
-
Der code ist von mir. das seltsamme, bis neulichhat er ja geklappt. Und nun nicht mehr. So groß ist das projekt auch garnicht. Eigentlich nur die dateien von Oben. Pfad ist so lang, weil das ganze in nem unterordner von nem unterordner von nem ordner ist^^
aja, den tip von ganz oben hab ich versucht( also die #defines auslagern) hat nix gebracht. als ide verwende ich die Borland TurboC++ die müsste dat abe wohl auch können...
ps: wenn ich map.h includiere, bekomme ich noch diesen fehler:
32:2 D:\Programme\Dev-Cpp\include\c++\3.4.2\backward\backward_warning.h #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
-
ach kommt. ijemand wird doch wohl ne antwort wissen. hab auch schon die include pfade gechekt. die stimmen auch.
-
Hast du gdi32.lib drin? Also von wegen der undefined reference's ...
Naja du solltest den Compiler mal wechseln ^^ Oder mach einfach mal nen kompletten rebuild ... die Header (also die vom Standard) müssen selbstverständlich ohne .h sein. Wie der Compiler dir auch korrekterweise mitgeteilt hat.
-
ich probiers mal aus.( wegen dem compiler: ich habs schon mit wx-Devcpp und Borland Turbo c++2006 versucht...)
edit: ein paar fehler sind weg...
der neue compilierlog:Compiler: Default GCC compiler
Building Makefile: "C:\Dokumente und Einstellungen\Martin\Desktop\Vokabeltrainer2.0\new2\Makefile.win"
Führt make... aus
mingw32-make.exe -f "C:\Dokumente und Einstellungen\Martin\Desktop\Vokabeltrainer2.0\new2\Makefile.win" all
g++.exe -c Main.cpp -o ../new2/Main.o -I"D:/Programme/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"D:/Programme/Dev-Cpp/include/c++/3.4.2/backward" -I"D:/Programme/Dev-Cpp/include/c++/3.4.2/mingw32" -I"D:/Programme/Dev-Cpp/include/c++/3.4.2" -I"D:/Programme/Dev-Cpp/include" -I"D:/Programme/Dev-Cpp/" -I"D:/Programme/Dev-Cpp/include/common/wx/msw" -I"D:/Programme/Dev-Cpp/include/common/wx/generic" -I"D:/Programme/Dev-Cpp/include/common/wx/fl" -I"D:/Programme/Dev-Cpp/include/common/wx/gizmos" -I"D:/Programme/Dev-Cpp/include/common/wx/html" -I"D:/Programme/Dev-Cpp/include/common/wx/mmedia" -I"D:/Programme/Dev-Cpp/include/common/wx/net" -I"D:/Programme/Dev-Cpp/include/common/wx/ogl" -I"D:/Programme/Dev-Cpp/include/common/wx/plot" -I"D:/Programme/Dev-Cpp/include/common/wx/protocol" -I"D:/Programme/Dev-Cpp/include/common/wx/stc" -I"D:/Programme/Dev-Cpp/include/common/wx/svg" -I"D:/Programme/Dev-Cpp/include/common/wx/xml" -I"D:/Programme/Dev-Cpp/include/common/wx/xrc" -I"D:/Programme/Dev-Cpp/include/common/wx" -I"D:/Programme/Dev-Cpp/include/common" -I"D:/Dev-Cpp/include"g++.exe ../new2/Main.o Projekt1_private.res -o "Projekt1.exe" -L"D:/Programme/Dev-Cpp/Lib" -L"D:/Dev-Cpp/lib" -L"D:/Dev-Cpp/bin"
../new2/Main.o:Main.cpp:(.text+0x682): undefined reference to
SetBkColor@8' ../new2/Main.o:Main.cpp:(.text+0x6b3): undefined reference toSetBkMode@8'
../new2/Main.o:Main.cpp:(.text+0x6d4): undefined reference toSetBkColor@8' ../new2/Main.o:Main.cpp:(.text+0x714): undefined reference toSetBkColor@8'
../new2/Main.o:Main.cpp:(.text+0x759): undefined reference toSetBkColor@8' ../new2/Main.o:Main.cpp:(.text+0x778): undefined reference toCreateSolidBrush@4'
../new2/Main.o:Main.cpp:(.text+0x98e): undefined reference toSetBkMode@8' ../new2/Main.o:Main.cpp:(.text+0x9be): undefined reference toTextOutA@20'
../new2/Main.o:Main.cpp:(.text+0x9ee): undefined reference toTextOutA@20' ../new2/Main.o:Main.cpp:(.text+0xa2d): undefined reference toTextOutA@20'
../new2/Main.o:Main.cpp:(.text+0xa68): undefined reference toTextOutA@20' ../new2/Main.o:Main.cpp:(.text+0xa9b): undefined reference toDeleteObject@4'
collect2: ld returned 1 exit statusmingw32-make.exe: *** [Projekt1.exe] Error 1
Ausführung beendet
-
Laut http://msdn2.microsoft.com/en-us/library/ms532387.aspx sollten
../new2/Main.o:Main.cpp:(.text+0x778): undefined reference to `CreateSolidBrush@4'
nicht auftreten ... wenn du gdi32.lib, wie ich es dir gesagt habe, eingebunden hast.
Das selbe gilt für die restlichen undefinierten Referenzen ...
-
mal sehen, ob ich das hinbekomme.^^
-
hab die jetzt hinugefügt, aber jetzt findet er die map und die string wieder nicht... wenn ich die rausmache gibts noch diesen fehler:
Compiler: Default GCC compiler
Building Makefile: "C:\Dokumente und Einstellungen\Martin\Desktop\Vokabeltrainer2.0\new2\Makefile.win"
Führt make... aus
mingw32-make.exe -f "C:\Dokumente und Einstellungen\Martin\Desktop\Vokabeltrainer2.0\new2\Makefile.win" all
g++.exe -c Main.cpp -o ../new2/Main.o -I"D:/Programme/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"D:/Programme/Dev-Cpp/include/c++/3.4.2/backward" -I"D:/Programme/Dev-Cpp/include/c++/3.4.2/mingw32" -I"D:/Programme/Dev-Cpp/include/c++/3.4.2" -I"D:/Programme/Dev-Cpp/include" -I"D:/Programme/Dev-Cpp/" -I"D:/Programme/Dev-Cpp/include/common/wx/msw" -I"D:/Programme/Dev-Cpp/include/common/wx/generic" -I"D:/Programme/Dev-Cpp/include/common/wx/fl" -I"D:/Programme/Dev-Cpp/include/common/wx/gizmos" -I"D:/Programme/Dev-Cpp/include/common/wx/html" -I"D:/Programme/Dev-Cpp/include/common/wx/mmedia" -I"D:/Programme/Dev-Cpp/include/common/wx/net" -I"D:/Programme/Dev-Cpp/include/common/wx/ogl" -I"D:/Programme/Dev-Cpp/include/common/wx/plot" -I"D:/Programme/Dev-Cpp/include/common/wx/protocol" -I"D:/Programme/Dev-Cpp/include/common/wx/stc" -I"D:/Programme/Dev-Cpp/include/common/wx/svg" -I"D:/Programme/Dev-Cpp/include/common/wx/xml" -I"D:/Programme/Dev-Cpp/include/common/wx/xrc" -I"D:/Programme/Dev-Cpp/include/common/wx" -I"D:/Programme/Dev-Cpp/include/common" -I"D:/Dev-Cpp/include"g++.exe ../new2/Main.o Projekt1_private.res -o "Projekt1.exe" -L"D:/Programme/Dev-Cpp/Lib" -L"D:/Dev-Cpp/lib" -L"D:/Dev-Cpp/bin" - gdi32.lib
g++.exe: gdi32.lib: No such file or directory
g++.exe: -E required when input is from standard inputmingw32-make.exe: *** [Projekt1.exe] Error 1
Ausführung beendet
-
Leute, es is gelöst. ich hab vergessen in der Rsrc.rc das #include2main.h" rauszunehmen. jetzt kompiliert borland fehlerfrei.^^