@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10



Comments:

<0> Did you do the same for any other libraries you might be linking?
<1> I don't know about the dependencies...how can I find what it needs?
<1> (I'm using fmod library too, and there's no prob with it)
<0> Check the manual.
<1> here is this libs url (it has no man :( ) http://adion.djdecks.be/vb/bpmdetect/index.php
<0> What symbols were missing?
<1> symbols? it says nothing about symbols...
<0> Ok. What "references" are undefined?
<0> Or unresolved, at any rate.
<1> well...all of them :(
<0> All of what?
<1> oh, functions (sorry)
<0> That isn't likely.
<1> hm...well...it is the case... (or I'm missing something)
<0> What do you mean by "all functions"?
<1> well, it's a library for beats-per-minute detection, and I need all functions for the program to run properly...whenever I try to call one of them the linker says that the reference to it is undefined



<0> Ok, so you mean only the functions in your BPM library are reported unresolved.
<0> That's completely different.
<1> hm...please, explain it to me :)
<0> What is there to explain?
<1> well
<1> how can I make it work? :)
<0> Is your library written in C?
<1> well...I don't know.
<0> Well, come to think of it, it doesn't matter.
<0> The header needs to support C++. Specifically, you may need to declare the functions in the library as extern "C".
<1> so something like void* BPM_Create(); would look like extern "C" void* BPM_Create(); ?
<0> I said maybe.
<1> I've tried that
<1> no different
<0> How do you know you are linking the library?
<1> hm...I've put it in dev-c++ project libraries, put it's directory to paths, checked the makefile dev-c++ makes and it's there...
<0> Never used dev-c++.
<0> Usually, you p*** a list of libraries to the compiler on its command line.
<0> Er. To the linker, rather.
<0> But anyway, check your linker manual, and probably your linker command-line.
<1> hm...but, wouldn't it be strange if it linked one library properly and not the other one?
<0> Not if you did it wrong.
<1> well...sure, but...where could I go wrong?
<0> No idea.
<0> Not other than what I just told you, anyway.
<1> (oh yeah, dev-c++ is just an ide..it uses mingw)
<1> :(
<1> well, thanks anyway
<0> Anyway... I don't know that the header necessarily needs to support C++, per se... but my point is that you could be using the wrong calling convention.
<0> Either that, or you're not linking properly.
<1> I see
<0> I haven't messed with C compatibility in ages.
<0> Most modern headers have a conditional that specifies the calling convention automatically.
<1> well...yeah...but what do you do when you don't have a header?
<2> You could shoot yourself through the head?
<0> Go to the library developer and get a header.
<1> heh....ok....nevermind....thank you for your time :)
<0> Or you could improvise something if you really wanted to, but then you run the risk of compatibility problems and other mistakes.
<1> hm...what do you mean by "improvise"?
<2> basically, the only thing you need is a declaration of the library functions that you call.
<2> If the library is a C library, and you call: int f(whatever), then all you need is:
<2> extern "C" void f();
<2> the return type and the parameters are ignored anyway.
<1> ignored? really?
<0> danilov: You can get the essential info from the library if you really want to, but not necessarily the information that you need in order to use it the way that it was intended.
<2> If the library is a C++ library, then you need to specify it exactly - not using the "C" and even then it might not work if the library wasn't compiled with the same compiler as you are using.
<0> So, in other words, you generally don't want to do that.
<1> hm...I have example in Delphi...if it declares with stdcall, then it's a C++?
<2> Well, it would link - but if you declare void f(double); and call it as f(4.4); but really 'f' in the library is a int f(int), then things will go wrong.
<0> So, anyway. Get the header.
<2> What is the problem that you get?
<0> Run: He doesn't know how to link his program.
<2> I think he just doesn't provide enough information.
<0> He has unresolved references, so, obviously, the logical thing to do is to strike out and rewrite the header.
<2> Probably underestimating our knowledge... the more details the better
<1> sorry for getting me wrong, but I don't know what more should I say :(
<0> Go make sure that you're really linking the library.
<2> More likely, he has problems linking a MSVC-created DLL in mingw
<2> danilov: you could show us the EXACT linker output
<0> Ah.
<1> ok...wait a sec



<0> I would expect the linker to complain about the library format if it were something like that.
<0> But then I don't know anything about mingw.
<1> ...\main.o(.text+0x1eb) In function `Z8callbackPvS_iS_':
<1> [Linker error] undefined reference to `BPM_Create'
<1> [Linker error] undefined reference to `BPM_AddSample(void*, float)'
<1> ...\main.o(.text+0x660) In function `Z7AnalyzePc':
<1> [Linker error] undefined reference to `BPM_Create'
<1> ...\main.o(.text+0x660) ld returned 1 exit status
<1> ...\Makefile.win [Build Error] [audiotag.exe] Error 1
<2> danilov: I suppose mingw has the utility 'nm' ?
<2> What gives: nm main.o | grep BPM_Create
<1> wait a sec please
<3> is anyone using VC++ 2005 Express?
<1> it produces an empty file (I've added "> temp.txt")
<2> Then you did it wrong
<1> what should I do then?
<2> [03:59] <1> ...\main.o(.text+0x1eb) In function `Z8callbackPvS_iS_':
<2> [03:59] <1> [Linker error] undefined reference to `BPM_Create'
<4> find what every library or object file defines those symbols, and link it in
<2> That means that main.o is refering to `BPM_Create' somehow
<5> danilov: dev-c++?
<4> whatever
<1> yes
<5> :)
<2> Does nm main.o give any output at all?
<1> wait a sec
<1> yes
<5> rebuild
<2> And there is no BPM_Create in that list??
<5> ctrl+f11
<1> ok...will take ages.. :)
<2> guys.. that is NOT his problem
<2> danilov: please answer my questions... or I have other things to do :/
<1> hey
<1> wait
<1> there is....I don't know why it didn't show up with grep
<1> _BPM_Create (sorry Run, was searching for that)
<1> something like:
<1> 00000000 T __ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EPKS3_RKS6_
<1> 00000000 T __ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_PKS3_
<1> U _BPM_Create
<1> U _FSOUND_DSP_Create@12
<1> U _FSOUND_DSP_Free@4
<2> back
<2> ok, so you could try having an IQ of > 100, and just pasted the U _BPM_Create
<4> run's in a fun mood today
<2> danilov: can you get 'grep' working?
<3> how link libraries in VC++ 2005 Express?
<4> just ask?
<4> erm
<4> heh
<4> alex1104: project properties -> linker
<3> and?
<4> and look for additional linker inputs
<4> i forget which page it's on
<4> off the top of my head
<3> inputs:)
<3> thanks
<3> what about dlls?
<4> what about them
<3> how to load additional dlls?
<4> you either link against their import library, or you load them yourself
<3> hmm
<3> i am getting this LINK : fatal error LNK1104: cannot open file 'opengl32.obj'
<0> alex1104: Do you intend to link that file? Does it exist?
<3> yes, it does
<6> project/properties/linker/general/input
<0> Do you have permission to open it? Are you specifying the correct path to the linker?
<3> yep
<3> EwIck did you mean project/properties/linker/input?
<3> may be I am linking wrong library, how to find out what library contains wglMakeCurrent()
<3> ?
<3> nevermind
<3> I was trying to link opengl32 instead of opengl32.lib...


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #c++
or
Go to some related logs:

c_cam4
AUGUST VON WASSERMANN DEVELOP A SCIENTIFIC TEST FOR IN 1906?
#mirc
osito paddy
#skype
bad_pool_header guildwars
#MissKitten
$message2 = sprintf (_ASEND_MSG, $adminName2, $mosConfig_sitename, $row->name,
kernel demage
skype



Home  |  disclaimer  |  contact  |  submit quotes