From: atlas AT intcomm DOT net (Atlas) Subject: ot: cross linking problem with g++ and gcc 26 Mar 1997 21:12:09 -0800 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <3338B867.5E6.cygnus.gnu-win32@intcomm.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01Gold (Win95; I) Original-To: gnu-win32 AT cygnus DOT com Original-Sender: owner-gnu-win32 AT cygnus DOT com Got a problem. Under linux, the gnu compiler doesn't allow cross linking of object files correctly between gcc and g++. In my case I have a large amount of C++ files which have to be compiled under g++, on the other hand i have a C file using a C library. I didn't write any of the code myself, I am just attempting to merge the two sets of code. All my attempts to compile the C file under g++ ended in failure. I was eventually able to get it to compile, but the code which originally worked, now no longer worked correctly. The C++ code is many many pages of code, which generates tons of errors under gcc. I dunno what the difference between g++ and gcc, but apparently the output .o files are incompatible somehow. Does anyone know of a way, a compiler/linker option, or something else which would allow me to link the two projects together? The linker error I get is: undefined symbol "run" in file such and such, ect, ect. I have the run function defined in my .cc file, and it is being called from my .c file. The .c file has the correct prototype for the run function but is unable to find it in the .cc file on link. If anyone has any ideas, lets me know.. Thank you. - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".