help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

linking g++ 2.96 object/library in g++ 3.2.2


From: WannaLeanOO
Subject: linking g++ 2.96 object/library in g++ 3.2.2
Date: Tue, 20 Jul 2004 10:48:36 -0400
User-agent: Mozilla Thunderbird 0.7.2 (Windows/20040707)

Hello All,

I have a library build in g++ 2.96, which can be linked with my application using g++ 2.96 compiler. However when I link g++ 2.96 object in 3.2.2 (redhat 9) it is not able to resolve many functions.

To explore futher I wrote a small code as below
============================================
#include <string>
#include <iostream>

class ErrorTest
{
        public:
                ErrorTest( int code, std::string errstr ) { }

                void print() { std::cout << "Help Help" << std::endl; }
};

ErrorTest et(1, "str");

int main()
{
        et.print();
}
==============================================


Compiled the code on g++ *2.96* redhat 7.2 (g++ filename.cc)
and nm -C a.out | grep Err gave the below output

08049b40 W ErrorTest::ErrorTest(int, basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> >)
08049b78 W ErrorTest::print(void)
---------------------------------------------

Compiled the same code on g++ *3.2.2* redhat 9 (g++ filename.cc)
and  nm -C a.out | grep Err gave the below output

080488e6 W ErrorTest::print()
080488e0 W ErrorTest::ErrorTest[in-charge](int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)

--------------------------------------------

I think this in-charge is causing the problem... Can somebody please throw some light about this in-charge. I saw the same linker error in my real project.

Am I doing something wrong?

Is this a known issue?

Is there any flag that would help me going?

Your help is appreciated.

Thanks,

James


reply via email to

[Prev in Thread] Current Thread [Next in Thread]