Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

stdm++.cxx Error

Hi~

I have error when I compile my image using uClinux with MMU

Once my program have printf function, I will got follow error

stdm++.cxx:1:18: error: stdm++: No such file or directory

stdm++.cxx:4: error: 'MATT' has not been declared

stdm++.cxx:4: error: expected constructor, destructor, or type conversion before '(' token

stdm++.cxx:21: error: 'MATT' has not been declared

stdm++.cxx:21: error: expected constructor, destructor, or type conversion before '::' token

stdm++.cxx:34: error: 'MATT' has not been declared

stdm++.cxx:34: error: 'int operator<<(char*)' must have an argument of class or enumerated type

stdm++.cxx:34: error: 'int operator<<(char*)' must take exactly two arguments

stdm++.cxx: In function 'int operator<<(char*)':

stdm++.cxx:36: error: invalid use of 'this' in non-member function

stdm++.cxx:36: error: 'fprintf' was not declared in this scope

stdm++.cxx: At global scope:

stdm++.cxx:41: error: 'MATT' has not been declared

stdm++.cxx:41: error: expected constructor, destructor, or type conversion before 'MATT'

I saw a solution from (http://www.mail-archive.com/uclinux-dev@uclinux.org/msg00170.html)

//-------------------------------From Website----------------------------------------------//

There are some pieces missing from the test c++ apps. Find attached a patch. Dave/Gerg would you mind applying this to the tree.

The problem with iperf is that you are not linking against pthread.

I haven't tried building iperf, but I do notice that your link line does not include pthreads and you will need to add this. Adding $ (SLIBPTHREAD) to your link line should fix the problem.

(What is link line? My Makefile??)

You will need to build STLport statically at the moment using the gcc 3.4.4 toolchain. To do this customize your vendor/user settings, go in to 'Library Configuration' and ensure that 'Build STL port as shared' is set to 'n'.

The problem occurs because stl port is attempting to link against the shared version of libgcc (libgcc_s.so). Building STLport statically means that it will attempt to link against the static version - libgcc.a

//-------------------------------From Website----------------------------------------------//

However I still don't understand how to do it.

Does anyone give me more detial instruction?

Another problem is actual I unselect the c++ test program the error still show?

Does anyone know why causing this?

Thanks

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I got to this post searching for the error message bellow that I got when I was trying to build my uclinux for the first time after updating it(to 3.7)

    "stdm++.cxx:1:18: error: stdm++: No such file or directory"

    In my case, I was just missing the uuid-dev lib for Ubuntu

    apt-get install uuid-dev

    cheers