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

unresolved extern

shoonya
161 100+
hi,

there is a function defined in
abc.c
and prototype is present in abc.h

i want to call this function from another module, so i included the abc.h file along with correct path, but tehn also it's giving the error
unresolved external symbol foo referenced in function another_function
Sep 25 '08 #1
4 2095
donbock
2,426 Expert 2GB
This looks like a linker error, not a compiler error. How you resolve this is specific to your compiler/IDE.

(Assume that the other module you mention is called def.c)

For example, if you were using Gnu C on unix you might issue this command:
> gcc -o myprogram abc.c def.c

or this sequence of commands:
> gcc -c abc.c
> gcc -c def.c
> gcc -o myprogram abc.o def.o

The error you reported suggests that the linker was not told to include abc.o.
Sep 25 '08 #2
shoonya
161 100+
thanks donbock

I am using Microsoft visual studio

shoonya
Sep 26 '08 #3
weaknessforcats
9,208 Expert Mod 8TB
Shoonya: Is this a compiler generated error or a linker generated error?

If the error starts with C it is a compiler error. If it starts with L it is a linker error.

It's important to know what kind of error it is. Maybe you could post a piece of what you are doing along wuth the error you are getting.
Sep 26 '08 #4
shoonya
161 100+
thanks weaknessforcats

the problem is solved now,
1>
i was not mentioning the function in the .def file [where functions that needs to be exported are kept]

2>
I was not including the location of library [.lib file] of the other module

and it was linking error

Shoonya
Sep 29 '08 #5

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

Similar topics

5
by: Oliver | last post by:
Hi, I have a problem with a shared library of mine. I compile the *.o files and then generate the .so lib with: cc -shared libjava_vrpn.so *.o When I then run my program I get an error for an...
0
by: Jennifer | last post by:
Could you please report the following problem to your VC customer support? THANKS! Jennifer The problem is specific to the VC.Net and VC.Net 2003 <xlocinfo> headers. The problem is that if...
8
by: Scott Allen | last post by:
Hello, I'm new to C++ development and I'm trying out figure out the cause of an 'unresolved external symbol' error that I'm receiving when compiling. Here is some history on what I'm doing: I...
4
by: Alfonso Morra | last post by:
Ok, this is a bit of a quick hack. I have a flag set in another file (the default value of the flag is 0. In certain files, access to the flag symbol is not available - I want to know if unresolved...
0
by: Davinia | last post by:
Hi, I've a problem, could you help me, please? error LNK2001: unresolved external symbol _myvar Thanks in advance. Davinia. //mimain.cpp #include <stdlib.h>
0
by: Kevin Stedman | last post by:
I am porting some software from Solaris to Windows. I am using the Windows Visual Studio .NET 2003 Visual C++ compiler. For the fortran files I am using Compaq Visual Fortran 6. I have my...
4
by: naveenadevi | last post by:
Hi, I'm trying to use some power management features with windowsx xp and I have visual studio .net 2003 installed. As per documentation of ACPI, you can use the power options by including...
3
by: Mark | last post by:
I'm trying to write an RAS class on windows ad RasDial's callback function requires it to either not be a class member or for it to be static. I went for the static option so in the header file I...
6
by: robintw | last post by:
Hi all, I'm trying to use some functions which are in an external library file called qhdlc.lib from within my C++ .Net program. I have a header file for this library (qhdlc.h) and have set the...
0
by: =?Utf-8?B?TWF0ZXVzeiBSYWpjYQ==?= | last post by:
Hi! How can I fix this error? Error 1 error LNK2001: unresolved external symbol "extern "C" long __stdcall SHFlushClipboard(void)" (?SHFlushClipboard@@$$J10YGJXZ) UnmanagedTest.obj Basically...
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: 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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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...

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.