Thread: A C++ linking issue...

  1. #1
    Registered User
    Join Date
    Mar 2018
    Posts
    12

    A C++ linking issue...

    O k, so I was making a simple program that plays a MP3 file using the BASS library. The problem is, when I was trying to compile the program (Before compiling, I have linked the library's "bass.lib" into the linker
    A C++ linking issue...-c==-libk-prob-png
    Well, it just said that it couldn't find the implementation functions...
    A C++ linking issue...-c==-lib-struc-png
    (This is the project's structure).
    So my question is, what am I missing, or did I do something wrong (And if so, what can I do to fix it?)?
    EDIT: How clumsy I am :<, here's the code:
    Code:
    /*
        BASS simple playback test
        Copyright (c) 1999-2012 Un4seen Developments Ltd.
    */
    
    #include <windows.h>
    #include <commctrl.h>
    #include <iostream>
    #include "bass.h"
    
    HWND win=NULL;
    
    HSTREAM *strs=NULL;
    int strc=0;
    HMUSIC *mods=NULL;
    int modc=0;
    HSAMPLE *sams=NULL;
    int samc=0;
    
    // display error messages
    void Error(const char *es)
    {
        char mes[200];
        sprintf(mes,"%s\n(error code: %d)",es,BASS_ErrorGetCode());
        MessageBox(win,mes,0,0);
    }
    
    // messaging macros
    #define MESS(id,m,w,l) SendDlgItemMessage(win,id,m,(WPARAM)(w),(LPARAM)(l))
    #define STLM(m,w,l) MESS(10,m,w,l)
    #define MLM(m,w,l) MESS(20,m,w,l)
    #define SLM(m,w,l) MESS(30,m,w,l)
    #define GETSTR() STLM(LB_GETCURSEL,0,0)
    #define GETMOD() MLM(LB_GETCURSEL,0,0)
    #define GETSAM() SLM(LB_GETCURSEL,0,0)
    
    INT_PTR CALLBACK dialogproc(HWND h,UINT m,WPARAM w,LPARAM l)
    {
        static OPENFILENAME ofn;
    
        switch (m) {
            case WM_TIMER:
                { // update the CPU usage % display
                    char text[10];
                    sprintf(text,"%.2f",BASS_GetCPU());
                    MESS(40,WM_SETTEXT,0,text);
                }
                break;
    
            case WM_COMMAND:
                switch (LOWORD(w)) {
                    case IDCANCEL:
                        DestroyWindow(h);
                        break;
    
                    case 14:
                        {
                            char file[MAX_PATH]="";
                            HSTREAM str;
                            ofn.lpstrFilter="Streamable files (wav/aif/mp3/mp2/mp1/ogg)\0*.wav;*.aif;*.mp3;*.mp2;*.mp1;*.ogg\0All files\0*.*\0\0";
                            ofn.lpstrFile=file;
                            if (GetOpenFileName(&ofn)) {
                                if (str=BASS_StreamCreateFile(FALSE,file,0,0,0)) {
                                    strc++;
                                    strs=(HSTREAM*)realloc((void*)strs,strc*sizeof(*strs));
                                    strs[strc-1]=str;
                                    STLM(LB_ADDSTRING,0,strrchr(file,'\\')+1);
                                } else
                                    Error("Can't open stream");
                            }
                        }
                        break;
                    case 15:
                        {
                            int s=GETSTR();
                            if (s!=LB_ERR) {
                                STLM(LB_DELETESTRING,s,0);
                                BASS_StreamFree(strs[s]); // free the stream
                                strc--;
                                memcpy(strs+s,strs+s+1,(strc-s)*sizeof(*strs));
                            }
                        }
                        break;
                    case 11:
                        {
                            int s=GETSTR();
                            if (s!=LB_ERR)
                                if (!BASS_ChannelPlay(strs[s],FALSE)) // play the stream (continue from current position)
                                    Error("Can't play stream");
                        }
                        break;
                    case 12:
                        {
                            int s=GETSTR();
                            if (s!=LB_ERR) BASS_ChannelStop(strs[s]); // stop the stream
                        }
                        break;
                    case 13:
                        {
                            int s=GETSTR();
                            if (s!=LB_ERR) BASS_ChannelPlay(strs[s],TRUE); // play the stream from the start
                        }
                        break;
    
                    case 24:
                        {
                            char file[MAX_PATH]="";
                            HMUSIC mod;
                            ofn.lpstrFilter="MOD music files (mo3/xm/mod/s3m/it/mtm/umx)\0*.mo3;*.xm;*.mod;*.s3m;*.it;*.mtm;*.umx\0All files\0*.*\0\0";
                            ofn.lpstrFile=file;
                            if (GetOpenFileName(&ofn)) {
                                // load a music from "file" with ramping enabled
                                if (mod=BASS_MusicLoad(FALSE,file,0,0,BASS_MUSIC_RAMPS,1)) {
                                    modc++;
                                    mods=(HMUSIC*)realloc((void*)mods,modc*sizeof(*mods));
                                    mods[modc-1]=mod;
                                    MLM(LB_ADDSTRING,0,strrchr(file,'\\')+1);
                                } else
                                    Error("Can't load music");
                            }
                        }
                        break;
                    case 25:
                        {
                            int s=GETMOD();
                            if (s!=LB_ERR) {
                                MLM(LB_DELETESTRING,s,0);
                                BASS_MusicFree(mods[s]); // free the music
                                modc--;
                                memcpy(mods+s,mods+s+1,(modc-s)*sizeof(*mods));
                            }
                        }
                        break;
                    case 21:
                        {
                            int s=GETMOD();
                            if (s!=LB_ERR)
                                if (!BASS_ChannelPlay(mods[s],FALSE)) // play the music (continue from current position)
                                    Error("Can't play music");
                        }
                        break;
                    case 22:
                        {
                            int s=GETMOD();
                            if (s!=LB_ERR) BASS_ChannelStop(mods[s]); // stop the music
                        }
                        break;
                    case 23:
                        {
                            int s=GETMOD();
                            if (s!=LB_ERR) BASS_ChannelPlay(mods[s],TRUE); // play the music from the start
                        }
                        break;
    
                    case 32:
                        {
                            char file[MAX_PATH]="";
                            HSAMPLE sam;
                            ofn.lpstrFilter="Sample files (wav/aif)\0*.wav;*.aif\0All files\0*.*\0\0";
                            ofn.lpstrFile=file;
                            if (GetOpenFileName(&ofn)) {
                                /* Load a sample from "file" and give it a max of 3 simultaneous
                                    playings using playback position as override decider */
                                if (sam=BASS_SampleLoad(FALSE,file,0,0,3,BASS_SAMPLE_OVER_POS)) {
                                    samc++;
                                    sams=(HSAMPLE*)realloc((void*)sams,samc*sizeof(*sams));
                                    sams[samc-1]=sam;
                                    SLM(LB_ADDSTRING,0,strrchr(file,'\\')+1);
                                } else
                                    Error("Can't load sample");
                            }
                        }
                        break;
                    case 33:
                        {
                            int s=GETSAM();
                            if (s!=LB_ERR) {
                                SLM(LB_DELETESTRING,s,0);
                                BASS_SampleFree(sams[s]); // free the sample
                                samc--;
                                memcpy(sams+s,sams+s+1,(samc-s)*sizeof(*sams));
                            }
                        }
                        break;
                    case 31:
                        {
                            int s=GETSAM();
                            if (s!=LB_ERR) {
                                // play the sample (at default rate, volume=50%, random pan position)
                                HCHANNEL ch=BASS_SampleGetChannel(sams[s],FALSE);
                                BASS_ChannelSetAttribute(ch,BASS_ATTRIB_VOL,0.5f);
                                BASS_ChannelSetAttribute(ch,BASS_ATTRIB_PAN,((rand()%201)-100)/100.f);
                                if (!BASS_ChannelPlay(ch,FALSE))
                                    Error("Can't play sample");
                            }
                        }
                        break;
    
                    case 41:
                        BASS_Pause(); // pause output
                        break;
                    case 42:
                        BASS_Start(); // resume output
                        break;
                    case 44:
                        BASS_SetConfig(BASS_CONFIG_UPDATETHREADS,MESS(44,BM_GETCHECK,0,0)?2:1); // set 1 or 2 update threads
                        break;
                }
                break;
    
            case WM_HSCROLL:
                if (l && LOWORD(w)!=SB_THUMBPOSITION && LOWORD(w)!=SB_ENDSCROLL) {
                    int p=SendMessage((HWND)l,TBM_GETPOS,0,0);
                    switch (GetDlgCtrlID((HWND)l)) {
                        case 16:
                            BASS_SetConfig(BASS_CONFIG_GVOL_STREAM,p*100); // global stream volume (0-10000)
                            break;
                        case 26:
                            BASS_SetConfig(BASS_CONFIG_GVOL_MUSIC,p*100); // global MOD volume (0-10000)
                            break;
                        case 34:
                            BASS_SetConfig(BASS_CONFIG_GVOL_SAMPLE,p*100); // global sample volume (0-10000)
                            break;
                        case 43:
                            BASS_SetVolume(p/100.f); // output volume (0-1)
                            break;
                    }
                }
                break;
    
            case WM_INITDIALOG:
                win=h;
                // initialize default output device
                if (!BASS_Init(-1,44100,0,win,NULL)) {
                    Error("Can't initialize device");
                    EndDialog(win,0);
                    return 0;
                }
                // initialize volume sliders
                MESS(16,TBM_SETRANGE,1,MAKELONG(0,100));
                MESS(16,TBM_SETPOS,1,100);
                MESS(26,TBM_SETRANGE,1,MAKELONG(0,100));
                MESS(26,TBM_SETPOS,1,100);
                MESS(34,TBM_SETRANGE,1,MAKELONG(0,100));
                MESS(34,TBM_SETPOS,1,100);
                MESS(43,TBM_SETRANGE,1,MAKELONG(0,100));
                MESS(43,TBM_SETPOS,1,BASS_GetVolume()*100);
                SetTimer(h,1,250,NULL);
                memset(&ofn,0,sizeof(ofn));
                ofn.lStructSize=sizeof(ofn);
                ofn.hwndOwner=h;
                ofn.nMaxFile=MAX_PATH;
                ofn.Flags=OFN_HIDEREADONLY|OFN_EXPLORER;
                return 1;
    
            case WM_DESTROY:
                KillTimer(h,1);
                BASS_Free(); // close output
                break;
        }
        return 0;
    }
    
    int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow)
    {
        // check the correct BASS was loaded
        if (HIWORD(BASS_GetVersion())!=BASSVERSION) {
            MessageBox(0,"An incorrect version of BASS.DLL was loaded",0,MB_ICONERROR);
            return 0;
        }
    
        // display the window
        DialogBox(hInstance,MAKEINTRESOURCE(1000),NULL,&dialogproc);
    
        return 0;
    }
    <Thanks for your help and interest in this problem first :/>

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    Step 1: Learn how to post a build log. FAQ-Compiling (errors) - CodeBlocks

    Step 2: Stop putting full paths in the Code::Blocks "Link Libraries" list; instead put just the library name
    And, put the path to the library under "Search Directory" Linker.

    Edit: You need to know if the library is a C or a C++ library.
    And, you might need to step my step 2; using an Microsoft library with GCC sometimes does require using a full path to it.

    Edit2: Using a Microsoft C++ library with GCC fails almost (if not all of the time) to work with GCC.

    Tim S.
    Last edited by stahta01; 08-04-2018 at 04:27 AM.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  3. #3
    Registered User
    Join Date
    Mar 2018
    Posts
    12
    Hmm, so y e, I do know how to post a build log (lul, maybe it's because of my brain :<)
    So yea, here's the build log:

    <

    -------------- Build: Debug in MP3 Player (compiler: GNU GCC Compiler)---------------

    mingw32-g++.exe -LC:\Users\lap12\OneDrive\Documents\DevPaks\lib -o "bin\Debug\MP3 Player.exe" obj\Debug\main.o -static "C:\Users\lap12\OneDrive\Documents\C projects\MP3 Player\bass.lib"
    obj\Debug\main.o: In function `Error(char const*)':
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:24: undefined reference to `BASS_ErrorGetCode'
    obj\Debug\main.o: In function `dialogproc(HWND__*, unsigned int, unsigned long long, long long)':
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:45: undefined reference to `BASS_GetCPU'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:62: undefined reference to `__imp_GetOpenFileNameA'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:63: undefined reference to `BASS_StreamCreateFile'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:78: undefined reference to `BASS_StreamFree'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:88: undefined reference to `BASS_ChannelPlay'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:95: undefined reference to `BASS_ChannelStop'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:101: undefined reference to `BASS_ChannelPlay'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:111: undefined reference to `__imp_GetOpenFileNameA'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:113: undefined reference to `BASS_MusicLoad'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:128: undefined reference to `BASS_MusicFree'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:138: undefined reference to `BASS_ChannelPlay'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:145: undefined reference to `BASS_ChannelStop'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:151: undefined reference to `BASS_ChannelPlay'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:161: undefined reference to `__imp_GetOpenFileNameA'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:164: undefined reference to `BASS_SampleLoad'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:179: undefined reference to `BASS_SampleFree'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:190: undefined reference to `BASS_SampleGetChannel'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:191: undefined reference to `BASS_ChannelSetAttribute'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:192: undefined reference to `BASS_ChannelSetAttribute'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:193: undefined reference to `BASS_ChannelPlay'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:200: undefined reference to `BASS_Pause'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:203: undefined reference to `BASS_Start'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:206: undefined reference to `BASS_SetConfig'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:216: undefined reference to `BASS_SetConfig'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:219: undefined reference to `BASS_SetConfig'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:222: undefined reference to `BASS_SetConfig'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:225: undefined reference to `BASS_SetVolume'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:234: undefined reference to `BASS_Init'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:247: undefined reference to `BASS_GetVolume'
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:258: undefined reference to `BASS_Free'
    obj\Debug\main.o: In function `WinMain':
    C:/Users/lap12/OneDrive/Documents/C projects/MP3 Player/main.cpp:267: undefined reference to `BASS_GetVersion'
    collect2.exe: error: ld returned 1 exit status
    Process terminated with status 1 (0 minute(s), 1 second(s))
    33 error(s), 0 warning(s) (0 minute(s), 1 second(s))
    >

    And, will a C library works with C++ ��? (Just asking)

  4. #4
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    A C library works with C++ client code; you might have to do a few simple things to get it to work.

    Add the following around the header include for the bass library
    Instead of "some_header.h" use the library [header] filename.

    Code:
    extern "C"
    {
      #include "some_header.h"
    }
    Edit: I downloaded the source code and it already has [extern "C"] inside the header.

    If the above fails; NOTE, you must to a full re-build after doing these types of changes.

    Replace the fullpath to the lib file with the full path to the dll files.
    This works for many; but, not all C dlls.

    Tim S.
    Last edited by stahta01; 08-04-2018 at 12:47 PM.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  5. #5
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    Warning: Some old GCC compilers have trouble with spaces in the path.

    "C:\Users\lap12\OneDrive\Documents\C projects\MP3 Player\bass.lib"
    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  6. #6
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    I tried to attach an example project; but, not sure it worked.

    Below is my build log.
    Code:
    -------------- Clean: Debug in basstest (compiler: GNU GCC Compiler 6.4.0 32 bit)---------------
    
    Cleaned "basstest - Debug"
    
    -------------- Build: Debug in basstest (compiler: GNU GCC Compiler 6.4.0 32 bit)---------------
    
    i686-w64-mingw32-g++.exe -Wall -g -I..\c -c C:\Users\stahta01\devel\open_source_code\no_version_control\test\bass24\basstest\basstest.cpp -o obj\Debug\basstest.o
    i686-w64-mingw32-g++.exe -L..\c -L..\..\bass24 -o bin\Debug\basstest.exe obj\Debug\basstest.o   -lbass -lcomdlg32
    C:\Users\stahta01\devel\open_source_code\no_version_control\test\bass24\basstest\basstest.cpp: In function 'INT_PTR dialogproc(HWND, UINT, WPARAM, LPARAM)':
    C:\Users\stahta01\devel\open_source_code\no_version_control\test\bass24\basstest\basstest.cpp:63:55: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
            if (str=BASS_StreamCreateFile(FALSE,file,0,0,0)) {
                                                           ^
    C:\Users\stahta01\devel\open_source_code\no_version_control\test\bass24\basstest\basstest.cpp:113:65: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
            if (mod=BASS_MusicLoad(FALSE,file,0,0,BASS_MUSIC_RAMPS,1)) {
                                                                     ^
    C:\Users\stahta01\devel\open_source_code\no_version_control\test\bass24\basstest\basstest.cpp:164:70: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
            if (sam=BASS_SampleLoad(FALSE,file,0,0,3,BASS_SAMPLE_OVER_POS)) {
                                                                          ^
    Output file is bin\Debug\basstest.exe with size 127.73 KB
    Process terminated with status 0 (0 minute(s), 2 second(s))
    0 error(s), 3 warning(s) (0 minute(s), 2 second(s))
    Tim S.
    Attached Files Attached Files
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  7. #7
    Registered User
    Join Date
    Mar 2018
    Posts
    12
    Hmmmmm.... I guess my copy MinGW is old or something.... Because, it couldn't even compile pthread :< Oh well, let me just try

  8. #8
    Registered User
    Join Date
    Mar 2018
    Posts
    12
    <


    -------------- Build: Debug in basstest (compiler: GNU GCC Compiler)---------------

    mingw32-g++.exe -L..\BassTest -L..\..\BassTest\ -LC:\Users\lap12\OneDrive\Documents\DevPaks\lib -o bin\Debug\basstest.exe obj\Debug\basstest.o -static -lcomdlg32 -lbass
    C:/Program Files/mingw-w64/x86_64-7.3.0-win32-seh-rt_v5-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\BassTest\bass.lib when searching for -lbass
    C:/Program Files/mingw-w64/x86_64-7.3.0-win32-seh-rt_v5-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\..\BassTest\\bass.lib when searching for -lbass
    C:/Program Files/mingw-w64/x86_64-7.3.0-win32-seh-rt_v5-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lbass
    collect2.exe: error: ld returned 1 exit status
    Process terminated with status 1 (0 minute(s), 0 second(s))
    2 error(s), 0 warning(s) (0 minute(s), 0 second(s))

    >

    Well... That's kinda weird... The .lib was taken from the base64.zip source archive...

  9. #9
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    I was compiling with 32 bit compiler; I will try using 64 bit compiler in the near future.

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  10. #10
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    The 64 bit import library (bass.lib) does not work with the GCC 5.1 64 bit compiler I tried.
    The full path linking to the 64 bit DLL did work.

    Code:
    -------------- Build: Debug in basstest x64 (compiler: GNU GCC Compiler)---------------
    
    x86_64-w64-mingw32-g++.exe -Wall -g -std=gnu++11 -I..\c -c C:\Users\stahta01\devel\open_source_code\no_version_control\test\bass24\basstest\basstest.cpp -o obj\Debug\basstest.o
    x86_64-w64-mingw32-g++.exe -L..\x64 -o bin\Debug\basstest.exe obj\Debug\basstest.o   ..\x64\bass.dll -lcomdlg32
    C:\Users\stahta01\devel\open_source_code\no_version_control\test\bass24\basstest\basstest.cpp: In function 'INT_PTR dialogproc(HWND, UINT, WPARAM, LPARAM)':
    C:\Users\stahta01\devel\open_source_code\no_version_control\test\bass24\basstest\basstest.cpp:63:55: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
            if (str=BASS_StreamCreateFile(FALSE,file,0,0,0)) {
                                                           ^
    C:\Users\stahta01\devel\open_source_code\no_version_control\test\bass24\basstest\basstest.cpp:113:65: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
            if (mod=BASS_MusicLoad(FALSE,file,0,0,BASS_MUSIC_RAMPS,1)) {
                                                                     ^
    C:\Users\stahta01\devel\open_source_code\no_version_control\test\bass24\basstest\basstest.cpp:164:70: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
            if (sam=BASS_SampleLoad(FALSE,file,0,0,3,BASS_SAMPLE_OVER_POS)) {
                                                                          ^
    Output file is bin\Debug\basstest.exe with size 149.53 KB
    Process terminated with status 0 (0 minute(s), 1 second(s))
    0 error(s), 3 warning(s) (0 minute(s), 1 second(s))
    Tim S.
    Last edited by stahta01; 08-05-2018 at 06:29 AM.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  11. #11
    Registered User
    Join Date
    Mar 2018
    Posts
    12
    Ohhhhh, so it was the execution bit problem? And the linking was ok?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linking issue.
    By urthwrm in forum C++ Programming
    Replies: 2
    Last Post: 09-20-2011, 10:13 AM
  2. bandwidth issue / network issue with wireless device communication
    By vlrk in forum Networking/Device Communication
    Replies: 0
    Last Post: 07-05-2010, 11:52 PM
  3. MinGW linking issue
    By ascen in forum Windows Programming
    Replies: 1
    Last Post: 03-31-2010, 04:26 AM
  4. linking to my own DLL
    By yahn in forum C++ Programming
    Replies: 19
    Last Post: 10-13-2008, 07:59 PM
  5. Linking MFC dll to .NET app
    By Raptor in forum C++ Programming
    Replies: 2
    Last Post: 08-01-2005, 08:49 AM

Tags for this Thread