1

Background

I downloaded https://github.com/PortAudio/portaudio and compiled a DLL (removed ASIO support). I'm running windows 10...Visual Studio 2019. Using the files in the msvc folder, I created a 64bit dll. under the build/msvc/ folder it created a new x64/release subfolder, and I see the following files:

cp@DESKTOP-ESLJ8N0:/mnt/c/Users/cp/source/github/portaudio/build/msvc/x64/Release$ ls -lah
total 3.8M
drwxrwxrwx 1 cp cp 4.0K Oct  6 14:56 .
drwxrwxrwx 1 cp cp 4.0K Oct  6 14:56 ..
-rwxrwxrwx 1 cp cp  13K Oct  6 14:56 pa_allocation.obj
-rwxrwxrwx 1 cp cp 118K Oct  6 14:56 pa_converters.obj
-rwxrwxrwx 1 cp cp 5.3K Oct  6 14:56 pa_cpuload.obj
-rwxrwxrwx 1 cp cp 5.3K Oct  6 14:56 pa_debugprint.obj
-rwxrwxrwx 1 cp cp 3.0K Oct  6 14:56 pa_dither.obj
-rwxrwxrwx 1 cp cp  66K Oct  6 14:56 pa_front.obj
-rwxrwxrwx 1 cp cp  21K Oct  6 14:56 pa_hostapi_skeleton.obj
-rwxrwxrwx 1 cp cp  60K Oct  6 14:56 pa_process.obj
-rwxrwxrwx 1 cp cp  14K Oct  6 14:56 pa_ringbuffer.obj
-rwxrwxrwx 1 cp cp 7.1K Oct  6 14:56 pa_stream.obj
-rwxrwxrwx 1 cp cp 2.0K Oct  6 14:56 pa_trace.obj
-rwxrwxrwx 1 cp cp  17K Oct  6 14:56 pa_win_coinitialize.obj
-rwxrwxrwx 1 cp cp 190K Oct  6 14:56 pa_win_ds.obj
-rwxrwxrwx 1 cp cp  25K Oct  6 14:56 pa_win_ds_dynlink.obj
-rwxrwxrwx 1 cp cp 1.5K Oct  6 14:56 pa_win_hostapis.obj
-rwxrwxrwx 1 cp cp  18K Oct  6 14:56 pa_win_util.obj
-rwxrwxrwx 1 cp cp 664K Oct  6 14:56 pa_win_wasapi.obj
-rwxrwxrwx 1 cp cp  19K Oct  6 14:56 pa_win_waveformat.obj
-rwxrwxrwx 1 cp cp 344K Oct  6 14:56 pa_win_wdmks.obj
-rwxrwxrwx 1 cp cp  29K Oct  6 14:56 pa_win_wdmks_utils.obj
-rwxrwxrwx 1 cp cp 154K Oct  6 14:56 pa_win_wmme.obj
-rwxrwxrwx 1 cp cp 1.3K Oct  6 14:56 pa_x86_plain_converters.obj
-rwxrwxrwx 1 cp cp    0 Oct  6 14:56 portaudio.Build.CppClean.log
-rwxrwxrwx 1 cp cp  287 Oct  6 14:56 portaudio.dll.recipe
-rwxrwxrwx 1 cp cp 3.4K Oct  6 14:56 portaudio.log
drwxrwxrwx 1 cp cp 4.0K Oct  6 14:56 portaudio.tlog
-rwxrwxrwx 1 cp cp    0 Oct  6 14:56 portaudio.vcxproj.FileListAbsolute.txt
-rwxrwxrwx 1 cp cp 214K Oct  6 14:56 portaudio_x64.dll
-rwxrwxrwx 1 cp cp 7.4K Oct  6 14:56 portaudio_x64.exp
-rwxrwxrwx 1 cp cp  13K Oct  6 14:56 portaudio_x64.lib
-rwxrwxrwx 1 cp cp 1.5M Oct  6 14:56 portaudio_x64.pdb
-rwxrwxrwx 1 cp cp 268K Oct  6 14:56 vc142.pdb
cp@DESKTOP-ESLJ8N0:/mnt/c/Users/cp/source/github/portaudio/build/msvc/x64/Release$

Cool. So far so good.

Next, I create a console application to try to test the DLL. So specifically I:

Specifically, I want to do something like this: https://github.com/PortAudio/portaudio/blob/master/examples/pa_devs.c

I started by doing the following: a) create a windows console application called "portaudio-listdevices-command". it creates a "hello world" solution. it compiles and runs no problem. b) I hijacked the default "ConsoleApplication1.cpp" file and tried to copy all the logic from pa_devs.c into this cpp file. The code in the cpp file looks like this:

https://github.com/closetcodebrews/portaudio-listdevices-commandline/blob/main/ConsoleApplication1/ConsoleApplication1.cpp

c) I copied all the header files from the portaudio solution directly into my client application folder.

In case it helps, this is what the folder structure looks like for the client application:

cp@DESKTOP-ESLJ8N0:/mnt/c/Users/cp/source/github/portaudio-listdevices-command/ConsoleApplication1$ ls -lah
total 156K
drwxrwxrwx 1 cp cp 4.0K Oct  7 08:16 .
drwxrwxrwx 1 cp cp 4.0K Oct  6 15:34 ..
drwxrwxrwx 1 cp cp 4.0K Oct  6 15:34 .vs
-rwxrwxrwx 1 cp cp 8.1K Oct  6 17:00 ConsoleApplication1.cpp
-rwxrwxrwx 1 cp cp 1.5K Oct  6 15:34 ConsoleApplication1.sln
-rwxrwxrwx 1 cp cp 7.9K Oct  7 08:29 ConsoleApplication1.vcxproj
-rwxrwxrwx 1 cp cp  992 Oct  6 15:34 ConsoleApplication1.vcxproj.filters
-rwxrwxrwx 1 cp cp  168 Oct  6 15:34 ConsoleApplication1.vcxproj.user
drwxrwxrwx 1 cp cp 4.0K Oct  7 08:05 Debug
-rwxrwxrwx 1 cp cp 5.8K Oct  6 13:24 pa_asio.h
-rwxrwxrwx 1 cp cp 2.9K Oct  6 13:24 pa_jack.h
-rwxrwxrwx 1 cp cp 3.9K Oct  6 13:24 pa_linux_alsa.h
-rwxrwxrwx 1 cp cp 7.6K Oct  6 13:24 pa_mac_core.h
-rwxrwxrwx 1 cp cp 3.5K Oct  6 13:24 pa_win_ds.h
-rwxrwxrwx 1 cp cp  24K Oct  6 13:24 pa_win_wasapi.h
-rwxrwxrwx 1 cp cp 8.9K Oct  6 13:24 pa_win_waveformat.h
-rwxrwxrwx 1 cp cp 5.0K Oct  6 13:24 pa_win_wdmks.h
-rwxrwxrwx 1 cp cp 6.9K Oct  6 13:24 pa_win_wmme.h
-rwxrwxrwx 1 cp cp  48K Oct  6 13:24 portaudio.h
drwxrwxrwx 1 cp cp 4.0K Oct  7 08:16 x64
cp@DESKTOP-ESLJ8N0:/mnt/c/Users/cp/source/github/portaudio-listdevices-command/ConsoleApplication1$

Problem

When I try to compile the client application, this is the error I'm getting:

Error   LNK2019 unresolved external symbol Pa_GetVersionInfo referenced in function main    ConsoleApplication1 C:\Users\cp\source\github\portaudio-listdevices-command\ConsoleApplication1\ConsoleApplication1.obj 1   

What I've tried so far:

I've modified the following properties in my project:

Project --> Properties --> Linker --> Input --> Additional Dependencies --> "portaudio_x64.lib"

Project --> Properties --> VC++ Directories --> Library Directories --> c:\Users\cp\source\github\portaudio\build\msvc\x64\Release

Header files were just copied from the portaudio source folder direct to the client application so now I have this:

For what it's worth, in my ConsoleApplication1.cpp file, when I hover over the call to Pa_GetVersion() it does give me contextual help and shows me what the function does. Does this prove that the lib file is working?

Any help would be appreciated.

**DUMPBIN RESULTS **

PS C:\Users\cp\source\github\portaudio\build\msvc\x64\Release> dumpbin /exports portaudio_x64.dll
Microsoft (R) COFF/PE Dumper Version 14.27.29111.0
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file portaudio_x64.dll

File Type: DLL

  Section contains the following exports for portaudio_x64.dll

    00000000 characteristics
    FFFFFFFF time date stamp
        0.00 version
           1 ordinal base
          68 number of functions
          48 number of names

    ordinal hint RVA      name

         52    0 0001CE10 PaUtil_InitializeX86PlainConverters = PaUtil_InitializeX86PlainConverters
         55    1 00003110 PaUtil_SetDebugPrintFunction = PaUtil_SetDebugPrintFunction
         56    2 0000D100 PaWasapi_GetAudioClient = PaWasapi_GetAudioClient
         58    3 0000D140 PaWasapi_GetDeviceCurrentFormat = PaWasapi_GetDeviceCurrentFormat
         59    4 0000D1A0 PaWasapi_GetDeviceDefaultFormat = PaWasapi_GetDeviceDefaultFormat
         60    5 0000D270 PaWasapi_GetDeviceMixFormat = PaWasapi_GetDeviceMixFormat
         61    6 0000D340 PaWasapi_GetDeviceRole = PaWasapi_GetDeviceRole
         64    7 0000D3C0 PaWasapi_GetFramesPerHostBuffer = PaWasapi_GetFramesPerHostBuffer
         65    8 0000D3F0 PaWasapi_GetJackCount = PaWasapi_GetJackCount
         66    9 0000D5D0 PaWasapi_GetJackDescription = PaWasapi_GetJackDescription
         67    A 0000DAA0 PaWasapi_SetDefaultInterfaceId = PaWasapi_SetDefaultInterfaceId
         68    B 0000DAB0 PaWasapi_SetStreamStateHandler = PaWasapi_SetStreamStateHandler
         62    C 0000DAD0 PaWasapi_ThreadPriorityBoost = PaWasapi_ThreadPriorityBoost
         63    D 0000DB10 PaWasapi_ThreadPriorityRevert = PaWasapi_ThreadPriorityRevert
         23    E 00003520 Pa_AbortStream = Pa_AbortStream
         19    F 00003570 Pa_CloseStream = Pa_CloseStream
          7   10 000035D0 Pa_GetDefaultHostApi = Pa_GetDefaultHostApi
         13   11 00003600 Pa_GetDefaultInputDevice = Pa_GetDefaultInputDevice
         14   12 00003630 Pa_GetDefaultOutputDevice = Pa_GetDefaultOutputDevice
         12   13 00003660 Pa_GetDeviceCount = Pa_GetDeviceCount
         15   14 00003680 Pa_GetDeviceInfo = Pa_GetDeviceInfo
          3   15 000036C0 Pa_GetErrorText = Pa_GetErrorText
          6   16 00003870 Pa_GetHostApiCount = Pa_GetHostApiCount
          8   17 00003890 Pa_GetHostApiInfo = Pa_GetHostApiInfo
         11   18 000038C0 Pa_GetLastHostErrorInfo = Pa_GetLastHostErrorInfo
         33   19 000038D0 Pa_GetSampleSize = Pa_GetSampleSize
         28   1A 00003950 Pa_GetStreamCpuLoad = Pa_GetStreamCpuLoad
         26   1B 00003980 Pa_GetStreamInfo = Pa_GetStreamInfo
         31   1C 000039B0 Pa_GetStreamReadAvailable = Pa_GetStreamReadAvailable
         27   1D 000039E0 Pa_GetStreamTime = Pa_GetStreamTime
         32   1E 00003A10 Pa_GetStreamWriteAvailable = Pa_GetStreamWriteAvailable
          1   1F 00003A40 Pa_GetVersion = Pa_GetVersion
          2   20 00003A60 Pa_GetVersionText = Pa_GetVersionText
         10   21 00003A70 Pa_HostApiDeviceIndexToDeviceIndex = Pa_HostApiDeviceIndexToDeviceIndex
          9   22 00003AC0 Pa_HostApiTypeIdToHostApiIndex = Pa_HostApiTypeIdToHostApiIndex
          4   23 00003B10 Pa_Initialize = Pa_Initialize
         16   24 00003B50 Pa_IsFormatSupported = Pa_IsFormatSupported
         25   25 00003C80 Pa_IsStreamActive = Pa_IsStreamActive
         24   26 00003CB0 Pa_IsStreamStopped = Pa_IsStreamStopped
         18   27 00003CE0 Pa_OpenDefaultStream = Pa_OpenDefaultStream
         17   28 00003DF0 Pa_OpenStream = Pa_OpenStream
         29   29 00003FB0 Pa_ReadStream = Pa_ReadStream
         20   2A 00004050 Pa_SetStreamFinishedCallback = Pa_SetStreamFinishedCallback
         34   2B 0001C700 Pa_Sleep = Pa_Sleep
         21   2C 000040A0 Pa_StartStream = Pa_StartStream
         22   2D 000040F0 Pa_StopStream = Pa_StopStream
          5   2E 00004140 Pa_Terminate = Pa_Terminate
         30   2F 00004180 Pa_WriteStream = Pa_WriteStream
  Summary

        3000 .data
        7000 .pdata
       24000 .rdata
        1000 .reloc
        1000 .rsrc
       6B000 .text
        1000 _RDATA

enter image description here

enter image description here

Detailed Output from Link.exe

1>    C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\bin\HostX86\x64\link.exe /ERRORREPORT:PROMPT /OUT:"C:\Users\cp\source\github\portaudio-listdevices-command\ConsoleApplication1\x64\Debug\ConsoleApplication1.exe" /INCREMENTAL /NOLOGO portaudio_x64.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG:FASTLINK /PDB:"C:\Users\cp\source\github\portaudio-listdevices-command\ConsoleApplication1\x64\Debug\ConsoleApplication1.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\Users\cp\source\github\portaudio-listdevices-command\ConsoleApplication1\x64\Debug\ConsoleApplication1.lib" /MACHINE:X64 x64\Debug\ConsoleApplication1.obj
1>    Tracking command:
1>    C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Tracker.exe /a /d "C:\Program Files (x86)\MSBuild\15.0\FileTracker\FileTracker32.dll" /i C:\Users\cp\source\github\portaudio-listdevices-command\ConsoleApplication1\x64\Debug\ConsoleA.8f735e32.tlog /r C:\USERS\cp\SOURCE\GITHUB\PORTAUDIO-LISTDEVICES-COMMAND\CONSOLEAPPLICATION1\X64\DEBUG\CONSOLEAPPLICATION1.OBJ /b MSBuildConsole_CancelEventca601256d110470b96dcd6bd48d0231f  /c "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\bin\HostX86\x64\link.exe"  /ERRORREPORT:PROMPT /OUT:"C:\Users\cp\source\github\portaudio-listdevices-command\ConsoleApplication1\x64\Debug\ConsoleApplication1.exe" /INCREMENTAL /NOLOGO portaudio_x64.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG:FASTLINK /PDB:"C:\Users\cp\source\github\portaudio-listdevices-command\ConsoleApplication1\x64\Debug\ConsoleApplication1.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\Users\cp\source\github\portaudio-listdevices-command\ConsoleApplication1\x64\Debug\ConsoleApplication1.lib" /MACHINE:X64 x64\Debug\ConsoleApplication1.obj

Additional Lib Path now Defined

enter image description here

Latest Link Errors

1>    C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\bin\HostX86\x64\link.exe /ERRORREPORT:PROMPT /OUT:"C:\Users\cp\source\github\portaudio-listdevices-command\ConsoleApplication1\x64\Debug\ConsoleApplication1.exe" /INCREMENTAL /NOLOGO /LIBPATH:C:\Users\cp\source\github\portaudio\build\msvc\x64\Release /LIBPATH:C:\Users\cp\source\github\portaudio\build\msvc\x64\Release portaudio_x64.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG:FASTLINK /PDB:"C:\Users\cp\source\github\portaudio-listdevices-command\ConsoleApplication1\x64\Debug\ConsoleApplication1.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\Users\cp\source\github\portaudio-listdevices-command\ConsoleApplication1\x64\Debug\ConsoleApplication1.lib" /MACHINE:X64 x64\Debug\ConsoleApplication1.obj
1>    Tracking command:
1>    C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Tracker.exe /a /d "C:\Program Files (x86)\MSBuild\15.0\FileTracker\FileTracker32.dll" /i C:\Users\cp\source\github\portaudio-listdevices-command\ConsoleApplication1\x64\Debug\ConsoleA.8f735e32.tlog /r C:\USERS\cp\SOURCE\GITHUB\PORTAUDIO-LISTDEVICES-COMMAND\CONSOLEAPPLICATION1\X64\DEBUG\CONSOLEAPPLICATION1.OBJ /b MSBuildConsole_CancelEventa9f191895925491f926a123cade0b276  /c "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\bin\HostX86\x64\link.exe"  /ERRORREPORT:PROMPT /OUT:"C:\Users\cp\source\github\portaudio-listdevices-command\ConsoleApplication1\x64\Debug\ConsoleApplication1.exe" /INCREMENTAL /NOLOGO /LIBPATH:C:\Users\cp\source\github\portaudio\build\msvc\x64\Release /LIBPATH:C:\Users\cp\source\github\portaudio\build\msvc\x64\Release portaudio_x64.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG:FASTLINK /PDB:"C:\Users\cp\source\github\portaudio-listdevices-command\ConsoleApplication1\x64\Debug\ConsoleApplication1.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\Users\cp\source\github\portaudio-listdevices-command\ConsoleApplication1\x64\Debug\ConsoleApplication1.lib" /MACHINE:X64 x64\Debug\ConsoleApplication1.obj
1>    ConsoleApplication1.obj : error LNK2019: unresolved external symbol Pa_GetVersionInfo referenced in function main
1>    C:\Users\cp\source\github\portaudio-listdevices-command\ConsoleApplication1\x64\Debug\ConsoleApplication1.exe : fatal error LNK1120: 1 unresolved externals
1>    The command exited with code 1120.
1>  Done executing task "Link" -- FAILED.
1>Done building target "Link" in project "ConsoleApplication1.vcxproj" -- FAILED.
1>
1>Done building project "ConsoleApplication1.vcxproj" -- FAILED.
1>
1>Build FAILED.
1>
1>ConsoleApplication1.obj : error LNK2019: unresolved external symbol Pa_GetVersionInfo referenced in function main
1>C:\Users\cp\source\github\portaudio-listdevices-command\ConsoleApplication1\x64\Debug\ConsoleApplication1.exe : fatal error LNK1120: 1 unresolved externals
1>    0 Warning(s)
1>    2 Error(s)
dot
  • 14,928
  • 41
  • 110
  • 218
  • Setting the _Include Directories_ correctly should prevent this error. Did you double check for typos or something? Can you give us a screenshot for the settings along with the directory structure where `portaudio.h` is placed please. – πάντα ῥεῖ Oct 06 '20 at 20:19
  • Yes,include Directories as listed in my original question was the first thing i tried. It didn't work. I just ended up copying the header files from the source folder into my client application folder. It seems to have resolved the errors. Not sure if that was a smart thing to do or not. But can you please see Edit 1 for my other related question? – dot Oct 07 '20 at 12:13
  • Beware that the comment is misleading, this is a linker error so doesn't have anything to do with the compiler's include directories setting. You changed the linker settings correctly, do make sure those settings apply to all configurations and platforms (comboboxes at the top of the dialog). Favor Linker > General > Additional Library Directories. We can't tell what you changed so you'll need to do more digging. Run dumpbin.exe /exports on the generated .dll and .lib files to verify you got the exports that you expected. – Hans Passant Oct 07 '20 at 13:41
  • @HansPassant thanks for the comments. I just added dumpbin info per your suggestion. I also made sure that for the project settings mentioned above, the drop down options were set to "all configs" for "all platforms" – dot Oct 07 '20 at 13:56
  • _@dot_ Linker errors with these libraries can have a whole bunch of reasons (see [here](https://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix)). Supposed your library search paths are correct, one likely thing might be that the target architectures (x86 / x64) of your project and the addressed libraries won't match. @Hans – πάντα ῥεῖ Oct 07 '20 at 14:46
  • @πάνταῥεῖ except that I am building portaudio for x64... it created x64 dll in the x64 folder... and as you can see, i'm including that specific folder in the client / console application. Is there something you see in my code / comments that makes you feel it's "likely"? Thanks for your help so far! – dot Oct 07 '20 at 14:49
  • That's not it, the linker warns about a platform mismatch and the symbol decoration is correct. Contents look okay, although you didn't list the .lib file. Dig more with Tools > Options > Projects and Solutions > Build and Run > "MSBuild project build output verbosity" = Detailed. Copy/paste the link.exe command line – Hans Passant Oct 07 '20 at 14:57
  • @dot I feel it's likely because it is a well known and (for a beginner) hard to find problem. If you build the libs in x86 mode, your test application project must have the same architecture target. Unfortunately I don't have a Visual-Studio Installation at hand, to tell you which project setting to check exactly. – πάντα ῥεῖ Oct 07 '20 at 14:58
  • @Hans OK, I feel you got the better advice to give here to help the OP out ;-) – πάντα ῥεῖ Oct 07 '20 at 14:59
  • @HansPassant can you elaborate on your comment about the lib file? I tried to specify lib ..as you can see in the screenshot. but maybe in the wrong spot? Also, when you want me to dig more - this is in the console / client app right? – dot Oct 07 '20 at 15:00
  • @HansPassant updated the post with results for your review – dot Oct 07 '20 at 15:06
  • @HansPassant i added a libpath ... please check out the latest screenshot... and ... the latest output from link.exe – dot Oct 07 '20 at 15:15
  • @πάντα ῥεῖ to your point, I think i was missing the PATH to the lib... although I had specified the lib name. – dot Oct 07 '20 at 15:17
  • @dot Ah, great! Sorry of not being of so much help. Though I believe we pushed you into the right direction a bit. As always if you found a solution for your question, you should write it down in an appropriate answer. I believe that this will be helpful for future research. – πάντα ῥεῖ Oct 07 '20 at 15:19
  • @πάνταῥεῖ the problem is still unresolved. I just noticed that I didn't have a path. But even after I'm still getting the same error. – dot Oct 07 '20 at 15:22
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/222670/discussion-between-dot-and--). – dot Oct 07 '20 at 15:23
  • @dot Ah, sorry. I misunderstood. – πάντα ῥεῖ Oct 07 '20 at 15:23
  • @HansPassant would creating a new solution that includes both projects under the same 'roof' simplify things? – dot Oct 07 '20 at 15:32
  • 1
    Ah, it complains about only *one* symbol. Not GetVersion(), it is GetVersionInfo() that it can't find. Which is correct, it is not exported. You're probably the victim of a lousy code sample, but this kind of lossage is very typical with *nix libraries. If you want to fix it then edit build/msvc/portinfo.def, add "Pa_GetVersionInfo @69". Be sure to contribute it back to the project. – Hans Passant Oct 07 '20 at 15:32
  • wow. you're right. it worked. i added that one line and now .. it at least builds – dot Oct 07 '20 at 15:35

1 Answers1

3

So I can't take credit for this. I'm only posting answer so we can close this question. But the issue was with the portaudio library itself The portinfo.def file was not exporting the method that I was trying to call - the method referenced in the example file.

the fix was to add the following line to the portinfo.def file:

Pa_GetVersionInfo @ 69

Now my client / console app compiles. I will submit a patch later today to portaudio repo for the community to consider. But thanks to @HansPassant and πάντα ῥεῖ

dot
  • 14,928
  • 41
  • 110
  • 218
  • I am glad you have got your solution and thanks for your sharing, I would appreciate it if you mark them as answer and this will be beneficial to other community. – Barrnet Chou Oct 09 '20 at 05:51
  • Super! Thank you. Looks like they didn't merge it. In mine, 69 already taken, so I added the line: Pa_GetVersionInfo @70 to the .def file. I think you saved me many hours. – r webby Jan 23 '21 at 07:45
  • Same here, I had to add Pa_GetVersionInfo @71 to the .def file. – HelloWorld Feb 28 '23 at 17:54