Keresés

Új hozzászólás Aktív témák

  • emitter

    őstag

    válasz Jester01 #1484 üzenetére

    a minimal playback program ([link]) kódját próbáltam egy-az-egyben futtatni, és egy sor hibát dobott:

    emitter@LAPTOP:~/BME_nemet/Prog2/Nagyhazi$ gcc -Wall -o wav2 wav2.c
    wav2.c:89: warning: return type defaults to 'int'
    wav2.c: In function 'main':
    wav2.c:127: warning: passing argument 3 of 'snd_pcm_hw_params_set_rate_near' makes pointer from integer without a cast
    /tmp/ccIhl5R0.o: In function `main':
    wav2.c:(.text+0x34): undefined reference to `snd_pcm_open'
    wav2.c:(.text+0x4b): undefined reference to `snd_strerror'
    wav2.c:(.text+0x87): undefined reference to `snd_pcm_hw_params_malloc'
    wav2.c:(.text+0x9e): undefined reference to `snd_strerror'
    wav2.c:(.text+0xd9): undefined reference to `snd_pcm_hw_params_any'
    wav2.c:(.text+0xf0): undefined reference to `snd_strerror'
    wav2.c:(.text+0x12d): undefined reference to `snd_pcm_hw_params_set_access'
    wav2.c:(.text+0x144): undefined reference to `snd_strerror'
    wav2.c:(.text+0x181): undefined reference to `snd_pcm_hw_params_set_format'
    wav2.c:(.text+0x198): undefined reference to `snd_strerror'
    wav2.c:(.text+0x1d7): undefined reference to `snd_pcm_hw_params_set_rate_near'
    wav2.c:(.text+0x1ee): undefined reference to `snd_strerror'
    wav2.c:(.text+0x22b): undefined reference to `snd_pcm_hw_params_set_channels'
    wav2.c:(.text+0x242): undefined reference to `snd_strerror'
    wav2.c:(.text+0x27d): undefined reference to `snd_pcm_hw_params'
    wav2.c:(.text+0x294): undefined reference to `snd_strerror'
    wav2.c:(.text+0x2c8): undefined reference to `snd_pcm_hw_params_free'
    wav2.c:(.text+0x2da): undefined reference to `snd_pcm_prepare'
    wav2.c:(.text+0x2f1): undefined reference to `snd_strerror'
    wav2.c:(.text+0x33a): undefined reference to `snd_pcm_writei'
    wav2.c:(.text+0x354): undefined reference to `snd_strerror'
    wav2.c:(.text+0x393): undefined reference to `snd_pcm_close'
    collect2: ld returned 1 exit status

    ---
    ennek mi lehet az oka? ha int main()-re írom át, akkor is majdnem ugyanezeket dobja
    pl. ''passing argument 3 of 'snd_pcm_hw_params_set_rate_near' makes pointer from integer without a cast'' - ha erre a függvényt így hívom, az jó?
    snd_pcm_hw_params_set_rate_near (playback_handle, hw_params, (void*)44100, 0)
    vagy honnan tudjam, hogy ez a fv milyen típusú mutatót vár 3. arg-ként?
    és a többi undefined reference mit jelent?

    ---------
    van egy másik próbálkozásom is, ez alapján: [link]
    itt viszont vannak BYTE meg DWORD típusok, amit az ansi C nem ismer... ezek helyett írhatok CHAR, ill. INT típust, vagy ezeknek nem ugyanakkora a méretük?

    [Szerkesztve]

Új hozzászólás Aktív témák