Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(MSVS) .lib and .dll not read properly by external use (paex_ocean_shore.c) #959

Open
samfan0429 opened this issue Sep 3, 2024 · 1 comment
Labels
test-examples Test code in /examples

Comments

@samfan0429
Copy link

AudioProcessing1.obj : error LNK2019: unresolved external symbol PaUtil_InitializeRingBuffer referenced in function main
AudioProcessing1.obj : error LNK2019: unresolved external symbol PaUtil_GetRingBufferReadAvailable referenced in function "int __cdecl patestCallback(void const *,void *,unsigned long,struct PaStreamCallbackTimeInfo const *,unsigned long,void *)" (?patestCallback@@YAHPEBXPEAXKPEBUPaStreamCallbackTimeInfo@@k1@Z)
AudioProcessing1.obj : error LNK2019: unresolved external symbol PaUtil_WriteRingBuffer referenced in function "int __cdecl patestCallback(void const *,void *,unsigned long,struct PaStreamCallbackTimeInfo const *,unsigned long,void *)" (?patestCallback@@YAHPEBXPEAXKPEBUPaStreamCallbackTimeInfo@@k1@Z)
AudioProcessing1.obj : error LNK2019: unresolved external symbol PaUtil_ReadRingBuffer referenced in function "int __cdecl patestCallback(void const *,void *,unsigned long,struct PaStreamCallbackTimeInfo const *,unsigned long,void *)" (?patestCallback@@YAHPEBXPEAXKPEBUPaStreamCallbackTimeInfo@@k1@Z)
AudioProcessing1.obj : error LNK2019: unresolved external symbol PaUtil_AllocateZeroInitializedMemory referenced in function "struct OceanWave * __cdecl InitializeWave(double,float,float,float)" (?InitializeWave@@YAPEAUOceanWave@@nmmm@Z)
AudioProcessing1.obj : error LNK2019: unresolved external symbol PaUtil_FreeMemory referenced in function main
AudioProcessing1.obj : error LNK2019: unresolved external symbol PaUtil_GetTime referenced in function main
C:\Users\USER\Desktop\project\signals\AudioProcessing1\x64\Debug\AudioProcessing1.exe : fatal error LNK1120: 7 unresolved externals

So the .lib and .dll are compiled fine. But when I try to take the two files to run it on a separate project, it did not work. I used the "paex_ocean_shore" example to test it. "paex_pink" worked fine but I am wondering what is the problem. May I know where to start looking in the library compilation? I used a very ad-hoc method of re-defining them in a new ".c" files and running the external software to make it work. It seems that something is missing upon creating the library files.

@RossBencina
Copy link
Collaborator

Related: #226

There are a few faulty examples that use PortAudio internal APIs, paex_ocean_shore is one of them. The only way to compile these examples is by static-linking the PortAudio code that contains the internal APIs.

@RossBencina RossBencina changed the title (MSVS) .lib and .dll not read properly by external use (MSVS) .lib and .dll not read properly by external use (paex_ocean_shore.c) Sep 27, 2024
@RossBencina RossBencina added the test-examples Test code in /examples label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test-examples Test code in /examples
Projects
None yet
Development

No branches or pull requests

2 participants