🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.comp.lang.learn.c-c++
6 messages
6 total messages Started by Alexander Cohen Wed, 11 Jun 2003 15:27
Link error CW8 mac compile for windows
#636
Author: Alexander Cohen
Date: Wed, 11 Jun 2003 15:27
39 lines
2956 bytes
Hi, im compiling an application for windows from codewarrior 8 mac. All
compiles fine but at the end I get 6 link errors wich I don�t understand
since the libraries needed are there in my project. The project has c and
c++ files and I am compiling as C++. The parts that need to be compiled as C
are bracketed with extern "C" and have .c extensions. Here are the errors:

Link Error   : Undefined symbol: 'double fabs(double) (?fabs@@YANN@Z)'
referenced from '_MAT3inverse' in cmsmtrx.c
referenced from 'double Convert15Fixed16(long) (?Convert15Fixed16@@YANJ@Z)'
in cmsio1.c
referenced from '_MAT3inverse' in cmsmtrx.c

Link Error   : Undefined symbol: 'double floor(double) (?floor@@YANN@Z)'
referenced from '_cmsBuildParametricGamma' in cmsgamma.c
referenced from '__cmsQuantizeVal' in cmssamp.c
referenced from '_cmsBuildGamma' in cmsgamma.c

Link Error   : Undefined symbol: 'double pow(double, double)
(?pow@@YANNN@Z)'
referenced from '_cmsBuildParametricGamma' in cmsgamma.c
referenced from '_cmsBuildParametricGamma' in cmsgamma.c
referenced from '_cmsBuildParametricGamma' in cmsgamma.c
referenced from '_cmsBuildParametricGamma' in cmsgamma.c
referenced from '_cmsBuildParametricGamma' in cmsgamma.c
referenced from '_cmsBuildParametricGamma' in cmsgamma.c
referenced from '_cmsBuildParametricGamma' in cmsgamma.c
referenced from '_cmsBuildParametricGamma' in cmsgamma.c
...

I have a feeling that I have a name mangling problem but im really not sure
how to fix it.

Any help is greatly appreciated.

Thank you,

-- 
Alex Cohen
<http://www.toomuchspace.com>
Re: Link error CW8 mac compile for windows
#637
Author: Howard Hinnant
Date: Wed, 11 Jun 2003 16:10
47 lines
3865 bytes
In article <BB0CC289.E8%alex@toomuchspace.com>, Alexander Cohen
<alex@toomuchspace.com> wrote:

| Hi, im compiling an application for windows from codewarrior 8 mac. All
| compiles fine but at the end I get 6 link errors wich I don�t understand
| since the libraries needed are there in my project. The project has c and
| c++ files and I am compiling as C++. The parts that need to be compiled as C
| are bracketed with extern "C" and have .c extensions. Here are the errors:
| 
| Link Error   : Undefined symbol: 'double fabs(double) (?fabs@@YANN@Z)'
| referenced from '_MAT3inverse' in cmsmtrx.c
| referenced from 'double Convert15Fixed16(long) (?Convert15Fixed16@@YANJ@Z)'
| in cmsio1.c
| referenced from '_MAT3inverse' in cmsmtrx.c
| 
| Link Error   : Undefined symbol: 'double floor(double) (?floor@@YANN@Z)'
| referenced from '_cmsBuildParametricGamma' in cmsgamma.c
| referenced from '__cmsQuantizeVal' in cmssamp.c
| referenced from '_cmsBuildGamma' in cmsgamma.c
| 
| Link Error   : Undefined symbol: 'double pow(double, double)
| (?pow@@YANNN@Z)'
| referenced from '_cmsBuildParametricGamma' in cmsgamma.c
| referenced from '_cmsBuildParametricGamma' in cmsgamma.c
| referenced from '_cmsBuildParametricGamma' in cmsgamma.c
| referenced from '_cmsBuildParametricGamma' in cmsgamma.c
| referenced from '_cmsBuildParametricGamma' in cmsgamma.c
| referenced from '_cmsBuildParametricGamma' in cmsgamma.c
| referenced from '_cmsBuildParametricGamma' in cmsgamma.c
| referenced from '_cmsBuildParametricGamma' in cmsgamma.c
| ...
| 
| I have a feeling that I have a name mangling problem but im really not sure
| how to fix it.
| 
| Any help is greatly appreciated.

Does the application "manually prototype" any of these missing
functions?  That might cause these symptoms.  In C++, one must include
the appropriate header instead of writing your own prototype.

If that's not it, if you could reproduce this in a small but complete
demo, I'm sure we could figure it out.

-- 
Howard Hinnant
Metrowerks
Re: Link error CW8 mac compile for windows
#638
Author: MW Ron
Date: Wed, 11 Jun 2003 21:32
61 lines
3801 bytes
In article <BB0CC289.E8%alex@toomuchspace.com>,
 Alexander Cohen <alex@toomuchspace.com> wrote:

>Hi, im compiling an application for windows from codewarrior 8 mac. All
>compiles fine but at the end I get 6 link errors wich I don�t understand
>since the libraries needed are there in my project. The project has c and
>c++ files and I am compiling as C++. The parts that need to be compiled as C
>are bracketed with extern "C" and have .c extensions. Here are the errors:

Be sure you are using the right prefix file.  

Also I would think that perhaps you may be mixing the headers and 
precompiled headers up or something.

Finally do you have any other libraries included perhaps they need to be 
rebuilt.  If they were built and linked with a pow() or fabs() that are 
listed as extern  and now they are inlined that can cause a problem.

If you can narrow this down to a smaller project it might help, but I'm 
thinking this is very likely from an older library that is being linked 
in.

Ron
>
>Link Error   : Undefined symbol: 'double fabs(double) (?fabs@@YANN@Z)'
>referenced from '_MAT3inverse' in cmsmtrx.c
>referenced from 'double Convert15Fixed16(long) (?Convert15Fixed16@@YANJ@Z)'
>in cmsio1.c
>referenced from '_MAT3inverse' in cmsmtrx.c
>
>Link Error   : Undefined symbol: 'double floor(double) (?floor@@YANN@Z)'
>referenced from '_cmsBuildParametricGamma' in cmsgamma.c
>referenced from '__cmsQuantizeVal' in cmssamp.c
>referenced from '_cmsBuildGamma' in cmsgamma.c
>
>Link Error   : Undefined symbol: 'double pow(double, double)
>(?pow@@YANNN@Z)'
>referenced from '_cmsBuildParametricGamma' in cmsgamma.c
>referenced from '_cmsBuildParametricGamma' in cmsgamma.c
>referenced from '_cmsBuildParametricGamma' in cmsgamma.c
>referenced from '_cmsBuildParametricGamma' in cmsgamma.c
>referenced from '_cmsBuildParametricGamma' in cmsgamma.c
>referenced from '_cmsBuildParametricGamma' in cmsgamma.c
>referenced from '_cmsBuildParametricGamma' in cmsgamma.c
>referenced from '_cmsBuildParametricGamma' in cmsgamma.c
>...
>
>I have a feeling that I have a name mangling problem but im really not sure
>how to fix it.
>
>Any help is greatly appreciated.
>
>Thank you,

-- 
  Get printed CodeWarrior Documentation (limited selection) 
     And all the latest versions of CodeWarrior Manuals

http://www.metrowerks.com/MW/Support/dev_resources/default.htm

Ron Liechty - MWRon@metrowerks.com - http://www.metrowerks.com
Re: Link error CW8 mac compile for windows
#639
Author: Alexander Cohen
Date: Wed, 11 Jun 2003 22:42
40 lines
3143 bytes
On 6/11/03 5:32 PM, in article
mwron-D8B416.17322611062003@enews.newsguy.com, "MW Ron"
<mwron@metrowerks.com> wrote:

> In article <BB0CC289.E8%alex@toomuchspace.com>,
> Alexander Cohen <alex@toomuchspace.com> wrote:
> 
>> Hi, im compiling an application for windows from codewarrior 8 mac. All
>> compiles fine but at the end I get 6 link errors wich I don�t understand
>> since the libraries needed are there in my project. The project has c and
>> c++ files and I am compiling as C++. The parts that need to be compiled as C
>> are bracketed with extern "C" and have .c extensions. Here are the errors:
> 
> Be sure you are using the right prefix file.
> 
> Also I would think that perhaps you may be mixing the headers and
> precompiled headers up or something.
> 
> Finally do you have any other libraries included perhaps they need to be
> rebuilt.  If they were built and linked with a pow() or fabs() that are
> listed as extern  and now they are inlined that can cause a problem.
> 
> If you can narrow this down to a smaller project it might help, but I'm
> thinking this is very likely from an older library that is being linked
> in.
> 
> Ron

What prefix file should I be using? Im using a custom one by the makers of a
specialized plugin SDK.

I've only included the regular Win libraries. Kernel32, user32... I have
also included the 3 icm libraries, but I get the link errors without them.

I really don�t see how I can narrow this down. I really wish I could. If I
create a small app that does a floor, abs and a few other math routines that
are currently not linking correctly, they link without any problem with the
same libraries.

Alex
Re: Link error CW8 mac compile for windows
#641
Author: Guy Harrison
Date: Thu, 12 Jun 2003 14:12
52 lines
3648 bytes
Alexander Cohen wrote:

> Hi, im compiling an application for windows from codewarrior 8 mac.
> All compiles fine but at the end I get 6 link errors wich I don�t
> understand since the libraries needed are there in my project. The
> project has c and c++ files and I am compiling as C++. The parts that
> need to be compiled as C are bracketed with extern "C" and have .c
> extensions. Here are the errors:

Without info stating explicitly to the contrary, the parts that need to
be compiled as C ought to be compiled by a C compiler (hint: macro
__cplusplus and/or other vendor specific definitions).
 
> Link Error   : Undefined symbol: 'double fabs(double) (?fabs@@YANN@Z)'
> referenced from '_MAT3inverse' in cmsmtrx.c
> referenced from 'double Convert15Fixed16(long)
> (?Convert15Fixed16@@YANJ@Z)' in cmsio1.c
> referenced from '_MAT3inverse' in cmsmtrx.c
> 
> Link Error   : Undefined symbol: 'double floor(double)
> (?floor@@YANN@Z)' referenced from '_cmsBuildParametricGamma' in
> cmsgamma.c referenced from '__cmsQuantizeVal' in cmssamp.c
> referenced from '_cmsBuildGamma' in cmsgamma.c
> 
> Link Error   : Undefined symbol: 'double pow(double, double)
> (?pow@@YANNN@Z)'
> referenced from '_cmsBuildParametricGamma' in cmsgamma.c
> referenced from '_cmsBuildParametricGamma' in cmsgamma.c
> referenced from '_cmsBuildParametricGamma' in cmsgamma.c
> referenced from '_cmsBuildParametricGamma' in cmsgamma.c
> referenced from '_cmsBuildParametricGamma' in cmsgamma.c
> referenced from '_cmsBuildParametricGamma' in cmsgamma.c
> referenced from '_cmsBuildParametricGamma' in cmsgamma.c
> referenced from '_cmsBuildParametricGamma' in cmsgamma.c
> ...
> 
> I have a feeling that I have a name mangling problem but im really not
> sure how to fix it.

If the parenthesised text represents mangled names on your compiler then
yes.

> Any help is greatly appreciated.

<gut feeling>
Change the parts responsible for invoking the compiler upon *.c files
such that said files get a C compilation.
</gut feeling>


-- 
Guy Harrison
Re: Link error CW8 mac compile for windows
#640
Author: MW Ron
Date: Thu, 12 Jun 2003 15:15
59 lines
3757 bytes
In article <BB0D28AC.41B%alex@toomuchspace.com>,
 Alexander Cohen <alex@toomuchspace.com> wrote:


All I can think of is using a preprocessed file and seeing if that helps 
it.  you may want to use a link map and see what is being linked in.  
Other than that I'm stymied without some sort example I can look at.

Ron

>On 6/11/03 5:32 PM, in article
>mwron-D8B416.17322611062003@enews.newsguy.com, "MW Ron"
><mwron@metrowerks.com> wrote:
>
>> In article <BB0CC289.E8%alex@toomuchspace.com>,
>> Alexander Cohen <alex@toomuchspace.com> wrote:
>> 
>>> Hi, im compiling an application for windows from codewarrior 8 mac. All
>>> compiles fine but at the end I get 6 link errors wich I don�t understand
>>> since the libraries needed are there in my project. The project has c and
>>> c++ files and I am compiling as C++. The parts that need to be compiled as C
>>> are bracketed with extern "C" and have .c extensions. Here are the errors:
>> 
>> Be sure you are using the right prefix file.
>> 
>> Also I would think that perhaps you may be mixing the headers and
>> precompiled headers up or something.
>> 
>> Finally do you have any other libraries included perhaps they need to be
>> rebuilt.  If they were built and linked with a pow() or fabs() that are
>> listed as extern  and now they are inlined that can cause a problem.
>> 
>> If you can narrow this down to a smaller project it might help, but I'm
>> thinking this is very likely from an older library that is being linked
>> in.
>> 
>> Ron
>
>What prefix file should I be using? Im using a custom one by the makers of a
>specialized plugin SDK.
>
>I've only included the regular Win libraries. Kernel32, user32... I have
>also included the 3 icm libraries, but I get the link errors without them.
>
>I really don�t see how I can narrow this down. I really wish I could. If I
>create a small app that does a floor, abs and a few other math routines that
>are currently not linking correctly, they link without any problem with the
>same libraries.
>
>Alex
>

-- 
  Get printed CodeWarrior Documentation (limited selection) 
     And all the latest versions of CodeWarrior Manuals

http://www.metrowerks.com/MW/Support/dev_resources/default.htm

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

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads