473,378 Members | 1,451 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

ACE - linkage problems

5
I'm working on MS-VS 8.

I compiled the .lib and .dll successfuly in dbg mode.

when I try to compile my program, some symbols the linker finds while others it doesn't. For example, those associated with communcation are linked, but assert is not found nor does it find SharedObject::init/info.

A simple code that does not compile in VS8 DOES compile in VS6!

Since, it would take ages to port my application to VS6, I want to successfuly compile it under VS8.
I'm really stuck. Does anyone have any solution? are there known problems with compiling ACE in VS8?

Thanks in advance,
Yaron
Jul 31 '07 #1
9 5383
weaknessforcats
9,208 Expert Mod 8TB
A simple code that does not compile in VS8 DOES compile in VS6!
I'm not surporised. VS6 never did work. There are at least six service packs plus many other bugs were just fixed in VC7 and VC8.

What code does not compile in VS8??
Jul 31 '07 #2
yarono
5
I'll upload the code later on.

For now I'll detail the linker erroos:
In the Reactor example the linker issues an error for the functions:
ace_assert and ACE_INET_Addr::addr_to_string.
And in the Sockets example the linker issues an error for the functions:
ACE_Shared_Object::init and ACE_Shared_Object::info.
Jul 31 '07 #3
weaknessforcats
9,208 Expert Mod 8TB
Linker issues mean the code compiled and you are missing libraries for the linker.

Have you added the ACE libraries to the linker property for additional dependencies in your project??

You will also need to add the path to those libraries under Tools/Options/Project and Solutions/VC++ Directories.
Jul 31 '07 #4
yarono
5
Linker issues mean the code compiled and you are missing libraries for the linker.

Have you added the ACE libraries to the linker property for additional dependencies in your project??

You will also need to add the path to those libraries under Tools/Options/Project and Solutions/VC++ Directories.
Yes I have added the *.lib and the pathes are fine. It seems like that some of the symboles it finds in the ACEd.lib, but some it doesn't.
The error I get is:
error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual int __thiscall ACE_INET_Addr::addr_to_string(unsigned short * const,unsigned int,int)const " (__imp.....
Jul 31 '07 #5
yarono
5
more errors I get (from another piece of code):

error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __cdecl ACE_Log_Msg::log(enum ACE_Log_Priority,unsigned short const *,...)"

error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl __ace_assert(char const *,int,unsigned short const *)"
Aug 1 '07 #6
weaknessforcats
9,208 Expert Mod 8TB
dllimport means you are using a dll. I(t looks like you are doing a static linke using a dll.

Do you in fact have that dll?
Aug 1 '07 #7
yarono
5
dllimport means you are using a dll. I(t looks like you are doing a static linke using a dll.

Do you in fact have that dll?
Yes we do have ACEd.dll, but the linker doesn't suppose to know about it...
Aug 1 '07 #8
weaknessforcats
9,208 Expert Mod 8TB
OK. But if you are using load-time linking, then the linker uses the .lib that corresponds to the dll. This .lib has enough info so you can call your functions in the dll. At load time, the loader looks for the dll, loads it, and resolves rthe addresses of the function calls.

That means all of the dll functions must be extern "C" in the function prototypes. I assume this is true?

If the dll was compiled by a C++ compiler, then the function names are mangled unless the dll builder also marked the files extern "C". Do you kow if this is correct.

And the dll must have been compiled using the same operating system as yours. This is true, Yes?
Aug 1 '07 #9
muze
1
I had exactly this problem and was able to resolve it in the project settings:
switch General->Character Set from "Unicode" to "Not Set".
May 24 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Web Developer | last post by:
Hi, I read that identifiers should not start with an underscore in order to prevent LINKAGE problems. I am not familar with this concept of "linkage", so can someone provide a simple...
9
by: qazmlp | last post by:
const has internal linkage in C++, but external linkage in C. Am I right ? But, linker reports multiply-defined error if the following header is included in multiple .cpp files. //...
47
by: Richard Hayden | last post by:
Hi, I have the following code: /******************************** file1.c #include <iostream> extern void dummy(); inline int testfunc() {
20
by: Grumble | last post by:
Hello everyone, As far as I understand, the 'inline' keyword is a hint for the compiler to consider the function in question as a candidate for inlining, yes? What happens when a function with...
7
by: Generic Usenet Account | last post by:
I am implementing a library that can be linked in with C as well as C++ code. Obviously, the library API is functional, but in my implementation I am using STL. Because of this, my code is...
10
by: Mark A. Gibbs | last post by:
I have a question about mixing C and C++. In a C++ translation unit, I want to define a function with internal linkage and C calling convention. Here's a sample of what I want to do: //...
3
by: al.cpwn | last post by:
do static and inline functions or members have internal linkage? I have been reading this newsgroup on google and found conflicting ideas. Can someone please help me understand why in some places...
13
by: fctk | last post by:
source: http://rm-f.net/~orange/devel/specifications/c89-draft.html#3.1.2.2 there are two passages in this paragraph i can't fully understand: 1) "If the declaration of an identifier for an...
3
by: catphive.lists | last post by:
I have a bunch of function object classes of the form struct MyFunc : unary_function<arg,ret> { MyFunc(arg) : state(arg) {} void operator() (arg) { /*code here*/ } }; in various cpp files....
4
by: Bart Simpson | last post by:
I m getting a ton of linkage errors (unresolved externals) when using an abstract base class. My classes look something like this: class BaseObject { //pure virtuals virtual void foo() = 0;...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.