Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / CodeWarrior / January 2005



Tip: Looking for answers? Try searching our database.

Linker gives: __ZdlPv is undefined

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lorenzo Medici - 20 Jan 2005 13:45 GMT
Hi Group

I try to create JNI library wir CW 8.3 on MacOS 10.3.6.
I would prefer to do this lib in C++. So i resulted into the following
construct in cpp-file:

#define _MSL_USING_MW_C_HEADERS 1

#include <string>
using namespace std;

#ifdef __cplusplus
extern "C" {
#endif

#pragma export on
#include "RequestDispatcher.h"  // This is the machine generated header
                                  files with the JNI Header...

JNIEXPORT jstring Java_...._myfunc()
{

}

#ifdef __cplusplus
}
#endif

Now when i declare a string variable in myfunc i run into the linker error
"__ZdlPV is undefined".
I use the Project settings from the example "Advanced JIN example".

I invested a lot of time in this issue and i spin round.
I have a lot of questions concerning this topic:

1. Is it allowed to set the first ##define statement? (without this
statement i cannot compile it.)

2. how can i avoid this linker error? What i'm doing wrong?
3. i had to change on checkbox in the linker settings: i disabled the "Two
level Namespaces".
I had to do that, because when i tried only to integrate a strcpy() cmd i
had some other link errors. With this checkbox disabled it worked.

But now i'm tumbeling from one problem to another and i'm not sure if i
really had solved the problems before or if i created some new one.

Any help is really most welcome, bacause i have no more idea how to solve
this...

Lorenzo Medici
MW Ron - 20 Jan 2005 19:27 GMT
>Hi Group
>
[quoted text clipped - 33 lines]
>1. Is it allowed to set the first ##define statement? (without this
>statement i cannot compile it.)

You need to use the BSD C lib and headers in order to use JNI  you can
use MSL C++ with BSD C lib thought.

I think all of your problems stem from that.   I don't know what errors
you are getting  by using MSLC it probably has to do with using the
incorrect prefix file or something.

Ron

>2. how can i avoid this linker error? What i'm doing wrong?
>3. i had to change on checkbox in the linker settings: i disabled the "Two
[quoted text clipped - 9 lines]
>
>Lorenzo Medici

Signature

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

Ron Liechty - MWRon@metrowerks.com - http://www.metrowerks.com

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.