| | |
Failing to link my own function
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: May 2006
Posts: 7
Reputation:
Solved Threads: 0
Hi!
As a beginner in Borland C++ Builder I'm facing a Linker Error message which I have no idea of how to deal with. Concretely, my console project called as "my_proj" is calling the function my_func() whose code definition is included in the source file source.cpp (this source file is included in the directory C:\PROGRAMS\my_proj\ together with all the files related to my_proj project). Well, when compiling the project, the following error message appears: As for the relevant content of my source file, it looks something like that A certain IDE setting might be relevant. Concretely, at "Tools > Options > C++ Options", the C:\PROGRAMS directory is set to be both the BPI/LIB output directory and the Package output directory as well. I've chosen that setting since seemed to me in accordance with my intention that C:\PROGRAMS host all my C++ projects.
Could anybody please tell me something useful about how to overcome the mentioned linker error?
Notice this is my first program that involves user-built functions.
Thanks for any idea!
As a beginner in Borland C++ Builder I'm facing a Linker Error message which I have no idea of how to deal with. Concretely, my console project called as "my_proj" is calling the function my_func() whose code definition is included in the source file source.cpp (this source file is included in the directory C:\PROGRAMS\my_proj\ together with all the files related to my_proj project). Well, when compiling the project, the following error message appears:
C++ Syntax (Toggle Plain Text)
[Linker Error]Error:Unresolved external 'my_func()' referenced from C:\PROGRAMS\MY_PROJ\DEBUG_BUILD\SOURCE.OBJ
C++ Syntax (Toggle Plain Text)
void my_func(); int main() { my_func(); return 0; } void my_func() { ... }
Could anybody please tell me something useful about how to overcome the mentioned linker error?
Notice this is my first program that involves user-built functions.
Thanks for any idea!
•
•
•
•
Originally Posted by grautu
Could anybody please tell me something useful about how to overcome the mentioned linker error?
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
![]() |
Similar Threads
- Stack implementation using function pointers in C (C)
- Newbie Question - How to generate a link (PHP)
- Clicked Link Countdown (HTML and CSS)
- urgent please help me (Web Browsers)
- strange error when reinstalling XP home pro (Windows NT / 2000 / XP)
- Problems writing script which checks the users group and date (VB.NET)
- unresolved external error upgrading 6.0-7.1 (C++)
Other Threads in the C++ Forum
- Previous Thread: Help!!!
- Next Thread: https in C
| Thread Tools | Search this Thread |
Tag cloud for C++
api application array arrays based beginner binary c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete deploy developer display dll dynamiccharacterarray email encryption error file format forms fstream function functions game generator givemetehcodez graph homeworkhelp iamthwee ifstream image input int java lib list loop looping loops map math matrix memory multiple newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg simple sorting spoonfeeding string strings struct template templates text tree url variable vector video visual visualstudio void win32 windows winsock wordfrequency wxwidgets






