🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #42526

Re: Mixed G++ - GCC programs and Shared library

#42526
From: Chua Chye Heng
Date: Fri, 01 Dec 1995 00:00
35 lines
1646 bytes
In article <gnusenet48adnp$r7c@sifon.cc.mcgill.ca>,
   ronis@complex.is (David M. Ronis) wrote:

I think I'm having similar problems.

I have a archive file logeq.a which is a C program
I defined a class DBManager that uses some functions in this logeq.a

When I try to link all the object codes and the above archive to produce the 
exe file on my Solaris 2.3 using gcc/g++ 2.6.3, I keep getting

Undefined                       first referenced
 symbol                             in file
LQf_parse__FP4FILEPFv_i             DBManager.o
LQdrive__FPFv_iT0                   DBManager.o
LQs_parse__FPcPFv_i                 DBManager.o
ld: fatal: Symbol referencing errors. No output written to testPdl.exe

The LQxxxxxxx functions are all defined in the logeq.a

I compile the program using
$ g++ -o testPdl.exe testPDL.o DBManager.o logeq.a -lm

Any help is deeply appreciated!!
(It will be a horror if g++ cannot mix link C and C++ programs as I'm in the 
midst of a project to be completed next month)

Note: or is there a special way of calling C function from a C++ progam??

Thanks.


===========================================================
Chye Heng
Email: Chuach@dlep1.itg.ti.com
Technical Details
Message-ID: <49k20b$t6g@tilde.csc.ti.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <gnusenet48adnp$r7c@sifon.cc.mcgill.ca>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,9b890333fb655209
X-Google-Attributes: gid11318c,public
From: Chuach@dlep1.itg.ti.com (Chua Chye Heng)
Subject: Re: Mixed G++ - GCC programs and Shared library
Date: 1995/12/01
Message-ID: <49k20b$t6g@tilde.csc.ti.com>
X-Deja-AN: 120512452
references: <gnusenet48adnp$r7c@sifon.cc.mcgill.ca>
organization: TI Singapore
newsgroups: gnu.gcc.help