473,782 Members | 2,623 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PLEASE HELP !! Link errors

Could some C++ guru please help me ? I am using gcc 3.2.3 and I am
trying to invoke some functions defined in a C file from inside a C++
class, and I keep getting linker error messages 'undefined reference
such - such function'. Both the C file and the C++ class are in the
same directory. Could someone please point out what might be going
wrong? Any help would be greatly appreciated.

Jul 23 '05 #1
2 1173
Try this tutorial. This is probably what u are looking for.
http://docs.hp.com/en/92501-90029/ch05s03.html
<cp**********@y ahoo.com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
Could some C++ guru please help me ? I am using gcc 3.2.3 and I am
trying to invoke some functions defined in a C file from inside a C++
class, and I keep getting linker error messages 'undefined reference
such - such function'. Both the C file and the C++ class are in the
same directory. Could someone please point out what might be going
wrong? Any help would be greatly appreciated.

Jul 23 '05 #2


cp**********@ya hoo.com wrote:
Could some C++ guru please help me ? I am using gcc 3.2.3 and I am
trying to invoke some functions defined in a C file from inside a C++
class, and I keep getting linker error messages 'undefined reference
such - such function'. Both the C file and the C++ class are in the
same directory. Could someone please point out what might be going
wrong? Any help would be greatly appreciated.


Please review the following, then try again:

http://www.parashift.com/c++-faq-lit...t.html#faq-5.8

Brian

Jul 23 '05 #3

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

Similar topics

0
1916
by: MSM | last post by:
Hello, This may be posted twice if so i apologize. I am creating a form using php where the information entered into the form will go into a database. When creating the tables in SQL where do I place the code for creating the tables? How do I link the form's information to the tables. Any help with this would be greatly appreciated. Below is the code for the form I hope this can assist you in helping me. Thank you so much. //here it...
3
2911
by: Baby Blue | last post by:
I have 2 codes below to grap data from another site. I use them to get the data from one News site. However, when I click on some link inside (such as : http://www.thuthao.info/news/chitiet.php?url=http://vnexpress.net/Vietnam/Kinh-doanh/2005/01/3B9DB0AC/ ), there are some errors, I try fix some, but hopeless. CAN ANY BODY HELP ME ??? MUCH APPRECIATED demo : news.thuthao.info real site : www.vnexpress.net Code of Index.php
26
2942
by: Michael Strorm | last post by:
Hi! I posted a message a while back asking for project suggestions, and decided to go with the idea of creating an adventure game (although it was never intended to be a 'proper' game, rather an excuse to write- and learn- some C++). To cut a long story short, I wrote a fair chunk of it, but realised that it's... not very good. Okay, it's my first "proper" C++ program, so that's no big deal, but I don't want to waste more time working...
2
1537
by: ASallade | last post by:
Hello, I've scoured my books and the web, but am still daunted, hopefully some of the users in this newsgroup will have advice for my problem. I am not an experienced javascript programmer, but have gotten my code to work well, without errors on IE, Opera and netscapes recent builds. While testing, I found that it doesnt execute on Netscape 4.7 In the head I have a script that creates a custom object/class for products,
7
1745
by: Scotter | last post by:
Hi - Simple ASPX application not running. I've given the ASP.NET, IWAM, and USR accounts full permissions to the folder my application resides in. I don't know what else needs done on the server so that .Net applications run on it. I do see under "Control Panel --> Administrative Tools" two .Net related items: * Microsoft .Net Framework 1.1 Configuration * Microsoft .Net Framework 1.1 Wizards Do I need to use these to set something up?...
1
767
by: RTJ | last post by:
I have experienced problems with Oracle OCI library. I was unable to properly link OCI library using gcc. Probably gcc compiler provided with SFU is unable to link native Windows library. Oracle provides OCI dll (named oci.dll) and additionally OCI stub library (oci.lib) for Microsoft MSVC compiler. I have attempted to link dora with both OCI dll and OCI lib. Link with OCI lib resulted with many strange linker errors
7
1746
by: Kristof Thys via .NET 247 | last post by:
Post a new message to microsoft.public.dotnet.languages.vc http://www.dotnet247.com/247reference/default.aspx Hello, I've been struggling for weeks with this problem, I hope I find some help here...
1
1991
by: JumpingOffPlace | last post by:
Hi, I'm hoping that the wealth of knowledge here can stop me from spinning my wheels on this syntax error for hours. :) Below is the code, and the error I am recieving.... Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <%@ taglib uri="/WEB-INF/tag-lib/struts-html-el.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/tag-lib/struts-bean.tld" prefix="bean" %>
5
4690
by: Bruce | last post by:
I am getting a lot of link errors when compiling in the debug build but not release. I am compiling a CLR managed code class library. I believe the link errors are actually being caused by a static library of unmanagaed code. I think the problem comes from the fact that the unmanaged static lib uses the STL. Any idea how to fix this?
9
7602
by: ussha | last post by:
I would like some advice on how to link scanned documents to specific records in microsoft access
0
9639
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10308
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10076
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9939
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8964
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7486
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6729
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5375
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2870
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.