Stilllegung des Forums
Das Forum wurde am 05.06.2023 nach über 20 Jahren stillgelegt (weitere Informationen und ein kleiner Rückblick).
Registrierungen, Anmeldungen und Postings sind nicht mehr möglich. Öffentliche Inhalte sind weiterhin zugänglich.
Das Team von spieleprogrammierer.de bedankt sich bei der Community für die vielen schönen Jahre.
Wenn du eine deutschsprachige Spieleentwickler-Community suchst, schau doch mal im Discord und auf ZFX vorbei!
Werbeanzeige
Das Problem mit dem iostream.h habe ich jetzt schon gelöst. Ich hab halt einfach die iostream.h aus GCC nach VC kopiert. Unschön aber es geht.
Im Moment habe ich das oben genannte Linker Problem.
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winsock2.h(132) : error C2011: 'fd_set': 'struct' Typneudefinition C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winsock.h(68): Siehe Deklaration von 'fd_set' C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winsock2.h(176) : error C2011: 'timeval': 'struct' Typneudefinition C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winsock.h(111): Siehe Deklaration von 'timeval' C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winsock2.h(232) : error C2011: 'hostent': 'struct' Typneudefinition C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winsock.h(167): Siehe Deklaration von 'hostent' C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winsock2.h(245) : error C2011: 'netent': 'struct' Typneudefinition C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winsock.h(180): Siehe Deklaration von 'netent' C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winsock2.h(252) : error C2011: 'servent': 'struct' Typneudefinition C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winsock.h(187): Siehe Deklaration von 'servent' C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winsock2.h(264) : error C2011: 'protoent': 'struct' Typneudefinition C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winsock.h(199): Siehe Deklaration von 'protoent' C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winsock2.h(360) : error C2011: 'WSAData': 'struct' Typneudefinition C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winsock.h(322): Siehe Deklaration von 'WSAData' C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winsock2.h(458) : error C2011: 'sockproto': 'struct' Typneudefinition C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winsock.h(494): Siehe Deklaration von 'sockproto' C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winsock2.h(500) : error C2011: 'linger': 'struct' Typneudefinition C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winsock.h(531): Siehe Deklaration von 'linger' |
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 |
#ifdef __GNUC__ # include <unistd.h> // Gibt's anscheinend bei VC nicht?!? #endif #include <windows.h> // das hab ich jetzt erst dazu gemacht, aber es hat sich nichts verändert :-( #include <winsock2.h> #include <ws2tcpip.h> #include <lmserver.h> |
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
// Fehler: // error C2275: 'RAYcolor_t': Ungültige Verwendung dieses Typs als Ausdruck typedef unsigned char RAYpixel_t; typedef int RAYcolor_t; /* ... */ RAYpixel_t* rayPixelBuffer; /* ... */ RAYcolor_t olda = rayPixelBuffer[i+3]; // Hier wurder der obige Fehler fest gestellt |
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 |
/* Fehler: error C2143: Syntaxfehler: Es fehlt ';' vor 'const' error C2065: 'olda': nichtdeklarierter Bezeichner */ const RAYcolor_t olda = rayPixelBuffer[i+3]; |
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »LukasBanana« (25.06.2010, 11:23)
Community-Fossil
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
extern "C" { #define RAYINLINE static __inline typedef unsigned char RAYpixel_t; typedef int RAYcolor_t; /* ... */ RAYpixel_t* rayPixelBuffer = 0; // der wird natürlich noch mit "calloc" gefüllt ;-) /* ... */ RAYINLINE void rayPlotIndexedAlphaEffect(RAYint i, const RAYfloat z, RAYcolor_t r, RAYcolor_t g, RAYcolor_t b, RAYcolor_t a) { // Plot the depth if (z >= rayDepthBuffer[i]) { rayDepthBuffer[i] = z; i <<= 2; rayPixelBuffer[i+0] = r * a / 255 + rayPixelBuffer[i+0] * ( 255 - a ) / 255; rayPixelBuffer[i+1] = g * a / 255 + rayPixelBuffer[i+1] * ( 255 - a ) / 255; rayPixelBuffer[i+2] = b * a / 255 + rayPixelBuffer[i+2] * ( 255 - a ) / 255; rayPixelBuffer[i+3] = a; } else { i <<= 2; r = r * a / 255 + rayPixelBuffer[i+0] * ( 255 - a ) / 255; g = g * a / 255 + rayPixelBuffer[i+1] * ( 255 - a ) / 255; b = b * a / 255 + rayPixelBuffer[i+2] * ( 255 - a ) / 255; // FEHLER HIER const RAYcolor_t olda = rayPixelBuffer[i+3]; // /FEHLER HIER rayPixelBuffer[i+0] = r * ( 255 - olda ) / 255 + rayPixelBuffer[i+0] * olda / 255; rayPixelBuffer[i+1] = g * ( 255 - olda ) / 255 + rayPixelBuffer[i+1] * olda / 255; rayPixelBuffer[i+2] = b * ( 255 - olda ) / 255 + rayPixelBuffer[i+2] * olda / 255; rayPixelBuffer[i+3] = a; } } } // /extern "C" |
C-/C++-Quelltext |
|
1 2 |
error C2143: Syntaxfehler: Es fehlt ';' vor 'const' error C2065: 'olda': nichtdeklarierter Bezeichner |
Community-Fossil
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »NachoMan« (25.06.2010, 15:33)
Werbeanzeige