Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 08-02-2007, 07:06 PM   #1
In Runtime
 
hextcomm's Avatar
 
Join Date: Aug 2005
Posts: 237
Send a message via ICQ to hextcomm Send a message via AIM to hextcomm Send a message via MSN to hextcomm
Unhappy Linking problem with C++.

Hello.

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.h>
#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.
__________________

__________________
Nicholas.

http://www.kompulsa.com

http://www.kompulsa.com/kae/

http://www.kompulsa.com/it/
hextcomm is offline   Reply With Quote
Old 08-02-2007, 08:28 PM   #2
BSOD
 
rot13's Avatar
 
Join Date: Jul 2007
Posts: 113
Default Re: Linking problem with C++.

What the error is trying to tell you is that youre calling BASS_Init with all those parameters but the actual definition and code for BASS_Init isnt anywhere within the other code youre compling.

Are you sure youve got everything on the linker path correct and is everything you need there? Can I please see your linker path can you copy and past e it for me please.
__________________

rot13 is offline   Reply With Quote
Old 08-02-2007, 08:52 PM   #3
In Runtime
 
hextcomm's Avatar
 
Join Date: Aug 2005
Posts: 237
Send a message via ICQ to hextcomm Send a message via AIM to hextcomm Send a message via MSN to hextcomm
Default Re: Linking problem with C++.

This is the search path from C++ Builder: $(BDS)\Include\Indy9;$(BDS)\Lib\Indy9;D:\D-PT\Libraries\Audio\bass23\c
__________________
Nicholas.

http://www.kompulsa.com

http://www.kompulsa.com/kae/

http://www.kompulsa.com/it/
hextcomm is offline   Reply With Quote
Old 08-06-2007, 10:20 AM   #4
In Runtime
 
hextcomm's Avatar
 
Join Date: Aug 2005
Posts: 237
Send a message via ICQ to hextcomm Send a message via AIM to hextcomm Send a message via MSN to hextcomm
Default Re: Linking problem with C++.

Problem solved.

Thank you for trying to help me.
__________________
Nicholas.

http://www.kompulsa.com

http://www.kompulsa.com/kae/

http://www.kompulsa.com/it/
hextcomm is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 12:23 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0