Hottest Free Downloads - DownloadPipe.com Over 197,000 downloads! Bookmark Now!
DownloadPipe.com - New Downloads Every Minute
 SEARCH:
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

libraries n stuff

 
   Mac (Home) -> Programmer Code RSS
Next:  Metrowerks Session at 2005 MacHack/AdHoc  
Author Message
inx

External


Since: Jul 14, 2005
Posts: 3



(Msg. 1) Posted: Tue Jul 19, 2005 4:35 am
Post subject: libraries n stuff
Archived from groups: comp>sys>mac>programmer>codewarrior (more info?)

hi

i hope somebody can help me, maybe explain something.

i try to use a code from another project and have several problems or
do not know enough about libraries, linking, and stuff...

the project i want to use can be compiled as dynamic library with xcode
(theres a project to do this), i recompiled the source-files as shared
library in codewarrior. for this i made a new project, added all the
..cc files to it and configured the target to build a shared library.
(right?)

then i made a project where i added the shared-library, and the correct
search paths (to the lib, and to the .h files). the .cc file looks like
this:


#include "mpisearchFaceDetector.h"

int main () {
//
// Initialize the MPISearchObjectDetector object
//

MPISearchFaceDetector mpi;

return 0;
}

the code compiles fine, but i get link errors:

Link Error : undefined:
'MPISearchFaceDetector::~MPISearchFaceDetector()' (code)
Referenced from 'main' in main.cc

Link Error : undefined:
'MPISearchFaceDetector::MPISearchFaceDetector()' (code)
Referenced from 'main' in main.cc


so, it looks like, the library does not work properly?
looks like the linker does not find the class...
do i have to take care of something, if i build the lib - entrypoint?
do i have to change a setting in the test project, tell the target
something about the lib (whatever)
how does this all work ?!!? Smile
is it possible to use the framework (compiled with xcode)

i dont know why this does not work, and hope somebody can help me,
bringing some clarity...

thx
inx
Back to top
Login to vote
jgrimley

External


Since: Jul 20, 2005
Posts: 3



(Msg. 2) Posted: Wed Jul 20, 2005 4:15 pm
Post subject: Re: libraries n stuff [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Is you library project exporting the functions? Check the Linker panel
amd make sure that you are exporting things. For example via #pragma.


inx wrote:
> hi
>
> i hope somebody can help me, maybe explain something.
>
> i try to use a code from another project and have several problems or
> do not know enough about libraries, linking, and stuff...
>
> the project i want to use can be compiled as dynamic library with xcode
> (theres a project to do this), i recompiled the source-files as shared
> library in codewarrior. for this i made a new project, added all the
> .cc files to it and configured the target to build a shared library.
> (right?)
>
> then i made a project where i added the shared-library, and the correct
> search paths (to the lib, and to the .h files). the .cc file looks like
> this:
>
>
> #include "mpisearchFaceDetector.h"
>
> int main () {
> //
> // Initialize the MPISearchObjectDetector object
> //
>
> MPISearchFaceDetector mpi;
>
> return 0;
> }
>
> the code compiles fine, but i get link errors:
>
> Link Error : undefined:
> 'MPISearchFaceDetector::~MPISearchFaceDetector()' (code)
> Referenced from 'main' in main.cc
>
> Link Error : undefined:
> 'MPISearchFaceDetector::MPISearchFaceDetector()' (code)
> Referenced from 'main' in main.cc
>
>
> so, it looks like, the library does not work properly?
> looks like the linker does not find the class...
> do i have to take care of something, if i build the lib - entrypoint?
> do i have to change a setting in the test project, tell the target
> something about the lib (whatever)
> how does this all work ?!!? Smile
> is it possible to use the framework (compiled with xcode)
>
> i dont know why this does not work, and hope somebody can help me,
> bringing some clarity...
>
> thx
> inx
>
Back to top
Login to vote
ingo

External


Since: Jul 25, 2005
Posts: 1



(Msg. 3) Posted: Mon Jul 25, 2005 8:06 am
Post subject: Re: libraries n stuff [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

hi

thanks for help. i tried to export functions via #pragma, all globals
and both, #pragma and .exp file but nothing changes. this are the
error-messages:

Link Error : undefined: 'operator delete(void*)' (code)
Referenced from 'MPISearchFaceDetector::~MPISearchFaceDetector()' in
libmpisearch
Referenced from
'MPISearchObjectDetector<float>::~MPISearchObjectDetector()' in
libmpisearch
Referenced from 'MPISearchStream<float>::~MPISearchStream()' in
libmpisearch
Referenced from
'std::__vec_deleter<MPIScaledImage<float>::const_iterator,
std::allocator<MPIScaledImage<float>::const_iterator>>::~__vec_deleter()'
in libmpisearch
Referenced from 'MPISearchStream<float>::release()' in libmpisearch
Referenced from 'std::__vec_deleter<unsigned long,
std::allocator<unsigned long>>::~__vec_deleter()' in libmpisearch

Link Error : undefined: 'operator delete[](void*)' (code)
Referenced from 'MPISearchStream<float>::release()' in libmpisearch
Referenced from
'MPISearchStream<float>::deleteCacheCorners(CornerCache<float>**&,float*&)'
in libmpisearch

Link Error : undefined: '__ptr_glue' (code)
Referenced from 'MPISearchStream<float>::release()' in libmpisearch

the main() is the same as before.
do i build the library right?
whats wrong?

thx
inx
Back to top
Login to vote
MW Ron

External


Since: Jun 06, 2005
Posts: 31



(Msg. 4) Posted: Mon Jul 25, 2005 6:45 pm
Post subject: Re: libraries n stuff [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <1122304003.930928.197420.RemoveThis@g49g2000cwa.googlegroups.com>,
ingo.RemoveThis@subnet.at wrote:

>hi
>
>thanks for help. i tried to export functions via #pragma, all globals
>and both, #pragma and .exp file but nothing changes. this are the
>error-messages:
>
>Link Error : undefined: 'operator delete(void*)' (code)
>Referenced from 'MPISearchFaceDetector::~MPISearchFaceDetector()' in
>libmpisearch
>Referenced from
>'MPISearchObjectDetector<float>::~MPISearchObjectDetector()' in
>libmpisearch
>Referenced from 'MPISearchStream<float>::~MPISearchStream()' in
>libmpisearch
>Referenced from
>'std::__vec_deleter<MPIScaledImage<float>::const_iterator,
>std::allocator<MPIScaledImage<float>::const_iterator>>::~__vec_deleter()'
>in libmpisearch
>Referenced from 'MPISearchStream<float>::release()' in libmpisearch
>Referenced from 'std::__vec_deleter<unsigned long,
>std::allocator<unsigned long>>::~__vec_deleter()' in libmpisearch
>
>Link Error : undefined: 'operator delete[](void*)' (code)
>Referenced from 'MPISearchStream<float>::release()' in libmpisearch
>Referenced from
>'MPISearchStream<float>::deleteCacheCorners(CornerCache<float>**&,float*&)'
>in libmpisearch
>
>Link Error : undefined: '__ptr_glue' (code)
>Referenced from 'MPISearchStream<float>::release()' in libmpisearch
>
>the main() is the same as before.
>do i build the library right?
>whats wrong?

It looks likeyou are missing the runtime library.

Ron

--
CodeWarrior Community Forum is a free online resource for developers
to discuss CodeWarrior topics with other users and our staff
-- http://www.codewarrior.com/community --

Ron Liechty - MWRon.RemoveThis@metrowerks.com - http://www.codewarrior.com
Back to top
Login to vote
idragon

External


Since: Jul 26, 2005
Posts: 1



(Msg. 5) Posted: Tue Jul 26, 2005 3:38 pm
Post subject: Re: libraries n stuff [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

i included the MSL_All_Carbon.Lib. now it links properly.

thanks all

inx
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Bug in alloc.c? - I'm getting an infinite loop in alloc.c, which is located in MSL/MSL_C/MSL_Common/Src. This is with CW 9.5. The function is allocate_from_var_pools. There is a do/while loop that searches for a block with the required size to allocate a block of..

Multiply defined symbol: .bss - Hi, when trying to build a dll for Windows using CW9 on MacOS, I get an error message like: Link Error : Multiply defined symbol: .bss in files file1.cpp, file2.cpp The same message with the same filenames is repeated several times, but....

Where next? - Hi folks, All of my recent Mac coding has been Carbon C++, mostly using PowerPlant as a framework. As most of my clients are moving to X and CW's future is, shall we say, uncertain I'm wondering where to look for my future coding setup. I've dabbled....

Does mwcc work on Tiger? - Anybody using the comand line compilers on 10.4? When saving the following simple program as /tmp/x.cpp: int main() { double x = 0.5; return 0; } and trying to compile it with $ mwcc -c /tmp/x.cpp , I get the error message Error :....

Console app "file" selector - Hello, I feel like I've asked this before, but I did a search on the archives and came up short. I've got a console std c app that I'm compiling with CW. When it runs, it pops up a little menu where I can type in some command line arguments (for..
       Mac (Home) -> Programmer Code All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum
Categories:
 Windows Forums
 Game Forums
 Linux Forums
  Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact