Author Topic: undefined reference to `ASIOGetChannels(long*, long*)  (Read 4589 times)

Offline Qbert

  • Single posting newcomer
  • *
  • Posts: 4
undefined reference to `ASIOGetChannels(long*, long*)
« on: January 03, 2006, 03:49:40 pm »
Hi,
I'm trying to compile samples of Steinberg Vst SKD with Code::Blocks and GNU GCC compiler.

I've problem on linking:


Linking executable: C:\Documents and Settings\ealfter\My Documents\Vst\pj\Win32GUI.exe
.objs\main.o(.text+0x11c):main.cpp: undefined reference to `ASIOGetChannels(long*, long*)'
.objs\main.o(.text+0x172):main.cpp: undefined reference to `ASIOGetBufferSize(long*, long*, long*, long*)'
.objs\main.o(.text+0x1c2):main.cpp: undefined reference to `ASIOGetSampleRate(double*)'
.objs\main.o(.text+0x22b):main.cpp: undefined reference to `ASIOSetSampleRate(double)'
.objs\main.o(.text+0x243):main.cpp: undefined reference to `ASIOGetSampleRate(double*)'




I think some ASIO lib are missing. Where can I find them? May I compile library too?
Thx
Qbert

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: undefined reference to `ASIOGetChannels(long*, long*)
« Reply #1 on: January 03, 2006, 03:59:10 pm »
Yes, you 're not linking with the library that contains those symbols. Unfortunately, I have no idea which library it is. A quick search just revealed that it's from "Steinberg Audio Stream I/O API" (hence the ASIO prefix).
Be patient!
This bug will be fixed soon...

Offline Qbert

  • Single posting newcomer
  • *
  • Posts: 4
Re: undefined reference to `ASIOGetChannels(long*, long*)
« Reply #2 on: January 03, 2006, 04:21:47 pm »
Sorry for my silly question:

I figured out that ASIOGetChannels(long*, long*) and others items are referenced in asioxxxx.h and I included them in my pj.

I don't understand why that's not enough!? In SDK (from Steinberg) there arent lib in .a or .lib format.

 :(
 

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5188
Re: undefined reference to `ASIOGetChannels(long*, long*)
« Reply #3 on: January 03, 2006, 04:29:02 pm »
including a header just tells th compiler what the functions look like, etc ..

But the linker actually wants (assembly) code for it, either you create it yourself (including the implementation files in your project and compile them), or you link to a library (which contains the compiled code), or use an import library for a dll.

[EDIT] you can do without an import library for a dll, but then you have to GetProcAddress to get the functions

Offline Qbert

  • Single posting newcomer
  • *
  • Posts: 4
Re: undefined reference to `ASIOGetChannels(long*, long*)
« Reply #4 on: January 03, 2006, 04:41:31 pm »

either you create it yourself (including the implementation files in your project and compile them)

How do I do that? What do I need?

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5188
Re: undefined reference to `ASIOGetChannels(long*, long*)
« Reply #5 on: January 03, 2006, 04:45:22 pm »
Well,
a third party product an consist out of source library (set of c/cpp/h files), then you can just add them to your own project, as if it were files you wrote for your own project (check legal usage of those sources). Or the library is provided as a binary library (already compiled, check if the binary are for your platform). In this latter case the header files of the sdk tell you (and the compiler) the functions, types, etc ..

What dit that sdk contain ?

Lieven

Offline Qbert

  • Single posting newcomer
  • *
  • Posts: 4
Re: undefined reference to `ASIOGetChannels(long*, long*)
« Reply #6 on: January 03, 2006, 04:55:36 pm »
First of all, thanks for your interest!

I have just set of c/cpp/h files.

No bin files.



 

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5188
Re: undefined reference to `ASIOGetChannels(long*, long*)
« Reply #7 on: January 03, 2006, 04:56:59 pm »
then you should probably add all of those c/cpp files from that sdk to your own project (or create a sepearte project from it and build it as a lib). Check the documentation of that sdk, they should explain it how to do it.