Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] error LNK2019: unresolved external symbol

Status
Not open for further replies.

syedshan

Advanced Member level 1
Joined
Feb 27, 2012
Messages
463
Helped
27
Reputation
54
Reaction score
26
Trophy points
1,308
Location
Jeonju, South Korea
Activity points
5,134
Dear all,

I am having confusing error with a c++ program.

Error 4 error LNK2019: unresolved external symbol __4FM_OpenDeviceEx referenced in function _main C:\Users\Syedshan\Desktop\VS shan\test_cplucplus\test_cplucplus\test1.obj

The following line is function call without any error...

Code:
api_status = _4FM_OpenDeviceEx(&dev_ctx, devType, &devicenumber, OPEN_MODE_FIRST_DEVICE_FOUND);

I cannot understand since I have included all the libraries and even if I right click the function _4FM_OpenDeviceEx() so it takes me to the relevant library file as well(indicating that library has been properly included).

Where can I get the problem. I cannot understand at all...

Please share your experience as I cannot get the slightest of idea what to do next.
What is the .obj file....



Bests,
Shan
 

Did test1.obj compile ok, but have the issue during linking?

C++ cares a lot more about types. You may have a subtly different function definition to what you are calling in your code, by mistake (e.g. a signed int instead of unsigned for example). That is the most common cause. The next most common cause is that you're simply not linking correctly (e.g. the path to the library file is missing if it is a non-core library, or you don't have the object files linked in the correct sequence, i.e. try moving the order of the files around in your link command).

There is a program called 'nm' that you can use to check what is inside the .obj files. You'll need to google to find out more info on it, but basically 'nm -a xxxx.obj' should help you, assuming that your OS has the 'nm' program available (usually available in Linux and Cygwin).
 

Dear brother,

Well brother I find the solution and it was to add the relatively .lib file to the linker the solution to this is : go to Project -> properties -> Linker -> there at input I add xxx.lib

Thank you for your response

Bests,
Shan
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top