Du bist nicht angemeldet.

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

Garg

Frischling

  • »Garg« ist der Autor dieses Themas

Beiträge: 3

Wohnort: Bonn

Beruf: Student

  • Private Nachricht senden

1

29.10.2004, 17:31

Probleme ein erstes Projekt zum Laufen zu bringen

Hi,
meine Daten:

-MS Visual Studio .NET 2003
-Microsoft DirectX 9.0 SDK (Summer 2004), habe es auch schon mit Okt 2004 versucht


wollte zuerst ein "raw_project" erstellen, auf das ich immerwieder neu aufbauen kann, falls ich mist gebaut habe. Nur läuft das leider noch nichtmals.

New Project -> Win32 Project ...
ProjectProperties -> Linker -> Input -> auf tribase.lib bzw. tribaseD.lib eingestellt, sowie unter tools -> options -> VC++ Directories die Include und Lib Einstellungen vorgenommen, soweit DirectX SDK das nicht schon selber gemacht hat.

habe in diesem Projekt nur #include "tribase.h" (auch mit < > und GroßKleinSchreibung geändert) eingefügt und das Ergebnis ist dieses:

------ Build started: Project: raw_project, Configuration: Debug Win32 ------

Compiling...
raw_project.cpp
c:\Programme\Microsoft DirectX 9.0 SDK (Summer 2004)\Include\dsound.h(230) : error C2143: syntax error : missing ';' before '*'
c:\Programme\Microsoft DirectX 9.0 SDK (Summer 2004)\Include\dsound.h(230) : error C2501: 'LPCWAVEFORMATEX' : missing storage-class or type specifiers
c:\Programme\Microsoft DirectX 9.0 SDK (Summer 2004)\Include\dsound.h(349) : error C2146: syntax error : missing ';' before identifier 'lpwfxFormat'
c:\Programme\Microsoft DirectX 9.0 SDK (Summer 2004)\Include\dsound.h(349) : error C2501: '_DSBUFFERDESC::LPWAVEFORMATEX' : missing storage-class or type specifiers
c:\Programme\Microsoft DirectX 9.0 SDK (Summer 2004)\Include\dsound.h(349) : error C2501: '_DSBUFFERDESC::lpwfxFormat' : missing storage-class or type specifiers
c:\Programme\Microsoft DirectX 9.0 SDK (Summer 2004)\Include\dsound.h(365) : error C2146: syntax error : missing ';' before identifier 'lpwfxFormat'
c:\Programme\Microsoft DirectX 9.0 SDK (Summer 2004)\Include\dsound.h(365) : error C2501: '_DSBUFFERDESC1::LPWAVEFORMATEX' : missing storage-class or type specifiers
c:\Programme\Microsoft DirectX 9.0 SDK (Summer 2004)\Include\dsound.h(365) : error C2501: '_DSBUFFERDESC1::lpwfxFormat' : missing storage-class or type specifiers
c:\Programme\Microsoft DirectX 9.0 SDK (Summer 2004)\Include\dsound.h(416) : error C2146: syntax error : missing ';' before identifier 'lpwfxFormat'
c:\Programme\Microsoft DirectX 9.0 SDK (Summer 2004)\Include\dsound.h(416) : error C2501: '_DSCBUFFERDESC1::LPWAVEFORMATEX' : missing storage-class or type specifiers
c:\Programme\Microsoft DirectX 9.0 SDK (Summer 2004)\Include\dsound.h(416) : error C2501: '_DSCBUFFERDESC1::lpwfxFormat' : missing storage-class or type specifiers
c:\Programme\Microsoft DirectX 9.0 SDK (Summer 2004)\Include\dsound.h(425) : error C2146: syntax error : missing ';' before identifier 'lpwfxFormat'
c:\Programme\Microsoft DirectX 9.0 SDK (Summer 2004)\Include\dsound.h(425) : error C2501: '_DSCBUFFERDESC::LPWAVEFORMATEX' : missing storage-class or type specifiers
c:\Programme\Microsoft DirectX 9.0 SDK (Summer 2004)\Include\dsound.h(425) : error C2501: '_DSCBUFFERDESC::lpwfxFormat' : missing storage-class or type specifiers
c:\Programme\Microsoft DirectX 9.0 SDK (Summer 2004)\Include\dsound.h(686) : error C2061: syntax error : identifier 'LPWAVEFORMATEX'
c:\Programme\Microsoft DirectX 9.0 SDK (Summer 2004)\Include\dsound.h(696) : error C2061: syntax error : identifier 'LPCWAVEFORMATEX'
c:\Programme\Microsoft DirectX 9.0 SDK (Summer 2004)\Include\dsound.h(770) : error C2061: syntax error : identifier 'LPWAVEFORMATEX'
c:\Programme\Microsoft DirectX 9.0 SDK (Summer 2004)\Include\dsound.h(780) : error C2061: syntax error : identifier 'LPCWAVEFORMATEX'
c:\Programme\Microsoft DirectX 9.0 SDK (Summer 2004)\Include\dsound.h(1041) : error C2061: syntax error : identifier 'LPWAVEFORMATEX'
c:\Programme\Microsoft DirectX 9.0 SDK (Summer 2004)\Include\dsound.h(1099) : error C2061: syntax error : identifier 'LPWAVEFORMATEX'
c:\Programme\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\MMSystem.h(803) : error C2373: 'WAVEFORMATEX' : redefinition; different type modifiers
c:\Programme\Microsoft DirectX 9.0 SDK (Summer 2004)\Include\dsound.h(230) : see declaration of 'WAVEFORMATEX'
c:\Programme\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\MMSystem.h(806) : error C2378: 'LPCWAVEFORMATEX' : redefinition; symbol cannot be overloaded with a typedef
c:\Programme\Microsoft DirectX 9.0 SDK (Summer 2004)\Include\dsound.h(230) : see declaration of 'LPCWAVEFORMATEX'
c:\Programme\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\MMSystem.h(848) : error C2061: syntax error : identifier 'LPCWAVEFORMATEX'
c:\Programme\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\MMSystem.h(904) : error C2061: syntax error : identifier 'LPCWAVEFORMATEX'

Build log was saved at "file://c:\Dokumente und Einstellungen\garg\Eigene Dateien\Visual Studio Projects\MyTribase\first_test\raw_project\Debug\BuildLog.htm"
raw_project - 24 error(s), 0 warning(s)


---------------------- Done ----------------------

Build: 0 succeeded, 1 failed, 0 skipped



wenn mir jemand helfen kann, wäre ich sehr erfreut

Danke Johannes
Die Gedanken sind frei, wer kann sie erraten,
sie fliegen vorbei, wie nächtliche Schatten.
Kein Mensch kann sie wissen, kein Jäger erschiessen.
Es bleibt dabei: Die Gedanken sind frei!

Garg

Frischling

  • »Garg« ist der Autor dieses Themas

Beiträge: 3

Wohnort: Bonn

Beruf: Student

  • Private Nachricht senden

2

29.10.2004, 17:32

habe schon in den FAQ's geschaut, sollte da doch etwas sein, was mir weiterhilft, schlagt mich :-) und postet den link.
Die Gedanken sind frei, wer kann sie erraten,
sie fliegen vorbei, wie nächtliche Schatten.
Kein Mensch kann sie wissen, kein Jäger erschiessen.
Es bleibt dabei: Die Gedanken sind frei!

Osram

Alter Hase

Beiträge: 889

Wohnort: Weissenthurm

Beruf: SW Entwickler

  • Private Nachricht senden

3

30.10.2004, 00:33

Bitte raw_project.cpp bis inclusive

#include <dsound.h>

hier rein kopieren.
"Games are algorithmic entertainment."

Anonymous

unregistriert

4

30.10.2004, 13:25

Hi,

im de neuen Win32 Project ist nichts geändert, nur in der Stdafx.h habe ich #include<tribase.h> von der dann auch dsound.h included wird. Mehr habe ich nicht gemacht und so sollte es doch eigentlich auch laufen? (wenn ich #include<tribase.h> auskommentiere compiliert er natürlich auch, ist ja auch ein "unberührtes" win32 project)


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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
// raw_project.cpp : Defines the entry point for the application.

//


#include "stdafx.h"
#include "raw_project.h"
#define MAX_LOADSTRING 100

// Global Variables:

HINSTANCE hInst;                                // current instance

TCHAR szTitle[MAX_LOADSTRING];                  // The title bar text

TCHAR szWindowClass[MAX_LOADSTRING];            // the main window class name


// Forward declarations of functions included in this code module:

ATOM                MyRegisterClass(HINSTANCE hInstance);
BOOL                InitInstance(HINSTANCE, int);
LRESULT CALLBACK    WndProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK    About(HWND, UINT, WPARAM, LPARAM);

int APIENTRY _tWinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPTSTR    lpCmdLine,
                     int       nCmdShow)
{
    // TODO: Place code here.

    MSG msg;
    HACCEL hAccelTable;

    // Initialize global strings

    LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
    LoadString(hInstance, IDC_RAW_PROJECT, szWindowClass, MAX_LOADSTRING);
    MyRegisterClass(hInstance);

    // Perform application initialization:

    if (!InitInstance (hInstance, nCmdShow)) 
    {
        return FALSE;
    }

    hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_RAW_PROJECT);

    // Main message loop:

    while (GetMessage(&msg, NULL, 0, 0)) 
    {
        if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) 
        {
            TranslateMessage(&msg);
            DispatchMessage(&msg);
        }
    }

    return (int) msg.wParam;
}



//

//  FUNCTION: MyRegisterClass()

//

//  PURPOSE: Registers the window class.

//

//  COMMENTS:

//

//    This function and its usage are only necessary if you want this code

//    to be compatible with Win32 systems prior to the 'RegisterClassEx'

//    function that was added to Windows 95. It is important to call this function

//    so that the application will get 'well formed' small icons associated

//    with it.

//

ATOM MyRegisterClass(HINSTANCE hInstance)
{
    WNDCLASSEX wcex;

    wcex.cbSize = sizeof(WNDCLASSEX); 

    wcex.style          = CS_HREDRAW | CS_VREDRAW;
    wcex.lpfnWndProc    = (WNDPROC)WndProc;
    wcex.cbClsExtra     = 0;
    wcex.cbWndExtra     = 0;
    wcex.hInstance      = hInstance;
    wcex.hIcon          = LoadIcon(hInstance, (LPCTSTR)IDI_RAW_PROJECT);
    wcex.hCursor        = LoadCursor(NULL, IDC_ARROW);
    wcex.hbrBackground  = (HBRUSH)(COLOR_WINDOW+1);
    wcex.lpszMenuName   = (LPCTSTR)IDC_RAW_PROJECT;
    wcex.lpszClassName  = szWindowClass;
    wcex.hIconSm        = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_SMALL);

    return RegisterClassEx(&wcex);
}

//

//   FUNCTION: InitInstance(HANDLE, int)

//

//   PURPOSE: Saves instance handle and creates main window

//

//   COMMENTS:

//

//        In this function, we save the instance handle in a global variable and

//        create and display the main program window.

//

BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
   HWND hWnd;

   hInst = hInstance; // Store instance handle in our global variable


   hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
      CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);

   if (!hWnd)
   {
      return FALSE;
   }

   ShowWindow(hWnd, nCmdShow);
   UpdateWindow(hWnd);

   return TRUE;
}

//

//  FUNCTION: WndProc(HWND, unsigned, WORD, LONG)

//

//  PURPOSE:  Processes messages for the main window.

//

//  WM_COMMAND  - process the application menu

//  WM_PAINT    - Paint the main window

//  WM_DESTROY  - post a quit message and return

//

//

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    int wmId, wmEvent;
    PAINTSTRUCT ps;
    HDC hdc;

    switch (message) 
    {
    case WM_COMMAND:
        wmId    = LOWORD(wParam); 
        wmEvent = HIWORD(wParam); 
        // Parse the menu selections:

        switch (wmId)
        {
        case IDM_ABOUT:
            DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About);
            break;
        case IDM_EXIT:
            DestroyWindow(hWnd);
            break;
        default:
            return DefWindowProc(hWnd, message, wParam, lParam);
        }
        break;
    case WM_PAINT:
        hdc = BeginPaint(hWnd, &ps);
        // TODO: Add any drawing code here...

        EndPaint(hWnd, &ps);
        break;
    case WM_DESTROY:
        PostQuitMessage(0);
        break;
    default:
        return DefWindowProc(hWnd, message, wParam, lParam);
    }
    return 0;
}

// Message handler for about box.

LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch (message)
    {
    case WM_INITDIALOG:
        return TRUE;

    case WM_COMMAND:
        if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) 
        {
            EndDialog(hDlg, LOWORD(wParam));
            return TRUE;
        }
        break;
    }
    return FALSE;
}


[Osram: Ich habe den Code mal in einen "CPP" Abschnitt eingebettet]

él toro

Frischling

Beiträge: 4

Wohnort: Dresden

Beruf: Student

  • Private Nachricht senden

5

04.11.2004, 16:19

Eine Lösung wäre auch von meiner Seite von Interesse, da ich das selbe Problem habe. ???
So einfach wie möglich.
Aber nicht einfacher! ;)
Albert Einstein

Nox

Supermoderator

Beiträge: 5 272

Beruf: Student

  • Private Nachricht senden

6

04.11.2004, 16:34

Hmmm die verzeichnisse von DX hast du aber immer an erster stelle angegeben oder?

él toro

Frischling

Beiträge: 4

Wohnort: Dresden

Beruf: Student

  • Private Nachricht senden

7

07.11.2004, 13:47

Falls du damit die Verweise von VS zu den Include und Bibliotheksdateien von DX9 meinst, dann ja.

Außerdem hab ich auch noch Verweise zu dem Lib- und Include-Verzeichnis der TriBase Engine. Dabei spielt es allerdings keine Rolle, ob die TriBase Engine vor DX9 steht oder anders herum.

In den Eigenschaften des Projekts stehen außerdem noch die Libs von der TriBase Engine als Eingabe für den Linker drin.

Alles halt wie im Buch beschrieben (2. Auflage).

Irgendwo in meinen früheren Proj. hatte ich auch mal son ähnliches Problem, allerdings fällt mir nicht mehr ein, woran das nun konkret lag und wies behoben wurde :rolleyes:

Falls jemand also nen nützlichen Input hat ...
So einfach wie möglich.
Aber nicht einfacher! ;)
Albert Einstein

Nox

Supermoderator

Beiträge: 5 272

Beruf: Student

  • Private Nachricht senden

8

07.11.2004, 23:04

Ich glaube es hattes was mit der Reihenfolge zu tun. Includiere die Tribase.h mal an erster stell in der cpp(nicht in der stdafx)

9

08.11.2004, 02:32

Dieser Fehler ist schon alt und schon einige hatten da probleme. Das ist allerdings kein Problem von TriBase sondern eines vom DX SDK. Der Typ "WAVEFORMATEX" ist nicht in der dsound.h Definiert. Aber in der mmsystem.h.

Such mal nach WAVEFORMATEX, dann bekommst ein paar Postings.

wie dieses hier:
https://www.spieleprogrammierer.de/index.php?option=com_forum&Itemid=43&page=viewtopic&t=1754&highlight=waveformatex
Wichtig! Ich übernehme keinerlei Verantwortung für eventl. Datenverlust oder Schäden am Rechner ;D

él toro

Frischling

Beiträge: 4

Wohnort: Dresden

Beruf: Student

  • Private Nachricht senden

10

08.11.2004, 20:29

Danke für den Tipp. Funktioniert gut ;)

Ich hätt wahrscheinlich vorher nur richtig suchen müssen 8)
So einfach wie möglich.
Aber nicht einfacher! ;)
Albert Einstein

Werbeanzeige