gnu.g++.help
  Home FAQ Contact Sign in
gnu.g++.help only
 
Advanced search
September 2008
motuwethfrsasuw
1234567 36
891011121314 37
15161718192021 38
22232425262728 39
2930      40
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
gnu.g++.help Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  gnu linker ( gcc ld ) set global uninitialized variable to a defined address         


Author: receiter
Date: Sep 21, 2008 07:49

Hello,

I want to set the address of a global uninitialized variable which is in the
.bss ( COMMON ) section
for a PC-program at win32.
Can this be done by a linker script file ( gcc linker ld ) ?
I haven't been successful yet.
I don't want to modify the source code by adding an "attribute".

example c-file:
#include
int xx1;
int xx2 = 10;
const int xx3 = 20;
int main ( void )
{
printf("address(xx1): 0x%%08X\n", &xx1 );
printf("address(xx2): 0x%%08X\n", &xx2 );
printf("address(xx3): 0x%%08X\n", &xx3 );
return 0;
}
Show full article (1.41Kb)
no comments
  deadlock in NPTL, FUTEX         


Author: Bernhard Ibertsberger
Date: Sep 19, 2008 06:07

Hi,

since Kernel 2.5 signals seems to contain some trickier pitfalls.
"Native POSIX Threads Library" vs linuxthreads-0.10

see:
people.redhat.com/drepper/futex.pdf

Ok, call a non-reentrant function out of a signal handler is a bad idea
(that was the actual problem in the code of a customer). But now i'd
like to understand the problem more profoundly.

Investigating that issue i found:

http://lwn.net/Articles/124747/

and
http://ubuntuforums.org/showthread.php?t=675821

this demo[1] deadlocks immediately and gives (sometimes) stacktraces like:
Show full article (3.75Kb)
2 Comments
  /usr/bin/ld cannot find libACE         


Author: johnrevans
Date: Sep 17, 2008 19:08

I can't get the compiler to find this library. I set my
LD_LIBRARY_PATH to the location. I tried:

g++ -g -L/usr/local/lib -llibACE test.cpp

g++ -g -L/usr/local/lib -libACE test.cpp

Not sure what else to try.

Thanks
2 Comments
  irgen memory fault         


Author: Dharamveer Dhiman
Date: Sep 10, 2008 08:21

i m moving tools from solaris to linux.
i have some shared objects . while compiling i m using g++ -shared .
but when i m running final script it is giving error:

Generating parser actions ...
irgen: line 27: 30742: Memory fault

can u pls help me:

Dharamveer Dhiman
Assistant System Engineer-Trainee
Tata Consultancy Services
Ph:- +912066086401
Cell:- 09273106662
Mailto: dharamveer.dhiman@tcs.com
Website: http://www.tcs.com
1 Comment
  collect2 ld returned 1 exit status         


Author: dosto.walla
Date: Aug 25, 2008 23:16

Hello forum,

I believe that topic is already discussed here and i have gone through them but i could not debug the error that i am having now. I am attaching the log and hope that someone can help me out with that issue.

************************************************ Error Log*********************************************************

sajjad@sajjad:~/C++/volumizer/SiRun$ make
cd 'runViewing' && make release
make[1]: Entering directory `/home/sajjad/C++/volumizer/SiRun/runViewing'
cd runCamera && make release
make[2]: Entering directory...
Show full article (3.38Kb)
1 Comment
  Linker won't find dll         


Author: jjones7947
Date: Aug 22, 2008 12:09

Linking using:
g++ -shared -o ${dllbuild}/jsummaraizer.dll ${cbuild}/jsummarizer.o $
{cbuild}/jsummarizer.def -L${librarydir} -lsummarizer37.dll
with C++ code in ant but get the error that the dll listed last cannot
be found.
Have previously used gcc (C code) with following:
gcc -shared -o ${dllbuild}/JNewton.dll ${cobjfiles} ${cbuild}/
jnewton.def ${dllbuild}/Newton.dll
this worked fine. Note no -l on second one. Both of these dlls are not
built on gcc.
Any ideals?
Jim
7 Comments
  a weird compiling error in gcc4.2.2         


Author: kuangye
Date: Aug 21, 2008 19:14

#include
using namespace std;
class TSB
{
//-----key point 1
friend TSB fnbase();
//-----key point 2
protected:
TSB()
{
cout<<"TSB()"< }
//-----key point 3
TSB(const TSB&other)
{
cout<<"TSB(const TSB&other)"< }
public:
~TSB()
{ ...
Show full article (1.08Kb)
1 Comment
  error: address of overloaded function with no contextual type information         


Author: acemtp
Date: Aug 21, 2008 06:23

Hello,

I have an error when compiling this little program:

--------------
class CReflectable
{
};

typedef int(CReflectable::* TGetSInt32) () const;

class A : public CReflectable
{
int getW() const { return 1; }
int getW(bool bTestActive) const { return 0; }
};

main()
{
TGetSInt32 p;
p = (TGetSInt32) &A::getW;
}
--------------

The error is:
Show full article (0.58Kb)
1 Comment
  function pointer         


Author: Ali
Date: Aug 21, 2008 04:32

This code below works with M$ VS2005 but fails with g++ 4.1.3.
However, the unary operation works with g++ as well.

The interval class is at http://xsc.de but everything is declared as
it should be.

The error message of g++ is:

main.cpp:9: error: no matches converting function ‘operator+’ to type
‘class cxsc::interval (*)(const class cxsc::interval&, const class
cxsc::interval&)’
[...]
candidates are: cxsc::interval cxsc::operator+(const cxsc::interval&,
const cxsc::interval&)

-------------------------------------------------------------------------------------
#include "interval.hpp"
using namespace cxsc;

int main() {

typedef interval (*bin_op) (const interval&, const interval&);

bin_op Add;
Add = operator+;

typedef interval (*un_op) (const interval& );
Show full article (0.84Kb)
5 Comments
  passing function template to class template         


Author: Ali
Date: Aug 20, 2008 18:15

The code at the end of this message works just fine with M$ VS2005 but
with g++ 4.1.3 i get this:

node.cpp: In function ‘int main()’:
node.cpp:96: error: no matching function for call to
‘bnode::bnode(cxsc::interval*, cxsc::interval*,
)’
node.cpp...
Show full article (3.16Kb)
1 Comment
1 2 3 4 5 6 7 8 9