PDA

View Full Version : Linking problem with C++.



Voltrox
02-08-2007, 11:43 PM
System: Windows XP Professional + CPU: Intel Pentium III 933MHZ, Memory: 384MB of SDRAM)
Compiler/IDE: C++ Builder 2006
Libraries/API: BASS Audio Library. (the latest version)
__________________________________________________ __________

Hello.

I know that this is a pascal forum, but i've seen many C++ programmers here and Pascal is similar to C++. This is also closely related to Pascal in some ways.

Please forgive me...

I am having a problem with C++. I am using the BASS audio library. I am trying to initialize the library now, and C++ Builder keeps giving me this error: [Linker Error] Error: Unresolved external 'BASS_Init' referenced from D:\D-PT\WORK\MPROG\C++\TURBO C++ EXPLORER\KMPEE-9\DEBUG_BUILD\U_KMPEE_9.OBJ

Here is the code:

//---------------------------------------------------------------------------

#include <vcl>
#pragma hdrstop

#include "U_KMPEE_9.h"
#include "bass.h"
#include "string.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TFKMPEE *FKMPEE;
//---------------------------------------------------------------------------
__fastcall TFKMPEE::TFKMPEE(TComponent* Owner)
: TForm(Owner)
{
HWND win;
BASS_Init(-1, 44100, 0, win, NULL);
}
//---------------------------------------------------------------------------


I already included the directory of the .dll, .lib, and .h files in the search path in the options. The dll, lib, and h file are all in the same directory.

Could someone please help me?

Thank you.

Jimmy Valavanis
02-11-2007, 12:20 PM
Did you add the appropriate *.lib file to your project? If is only in path does not mean nothing.

arthurprs
02-11-2007, 05:25 PM
I think you need to put the .lib on the apropriated folder,
and change something on project options change something (i don't remember exactly)