473,498 Members | 2,023 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Static library linker problem

Hi,

I'm having a similar problem as Scott. A static library
with managed C++ functions fails to link in.

See http://groups.google.be/groups?q=managed+C%2B%
2B+static+library&start=10&hl=en&lr=&ie=UTF-8&oe=UTF-
8&selm=uXE2ZMiqDHA.2644%40TK2MSFTNGP09.phx.gbl&rnu m=14
(BTW why can I find scott's post with Google and not using
the msdn web-interface? It seems to have vanished)

I've created a static library using VC++ 7.0. I builds
fine, but when I try to use it the linker complains about
unresolved externals. I've traced the linker progress to
make sure that the .lib file was found. Curiuously free
functions are found, while class member functions are not.

Is this a compiler problem? Something with the name
mangling? I've dumped the contents of the produced lib
using dumpbin and it appears that the symbols are in there.

Any help is appreciated,

Joske
Nov 16 '05 #1
2 2106
Joske,

Has anyone responded to you on this? I'm ready to call MS Support to get an
answer.

Scott L.

"Joske" <jo***@work.tv> wrote in message
news:3e****************************@phx.gbl...
Hi,

I'm having a similar problem as Scott. A static library
with managed C++ functions fails to link in.

See http://groups.google.be/groups?q=managed+C%2B%
2B+static+library&start=10&hl=en&lr=&ie=UTF-8&oe=UTF-
8&selm=uXE2ZMiqDHA.2644%40TK2MSFTNGP09.phx.gbl&rnu m=14
(BTW why can I find scott's post with Google and not using
the msdn web-interface? It seems to have vanished)

I've created a static library using VC++ 7.0. I builds
fine, but when I try to use it the linker complains about
unresolved externals. I've traced the linker progress to
make sure that the .lib file was found. Curiuously free
functions are found, while class member functions are not.

Is this a compiler problem? Something with the name
mangling? I've dumped the contents of the produced lib
using dumpbin and it appears that the symbols are in there.

Any help is appreciated,

Joske

Nov 16 '05 #2
Sorry that I don't have a better answer, but static libs of MC++ code are
not supported at all in the 7.0 and 7.1 releases.

Due to the implementation of IJW in those releases the linker cannot handle
resolving references to managed functions from a static lib.

Ronald Laeremans
Visual C++ team

"Scott" <Sc*********@UniversalComputerSys.Com> wrote in message
news:e5**************@tk2msftngp13.phx.gbl...
Joske,

Has anyone responded to you on this? I'm ready to call MS Support to get an answer.

Scott L.

"Joske" <jo***@work.tv> wrote in message
news:3e****************************@phx.gbl...
Hi,

I'm having a similar problem as Scott. A static library
with managed C++ functions fails to link in.

See http://groups.google.be/groups?q=managed+C%2B%
2B+static+library&start=10&hl=en&lr=&ie=UTF-8&oe=UTF-
8&selm=uXE2ZMiqDHA.2644%40TK2MSFTNGP09.phx.gbl&rnu m=14
(BTW why can I find scott's post with Google and not using
the msdn web-interface? It seems to have vanished)

I've created a static library using VC++ 7.0. I builds
fine, but when I try to use it the linker complains about
unresolved externals. I've traced the linker progress to
make sure that the .lib file was found. Curiuously free
functions are found, while class member functions are not.

Is this a compiler problem? Something with the name
mangling? I've dumped the contents of the produced lib
using dumpbin and it appears that the symbols are in there.

Any help is appreciated,

Joske


Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1605
by: Bramz | last post by:
Hi all, I have a rather strange linker (?) problem. At least, I think it's a linker problem, but I'm not so sure. It's a bit lengthy to describe ... I've implemented a generic factory...
1
2233
by: adeht | last post by:
In his book, "Modern C++ Design", Andrei Alexandrescu presents a Generic Object Factory class (Loki::Factory). One of its advantages (also mentioned in the book) is being able to register the...
1
2981
by: Torsten Mueller | last post by:
I have to create a shared library containing C++ classes with static member variables on HPUX with aCC. I can compile and link the library and a test application but when I start the program I get...
3
10878
by: mpatnam | last post by:
I have an executable which links to a static library (.a). I want to provide a hook by overriding a function part of this static library. Eg: I have a function "int blkstart(int i)" in this static...
4
5825
by: Scott | last post by:
We are trying to build a managed C++ static link library containing several classes which are members of a namespace. The build of this library seems to work OK. No errors. We then try to use...
3
1469
by: Eric W | last post by:
MS VC++ 7.1 - I have a project with static libs A, B and C where A depends on B anc C, also B depends on C. If I set this up in the project dependency dialog for A the Build environment puts B...
3
1909
by: Kevin Frey | last post by:
I am working on a test migration of our project to Visual Studio 2005 Beta 2 as a precursor to the availability of the full release of VS2005. The most onerous problem so far concerns the...
5
6758
by: Jesper Schmidt | last post by:
When does CLR performs initialization of static variables in a class library? (1) when the class library is loaded (2) when a static variable is first referenced (3) when... It seems that...
14
2547
by: Jeroen | last post by:
Hi all, I've got a question about writing a library. Let me characterize that library by the following: * there is a class A which is available to the user * there is a class B that is used...
0
7121
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6993
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7162
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7375
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
287
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.