473,394 Members | 1,810 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,394 software developers and data experts.

error LNK2019: unresolved external symbol - cl compiler

Hello,

I am trying to write a code to interface with ILOG OPL development
studio using their C++ libraries and header files. But I am encountering
linker issues, an example being -

error LNK2019: unresolved external symbol "public: void __thiscall
IloOplModelI::printSolution(class std::basic_ostream<char,struct
std::char_traits<char &,long)"
(?printSolution@IloOplModelI@@QAEXAAV?$basic_ostre am@DU?$char_traits@D@std@@@std@@J@Z)
referenced in function "public: void __thiscall
IloOplModel::printSolution(class std::basic_ostream<char,struct
std::char_traits<char &)"
(?printSolution@IloOplModel@@QAEXAAV?$basic_ostrea m@DU?$char_traits@D@std@@@std@@@Z)

Any idea why this is happening? Is this because OPL libraries are not
linked properly? If it is, how do I link the OPL library files using cl
in the command line? I am pretty new to using the cl compiler. Thanks in
advance.

Raj.
Oct 27 '06 #1
3 9346
NewsGroup wrote:
I am trying to write a code to interface with ILOG OPL development
studio using their C++ libraries and header files. But I am encountering
linker issues, an example being -

error LNK2019: unresolved external symbol "public: void __thiscall
IloOplModelI::printSolution(class std::basic_ostream<char,struct
std::char_traits<char &,long)"
(?printSolution@IloOplModelI@@QAEXAAV?$basic_ostre am@DU?$char_traits@D@std@@@std@@J@Z)
referenced in function "public: void __thiscall
IloOplModel::printSolution(class std::basic_ostream<char,struct
std::char_traits<char &)"
(?printSolution@IloOplModel@@QAEXAAV?$basic_ostrea m@DU?$char_traits@D@std@@@std@@@Z)

Any idea why this is happening? Is this because OPL libraries are not
linked properly? If it is, how do I link the OPL library files using cl
in the command line? I am pretty new to using the cl compiler. Thanks in
advance.
This is not really a C++ *language* issue
(http://www.parashift.com/c++-faq-lit....html#faq-5.9), but a
tools and environment and/or third-party library issue. [OT]However, it
appears that IloOplModel::printSolution() does not appear in the files
supplied to the linker. I gather that this is a library class' member
function, not your own class' member function. Did you build the
library correctly? Has that function been deprecated or intentionally
omitted from the library? Have you supplied all necessary files to the
linker?[/OT]

For further help, you may want to ask in a forum dedicated to your
development tools or to the library.

Cheers! --M

Oct 27 '06 #2

mlimber wrote:
NewsGroup wrote:
I am trying to write a code to interface with ILOG OPL development
studio using their C++ libraries and header files. But I am encountering
linker issues, an example being -

error LNK2019: unresolved external symbol "public: void __thiscall
IloOplModelI::printSolution(class std::basic_ostream<char,struct
std::char_traits<char &,long)"
(?printSolution@IloOplModelI@@QAEXAAV?$basic_ostre am@DU?$char_traits@D@std@@@std@@J@Z)
referenced in function "public: void __thiscall
IloOplModel::printSolution(class std::basic_ostream<char,struct
std::char_traits<char &)"
(?printSolution@IloOplModel@@QAEXAAV?$basic_ostrea m@DU?$char_traits@D@std@@@std@@@Z)

Any idea why this is happening? Is this because OPL libraries are not
linked properly? If it is, how do I link the OPL library files using cl
in the command line? I am pretty new to using the cl compiler. Thanks in
advance.

This is not really a C++ *language* issue
(http://www.parashift.com/c++-faq-lit....html#faq-5.9), but a
tools and environment and/or third-party library issue. [OT]However, it
appears that IloOplModel::printSolution() does not appear in the files
supplied to the linker. I gather that this is a library class' member
function, not your own class' member function. Did you build the
library correctly? Has that function been deprecated or intentionally
omitted from the library? Have you supplied all necessary files to the
linker?[/OT]

For further help, you may want to ask in a forum dedicated to your
development tools or to the library.

Cheers! --M
I believe this is linking error is caused because the linker can't find
the symbol, the following example will also cause this linking error:

extern char B[100]; // B is not in avilable to the linker
int main() {
B[0] = ' ';
}

For more details go to the following web site:

http://msdn2.microsoft.com/en-us/library/799kze2z.aspx

Oct 27 '06 #3
error LNK2019: unresolved external symbol "public: void __thiscall
IloOplModelI::printSolution(class std::basic_ostream<char,struct
std::char_traits<char &,long)"
(?printSolution@IloOplModelI@@QAEXAAV?$basic_ostre am@DU?$char_traits@D@std@@@std@@J@Z)
referenced in function "public: void __thiscall
IloOplModel::printSolution(class std::basic_ostream<char,struct
std::char_traits<char &)"
(?printSolution@IloOplModel@@QAEXAAV?$basic_ostrea m@DU?$char_traits@D@std@@@std@@@Z)

Any idea why this is happening?
Like others have said, it's a linking error because it can't find the
appropriate printSolution function. It looks like you're using
something like printSolution(string&, long) - I've seen this kind of
link error when my library was compiled with Unicode and my other code
was compiled without Unicode (or vice versa). Assuming you have a
printSolution somewhere (i.e., didn't just forget to write that
function), I'd check Unicode settings.

Michael

Oct 27 '06 #4

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

Similar topics

1
by: Vishal Saxena | last post by:
Hi, I am new to this news group, hope to get prompt solution from you, gurus of VC. Well i had a project developed in VC++ 6.0, it uses Adobe Plugin Development SDK, I am trying to upgrade my...
4
by: Jun | last post by:
anyone know how this error shows? how can i solve this? LINK : error LNK2020: unresolved token (0A0000EA) _AtlBaseModule LINK : error LNK2020: unresolved token (0A0000EC) atlTraceGeneral LINK :...
0
by: Usman | last post by:
Hi I've a COM compiled in visual studio 6 that is internally using zlib library (an opensource library for compression). I've no problem compiling that code. But when I moved to visual...
4
by: Sanjay Kumar | last post by:
Folks ! I am working with VC++ after a long time and having problem linking latest xerces 2.7 in VC++ 2005 Express Edition. I have done following: 1. downloaded and unpacked the the...
1
by: developer | last post by:
Hi All I have made a .NET project. the files included are borland c++ files that i am migrate to VC++ .NET I am using Microsoft Visual C++ .NET 2003. the compilation goes through properly,...
5
by: eberesche | last post by:
Hello, as a novice in ASN.1 I have me to a project in C ++ under use of ASN.1 - structures risquély. One of my colleagues means, this would deal something with masochism ;-). Result should be a DLL...
2
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent: Monday, December 4, 2006 10:03:28 PM Subject: Re: ...
4
by: jk2l | last post by:
Error 10 error LNK2019: unresolved external symbol __imp__glBindTexture@8 referenced in function "public: void __thiscall GLTexture::Use(void)" (?Use@GLTexture@@QAEXXZ) GLTexture.obj Error 11 error...
0
by: Ling | last post by:
I am using boost.python to wrap C++ function which includes directmusic libraries to simply play the midi, but lots of linkage errors "error LNK2001: unresolved external symbol". I wonder if it is...
2
by: hjazz | last post by:
Hi all, I'm new to VS, and I'm using Visual Studio .NET 2003. I'm trying to write a program which uses pcap libraries. However, I keep getting the following errors: error LNK2019: unresolved...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.